Advertisement
Guest User

Rainbow DDB

a guest
Jul 24th, 2014
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Rainbow DDB
  3. // @namespace Rainbow DDB
  4. // @description Change la couleur du "!" lorsqu'une DDB est en cours.
  5. // @include http://www.jeuxvideo.com/forums/3-*
  6. // @include http://www.jeuxvideo.com/forums/1-*
  7. // @version 1
  8. // ==/UserScript==
  9.  
  10. dates = document.getElementsByClassName("date");
  11. i=0;
  12.  
  13. function ddb(j) {
  14. url = dates[j].getElementsByTagName("a")[0].href;
  15. $.get(url, function(data) {
  16. if (data.contains("Signalement déjà fait")) {
  17. document.getElementsByClassName("date")[j].getElementsByTagName("a")[0].getElementsByTagName("img")[0].src = "http://image.noelshack.com/fichiers/2013/17/1367080939-14agd2.png";
  18. }
  19. });
  20. }
  21.  
  22. while (i<dates.length) {
  23. ddb(i);
  24. i++;
  25. }
  26.  
  27. // ==UserScript==
  28. // @name Rainbow DDB
  29. // @namespace Rainbow DDB
  30. // @description Change la couleur du "!" lorsqu'une DDB est en cours.
  31. // @include http://www.jeuxvideo.com/forums/3-*
  32. // @include http://www.jeuxvideo.com/forums/1-*
  33. // @version 1
  34. // ==/UserScript==
  35.  
  36.  
  37. $ = unsafeWindow.$;
  38. dates = document.getElementsByClassName("date");
  39. i=0;
  40.  
  41. function ddb(j) {
  42. url = dates[j].getElementsByTagName("a")[0].href;
  43. $.get(url, function(data) {
  44. if (data.indexOf("Signalement déjà fait") >= 0) {
  45. document.getElementsByClassName("date")[j].getElementsByTagName("a")[0].getElementsByTagName("img")[0].src = "http://image.noelshack.com/fichiers/2013/17/1367080939-14agd2.png";
  46. }
  47. });
  48. }
  49.  
  50.  
  51. while (i<dates.length) {
  52. ddb(i);
  53. i++;
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement