Advertisement
Guest User

Gravis comment collapse script

a guest
Feb 24th, 2016
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Gravis Script
  3. // @grant        none
  4. // @match http://soylentnews.org/*article.pl*
  5. // @match http://*.soylentnews.org/*article.pl*
  6. // @match https://soylentnews.org/*article.pl*
  7. // @match https://*.soylentnews.org/*article.pl*
  8. // @match http://soylentnews.org/*comments.pl*
  9. // @match http://*.soylentnews.org/*comments.pl*
  10. // @match https://soylentnews.org/*comments.pl*
  11. // @match https://*.soylentnews.org/*comments.pl*
  12. // ==/UserScript==
  13. /* jshint -W097 */
  14. 'use strict';
  15.  
  16. var temp = document.getElementsByClassName("title");
  17. for (var x=0; x<temp.length; x++)
  18. {
  19.     var temp2 = temp[x].getElementsByTagName("img");
  20.     for (var y=0; y<temp2.length; y++)
  21.     {
  22.         if (temp2[y].title == "Close Comment")
  23.         {
  24.             temp[x].setAttribute("onclick","this.getElementsByTagName('img')[0].click();");
  25.             temp[x].style.cursor = "pointer";
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement