Advertisement
Guest User

Untitled

a guest
Jun 18th, 2014
3,886
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name          TagPro Wins Until Next Degree
  3. // @namespace     http://www.reddit.com/user/tpcarl/
  4. // @description   Displays wins needed until next degree on score screen.
  5. // @include       http://tagpro-*.koalabeast.com*
  6. // @license       GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html
  7. // @author        ben, modified by ballparts
  8. // @version       .1
  9. // ==/UserScript==
  10.  
  11. $('article > div.section.smaller').after( "<center><h3><div><p id='winsneeded'></p></div></h3></center>" );
  12.  
  13. url = $('a[href^="/profile"]').attr('href');
  14. if(url !== undefined) {
  15.     var n = url.lastIndexOf('/');
  16.     var profileNum = url.substring(n + 1);
  17.     profilePage = String('/profile/'+profileNum);
  18.     localStorage.setItem('profilePage',profilePage);
  19.  
  20. }
  21.  
  22.  
  23. if(document.URL.search('profile')<1) {
  24.     $( "#winsneeded" ).load(localStorage.getItem('profilePage') + ' article > h3 > div', function(){
  25.         $('#winsneeded > div:last-child').css({'font-size':'50%'});
  26.     });
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement