Guest User

Untitled

a guest
Aug 5th, 2013
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        Wykopowa lista hańby
  3. // @description Zamienia avaty ludzi z listy hańby
  4. // @include     http://*.wykop.pl/*
  5. // @include     http://wykop.pl/*
  6. // @version     1.03
  7. // @run-at  document-end
  8. // ==/UserScript==
  9.  
  10. //var zhanbieni =;
  11. if (typeof $ == 'undefined') {
  12.     if (unsafeWindow.jQuery) {
  13.         var $ = unsafeWindow.jQuery;
  14.         $(document).ready(maine_functione);
  15.     } else {
  16.         addJQuery(maine_functione);
  17.     }
  18. } else {
  19.     $(document).ready(maine_functione);
  20. }
  21. function maine_functione()
  22. {
  23.     var new_color = "darkviolet";
  24.     var zhanbieni = {
  25. 'borntobewild': true, 'micky1': true, 'Phillippus': true, 'ledniowski99': true, 'oooMaXooo': true, 'retardo': true, 'aniolziom': true, 'michuck': true, 'terminator2': true, 'Tigran': true, 'pietrass': true, 'Thou': true, 'shadow_no': true, 'betonkomorkowy': true, 'IF22I': true, 'Agreas': true, 'Zakakaikane': true, 'qski': true, 'pietrek3121': true, 'Maciek5000': true, 'shownomercy': true, 'JoLemon': true
  26.                  }
  27.     $('a[title^="profil"] img').each(function (i,el) {
  28.         if (el.alt in  zhanbieni)
  29.         {
  30.             var $el = $(el);
  31.             var li = $el.closest('li');
  32.             el.style['opacity'] = '0.66';
  33.             el.parentNode.style['background'] = 'none repeat scroll 0 0 ' + new_color;
  34.             var czas = li.find('time').get(0);
  35.             czas.innerHTML = '(zhańbiony) ' + czas.innerHTML;
  36.             li.find('header strong').get(0).style['color'] = new_color;
  37.         }
  38.     });
  39. }
  40.  
  41.  
  42. function addJQuery(callback) {
  43.     var script = document.createElement("script");
  44.     script.textContent = "$(document).ready(" + callback.toString() + ");";
  45.     document.body.appendChild(script);
  46. };
Advertisement
Add Comment
Please, Sign In to add comment