Created
April 15, 2009 12:40
-
-
Save jettero/95746 to your computer and use it in GitHub Desktop.
my favorite gm scripts all on one page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Blogger Content Warning Autoskip | |
// @namespace http://www.kuribo.info/ | |
// @include https://www.blogger.com/blogin.g?blogspotURL=* | |
// ==/UserScript== | |
(function () { | |
var link = document.getElementById("continueButton"); | |
if (link) { | |
location.href = link.href; | |
} | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Google Safe Search Auto-Off | |
// @namespace http://www.digivill.net/~joykillr | |
// @description Auto-disable the google safe search (so as to display all results unfiltered) | |
// @include http://*.google.com/* | |
// @include http://google.com/* | |
// ==/UserScript== | |
// v2.0.2 | |
// Back button will work now. | |
var slshchk = window.content.location.href.toString(); | |
var hchk = window.content.location.host.toString(); | |
var urlexp = new RegExp(/\/$/); | |
if ((!hchk.match(/^trends/i)) && (!hchk.match(/^mail/i))) { | |
if ((slshchk.indexOf("\?") != -1) && (slshchk.search("safe=") == -1) && (!slshchk.match(urlexp))) { | |
window.content.location.replace(slshchk+"&safe=off"); | |
} | |
else if ((slshchk.search("safe=") != -1) && (slshchk.search("safe=off") == -1)) { | |
var isolurl = slshchk.split("safe=")[1].split("&")[0]; | |
slshchk = slshchk.replace("safe=" + isolurl, "safe=off"); | |
window.content.location.replace(slshchk); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name fuck trending topics | |
// @namespace jet's stuff | |
// @description fuck trending topics | |
// @include http://twitter.com/ | |
// ==/UserScript== | |
document.getElementById('trends').style.display='none'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name github paste | |
// @namespace jet's stuff | |
// @description The github url paste "helpers" ruin my cut and paste, this fixes them. It also crushes that stupid clippy.swf! | |
// @include http://github.com/* | |
// @include https://github.com/* | |
// @include http://gist.github.com/* | |
// @include https://gist.github.com/* | |
// ==/UserScript== | |
function fix_url_faces() { | |
$("a.git_url_facebox").each(function(){ | |
var p = $(this).parents("td"); | |
var t = $(this).text(); | |
if( t.match(/^git@/) ) | |
p.text(t); // no helpers, kthx | |
}) | |
} | |
// github loads jQuery, we just have to wait for it. | |
function GM_wait() { | |
if(typeof unsafeWindow.jQuery == 'undefined') { | |
window.setTimeout(GM_wait, 100); | |
} else { | |
$ = unsafeWindow.jQuery; | |
fix_url_faces(); | |
} | |
} | |
GM_wait(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name github menu | |
// @description I use a fairly large font and don't let sites change it, which screws up the positioning of teh github userbox. This fixes those issues. | |
// @namespace jet's stuff | |
// @include https://github.com/* | |
// @include http://github.com/* | |
// ==/UserScript== | |
// github loads jQuery, we just have to wait for it. | |
function GM_wait() { | |
if(typeof unsafeWindow.jQuery == 'undefined') { | |
window.setTimeout(GM_wait, 100); | |
} else { | |
$ = unsafeWindow.jQuery; | |
$("div.box").css("font-size", "0.5em"); | |
} | |
} | |
GM_wait(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Twitter Search Results on Google | |
// @namespace markcarey | |
// @description Shows results from Twitter on Google search pages | |
// @include http://www.google.*/search?*q=* | |
// @include http://www.google.*/* | |
// @date 2009-03-02 | |
// @version 1.0 | |
// @GM_version 0.8.20080609.0 | |
// ==/UserScript== | |
GM_TUR = { | |
un : "", | |
lang : "en", | |
init : function() | |
{ | |
var href = document.location.href; | |
GM_TUR.un = href.match(/[&?]q=([^&]*)(?:&|$)/)[1]; | |
GM_TUR.lang = (href.match(/[&?]hl=([^&]*)(?:&|$)/)) ? href.match(/[&?]hl=([^&]*)(?:&|$)/)[1] : 'en'; | |
if( GM_TUR.un != "" ) | |
{ | |
GM_xmlhttpRequest({ | |
method:"GET", | |
url:"http://search.twitter.com/search.json?q="+GM_TUR.un+"&lang="+GM_TUR.lang, | |
headers:{ | |
"User-Agent":"Mozilla/5.0", | |
"Accept":"text/json" | |
}, | |
onload:GM_TUR.handle | |
}); | |
} | |
}, | |
handle : function(response) | |
{ | |
var r = eval("("+response.responseText+")"); | |
if( r.results && r.results.length > 0 ) | |
{ | |
var results = document.getElementById("res"); | |
var ds = document.createElement("ol"); | |
results.insertBefore(ds, results.firstChild); | |
var il, h; | |
var query = unescape(GM_TUR.un).replace(/\+/g, ' '); | |
h = ds.appendChild(document.createElement("li")); | |
h.className = "g"; | |
var h3 = h.appendChild(document.createElement("h3")); | |
h3.className = "r"; | |
h3.innerHTML = "<a href='http://search.twitter.com/search?q="+ GM_TUR.un +"'>Twitter results for <em>"+ query +"</em></a>"; | |
var t = h.appendChild(document.createElement("table")); | |
t.className = "ts"; | |
var tb = t.appendChild(document.createElement("tbody")); | |
var row = tb.appendChild(document.createElement("tr")); | |
row.innerHTML = '<td style="padding-top: 5px; padding-right: 10px; font-size: 78%; line-height: normal; width: 43px; text-align: center;" valign="top"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAqCAIAAAClYzUyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA+NJREFUeNrEWE2IFEcU/qZrup3enp1slnFwHCVZNWBgFYOK5BBvIbcENQSCBC+5evGci5d48JYguQSCkGsOogcPgZyMCCohBCUkMeIqu/6QnZ2dmZ7umled1zW6rtNtb9ea3hSPhu4Z6n313ldfvVelKIrwv45SKgIf+DPEEuE1g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q3dOsKabYpz+2szmZc/pfz3iXwmXFkMf1vCE0kdSZQpFZ6Fd6bdjxvILtXNEBQ0/hVgANbdbXZbeZWHAAAAAElFTkSuQmCC" alt="" height="42" width="43"></td><td style="padding-top: 3px;" valign="top">'; | |
for( var i=0; i < 5; i++ ) | |
{ | |
il = "<div class='s'>"+ | |
"<a href='http://twitter.com/"+r.results[i].from_user+"' class='l'>"+ | |
r.results[i].from_user+"</a>: "+ | |
autolink(r.results[i].text)+' <span class="f">'+GM_TUR.tt(new Date(r.results[i].created_at))+'</span></div>'; | |
row.innerHTML += il; | |
} | |
row.innerHTML += '</td>'; | |
} | |
}, | |
tt : function(dt) | |
{ | |
var nw = new Date(), df = nw - dt, dm = Math.floor(df/60000), dh = Math.floor(dm/60), at = new Date(dt); | |
if( dm <= 0 ) { return "a few seconds ago"; } | |
if( dm < 60 ) { return (dm == 1)?"1 minute ago":dm+" minutes ago"; } | |
if( dh <= 1 ) { return "about 1 hour ago"; } | |
if( dh < 24 ) { return "about " + dh + " hours ago"; } | |
if( (nw.getDate() - dt.getDate()) == 1 ) { return "yesterday"; } | |
at.setDate(at.getDate() + 1); | |
nw.setDate(nw.getDate() + 1); | |
if( (nw.getDate() - at.getDate()) == 1 ) { return "yesterday"; } | |
var minutes = dt.getMinutes(); | |
if( minutes < 10 ) minutes = "0"+minutes; | |
if( dt.getHours() == 0 ) nw = "12:"+minutes+" AM "; | |
else if( dt.getHours() < 12 ) nw = dt.getHours()+":"+minutes+" AM "; | |
else nw = (dt.getHours()-12)+":"+minutes+" PM "; | |
return nw + ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][dt.getMonth()] + " " + dt.getDate(); | |
} | |
}; | |
GM_TUR.init(); | |
function autolink(s) | |
{ | |
var hlink = /\s(ht|f)tp:\/\/([^ \,\;\:\!\)\(\"\'\<\>\f\n\r\t\v])+/g; | |
return (s.replace (hlink, function ($0,$1,$2) { s = $0.substring(1,$0.length); | |
// remove trailing dots, if any | |
while (s.length>0 && s.charAt(s.length-1)=='.') | |
s=s.substring(0,s.length-1); | |
// add hlink | |
return " " + s.link(s); | |
} | |
) | |
); | |
} | |
function autobold(s) | |
{ | |
// todo | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name XKCD comic alt | |
// @namespace AKX | |
// @include http://xkcd.com/* | |
// ==/UserScript== | |
(function() | |
{ | |
var imgs=document.images; | |
for(i=0;i<imgs.length;i++) | |
{ | |
var img=imgs[i]; | |
if(img.src.indexOf("comics/")>-1&&img.title) | |
{ | |
var divEl=document.createElement("div"); | |
divEl.innerHTML="\""+img.title+"\""; | |
img.parentNode.insertBefore(divEl,img.nextSibling); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment