Guest User

TESU Academic Eval Hack 2

a guest
Oct 17th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         TESU Width Fix
  3. // @namespace    http://tampermonkey.net/
  4. // @version      0.2
  5. // @description  try to take over the world!
  6. // @author       Alzee
  7. // @match        https://my.tesu.edu/student/Pages/WebAdvisor.aspx*
  8. // @require      http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
  9. // @require      https://gist.github.com/raw/2625891/waitForKeyElements.js
  10. // @grant        none
  11. // ==/UserScript==
  12.  
  13. function fixWidth(x)
  14. {
  15.   $('div#CustParagraph ol').remove();
  16.  
  17.   $('*').each(function(){
  18.     if ($(this).css('margin'))
  19.     {
  20.       $(this).css('margin', '0');
  21.     }
  22.  
  23.     if ($(this).css('margin-left'))
  24.     {
  25.       $(this).css('margin-left', '0');
  26.     }
  27.   });
  28. }
  29.  
  30. function fixUnderlines(x)
  31. {
  32.   if (x.text().match(/^_+$/))
  33.   {
  34.     x.text('');
  35.   }
  36. }
  37.  
  38. $(document).ready(function() {
  39.   fixWidth(null);
  40.   waitForKeyElements('div', fixWidth);
  41.   waitForKeyElements('td', fixUnderlines);
  42. });
Add Comment
Please, Sign In to add comment