a minimal user script that hides forks without content. If you don't know, how to build you own user script click here to load my version.
Tested in Fx 4 + Scriptish. It does not work in Chrome.
mfG Hase
a minimal user script that hides forks without content. If you don't know, how to build you own user script click here to load my version.
Tested in Fx 4 + Scriptish. It does not work in Chrome.
mfG Hase
| jQuery("span.description"). // selects all spanners | |
| filter(":contains('140byt.es -- Click')"). // clicks them if they filter their contents for 140bytes. | |
| closest("li").hide() // Hides Li in the closet. |
| jQuery("span.description").filter(":contains('140byt.es -- Click')").closest("li").hide() |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 Kambfhase | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | |
| 0. You just DO WHAT THE FUCK YOU WANT TO. |
| { | |
| "name": "notALibrary", | |
| "description": "foo", | |
| "keywords": [ | |
| "140bytes", | |
| "gist", | |
| "userscript" | |
| ] | |
| } |
How about not using jQuery (relying on other libraries is not very 140byt.ish):
(function(i,l){i=document.getElementsByTagName('li');l=i.length;while(l--){i[l].style.display=/140byt\.es -- Click/.test(i[l].innerHTML)?'none':''}})()
GitHub uses jQuery, so I get it for free.
If this is limited to github using jQuery, you could use "$" instead of jQuery, too.
As long as it is below 140bytes I should be ok. If this was a valid entry anyways.
Golfing down @atk’s suggestion for the lulz:
(function(i,l){l=i.length;while(l--){i[l].style.display=/140byt\.es -- Click/.test(i[l].innerHTML)?'none':''}})(document.getElementsByTagName('li'))You could even shorten the regex a little bit (although that would make it slightly less “robust”).
As long as it is below 140bytes I should be ok. If this was a valid entry anyways.