Advertisement
Guest User

Untitled

a guest
Feb 1st, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1.  
  2.  
  3. // ==UserScript==
  4. // @name Remove pictures in the chat of the cytu.be channel /r/the_tv_lounge
  5. // @namespace CyTube
  6. // @include *
  7. // @author Erik Vergobbi Vold, Tyler G. Hicks-Wright, PackageFiend
  8. // @description Removes .pic in cytu.be/r/the_tv_lounge using jQuery
  9. // ==/UserScript==
  10.  
  11. // a function that loads jQuery and calls a callback function when jQuery has finished loading
  12. function addJQuery(callback) {
  13. var script = document.createElement("script");
  14. script.setAttribute("src", "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js");
  15. script.addEventListener('load', function() {
  16. var script = document.createElement("script");
  17. script.textContent = "window.jQ=jQuery.noConflict(true);(" + callback.toString() + ")();";
  18. document.body.appendChild(script);
  19. }, false);
  20. document.body.appendChild(script);
  21. }
  22.  
  23. // the guts of this userscript
  24. function main() {
  25. // Note, jQ replaces $ to avoid conflicts.
  26. function () {
  27. var pic = jQ('img#picture:not(.hidden)');
  28.  
  29. pic.src='#';
  30. pic.addClass('hidden');
  31. }
  32.  
  33. setInterval(,1000)
  34. }
  35.  
  36. // load jQuery and execute the main function
  37. addJQuery(main);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement