Created
October 8, 2010 05:20
-
-
Save michaelfox/616392 to your computer and use it in GitHub Desktop.
My settings for Chrome shortcut manager extension
This file contains hidden or 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== | |
// @ShortcutManager | |
// @name Quix | |
// @namespace http://www.michaelfox.name | |
// @key Ctrl+q | |
// @include * | |
// ==/UserScript== | |
javascript:Quix();function%20Quix()%7Bvar%20e=encodeURIComponent;var%20t=window.getSelection?window.getSelection():(document.getSelection?document.getSelection():(document.selection?document.selection.createRange().text:''));var%20c=window.prompt('Quix:%20Type%20%60help%60%20for%20a%20list%20of%20commands:');if(t!='')%7Bif(c)%7Bc+='%20'+t;%7Delse%7Bc=''+t;%7D%7Dif(c)%7Bvar%20u='http://www.quixapp.com/go/?c='+e(c)+'&t='+(document.title?e(document.title):'')+'&s=https://dl.dropbox.com/s/jpc1gu600xunbs5/quix.txt'+'&v=081'+'&u='+(document.location?e(document.location):'');d=''+document.location;if(d.substr(0,4)!='http')%7Bwindow.location=u+'&mode=direct';%7Delse%7Bheads=document.getElementsByTagName('head');if(c.substring(0,1)=='%20')%7Bvar%20w=window.open(u+'&mode=direct');w.focus();%7Delse%20if(heads.length==0)%7Bwindow.location=u+'&mode=direct';%7Delse%7Bq=document.getElementById('quix');if(q)%7Bq.parentNode.removeChild(q);%7Dsc=document.createElement('script');sc.src=u;sc.id='quix';sc.type='text/javascript';void(heads%5B0%5D.appendChild(sc));%7D%7D%7D%7D | |
// ==UserScript== | |
// @ShortcutManager | |
// @name Pinboard | |
// @namespace http://www.michaelfox.name | |
// @key Ctrl+p | |
// @include * | |
// ==/UserScript== | |
javascript:q=location.href;if(document.getSelection){d=document.getSelection();}else{d='';};p=document.title;void(open('https://pinboard.in/add?showtags=yes&url='+encodeURIComponent(q)+'&description='+encodeURIComponent(d)+'&title='+encodeURIComponent(p),'Pinboard','toolbar=no,scrollbars=yes,width=750,height=700')); | |
// ==UserScript== | |
// @ShortcutManager | |
// @name Instapaper | |
// @namespace http://www.michaelfox.name | |
// @key Ctrl+i | |
// @include * | |
// ==/UserScript== | |
javascript:function%20iprl5(){var%20d=document,z=d.createElement('scr'+'ipt'),b=d.body;try{if(!b)throw(0);d.title='(Saving...)%20'+d.title;z.setAttribute('src','http://www.instapaper.com/j/M8tv68RFZ94l?u='+encodeURIComponent(d.location.href)+'&t='+(new%20Date().getTime()));b.appendChild(z);}catch(e){alert('Please%20wait%20until%20the%20page%20has%20loaded.');}}iprl5();void(0) | |
// ==UserScript== | |
// @ShortcutManager | |
// @name Reload (Cacheless) | |
// @namespace Ak4fsvDRpr08 | |
// @key Shift+r | |
// @include * | |
// @execute CachelessReload([]) | |
// ==/UserScript== | |
// ==UserScript== | |
// @ShortcutManager | |
// @name Duplicate the current tab | |
// @namespace Ak4fsvDRpr08 | |
// @key Ctrl+d | |
// @include * | |
// @execute DuplicateTab([]) | |
// ==/UserScript== | |
// ==UserScript== | |
// @ShortcutManager | |
// @name Scroll to the top | |
// @namespace Ak4fsvDRpr08 | |
// @key Shift+; g g | |
// @include * | |
// @execute ScrollToTop([]) | |
// ==/UserScript== | |
// ==UserScript== | |
// @ShortcutManager | |
// @name Scroll to the bottom | |
// @namespace Ak4fsvDRpr08 | |
// @key Shift+; Shift+g | |
// @include * | |
// ==/UserScript== | |
scroll(0,document.getElementsByTagName('body')[0].scrollHeight); | |
// ==UserScript== | |
// @ShortcutManager | |
// @name Select the right tab | |
// @namespace Ak4fsvDRpr08 | |
// @key Shift+; g t | |
// @include * | |
// @execute SelectRightTab([]) | |
// ==/UserScript== | |
// ==UserScript== | |
// @ShortcutManager | |
// @name Select the left tab | |
// @namespace Ak4fsvDRpr08 | |
// @key Shift+; g Shift+t | |
// @include * | |
// @execute SelectLeftTab([]) | |
// ==/UserScript== | |
// ==UserScript== | |
// @ShortcutManager | |
// @name Back to the first page | |
// @namespace Ak4fsvDRpr08 | |
// @key Ctrl+Shift+h Ctrl+Shift+h | |
// @include * | |
// @execute BackToFirst([]) | |
// ==/UserScript== | |
// ==UserScript== | |
// @ShortcutManager | |
// @name Upper directory | |
// @namespace Ak4fsvDRpr08 | |
// @key Shift+; g u | |
// @include * | |
// @execute UpperDirectory([]) | |
// ==/UserScript== | |
// ==UserScript== | |
// @ShortcutManager | |
// @name Select the last tab | |
// @namespace Ak4fsvDRpr08 | |
// @key Shift+; g 0 | |
// @include * | |
// @execute SelectLastTab([]) | |
// ==/UserScript== | |
// ==UserScript== | |
// @ShortcutManager | |
// @name Go to Referrer | |
// @namespace Ak4fsvDRpr08 | |
// @key Shift+; g r | |
// @include * | |
// ==/UserScript== | |
if (!document.referrer) | |
alert("No referrer!"); | |
else | |
document.location = document.referrer; | |
// ==UserScript== | |
// @ShortcutManager | |
// @name Go all the way up | |
// @namespace Ak4fsvDRpr08 | |
// @key Shift+; g Shift+u | |
// @include * | |
// ==/UserScript== | |
location.pathname = ""; | |
// ==UserScript== | |
// @ShortcutManager | |
// @name Close other tabs | |
// @namespace Ak4fsvDRpr08 | |
// @key Ctrl+Shift+d Ctrl+Shift+d | |
// @include * | |
// @execute CloseOtherTabs([]) | |
// ==/UserScript== | |
// ==UserScript== | |
// @ShortcutManager | |
// @name Close right tabs | |
// @namespace Ak4fsvDRpr08 | |
// @key Shift+; d t | |
// @include * | |
// @execute CloseRightTabs([]) | |
// ==/UserScript== | |
// ==UserScript== | |
// @ShortcutManager | |
// @name Close left tabs | |
// @namespace Ak4fsvDRpr08 | |
// @key Shift+; d Shift+t | |
// @include * | |
// @execute CloseLeftTabs([]) | |
// ==/UserScript== | |
// ==UserScript== | |
// @ShortcutManager | |
// @name Decrement by 1 | |
// @namespace Ak4fsvDRpr08 | |
// @key Shift+; g - | |
// @include * | |
// ==/UserScript== | |
(function() { | |
var e, s; | |
IB = 1; | |
function isDigit(c) { | |
return ("0" <= c && c <= "9") | |
} | |
L = location.href; | |
LL = L.length; | |
for (e = LL - 1; e >= 0; --e) if (isDigit(L.charAt(e))) { | |
for (s = e - 1; s >= 0; --s) if (!isDigit(L.charAt(s))) break; | |
break; | |
}++s; | |
if (e < 0) | |
return; | |
oldNum = L.substring(s, e + 1); | |
newNum = "" + (parseInt(oldNum, 10) + IB); | |
while (newNum.length < oldNum.length) | |
newNum = "0" + newNum; | |
location.href = L.substring(0, s) + newNum + L.slice(e + 1); | |
})(); | |
// ==UserScript== | |
// @ShortcutManager | |
// @name Increment by 1 | |
// @namespace Ak4fsvDRpr08 | |
// @key Shift+; g Shift+= | |
// @include * | |
// ==/UserScript== | |
javascript: (function() { | |
var e, s; | |
IB = -1; | |
function isDigit(c) { | |
return ("0" <= c && c <= "9") | |
} | |
L = location.href; | |
LL = L.length; | |
for (e = LL - 1; e >= 0; --e) if (isDigit(L.charAt(e))) { | |
for (s = e - 1; s >= 0; --s) if (!isDigit(L.charAt(s))) break; | |
break; | |
}++s; | |
if (e < 0) return; | |
oldNum = L.substring(s, e + 1); | |
newNum = "" + (parseInt(oldNum, 10) + IB); | |
while (newNum.length < oldNum.length) newNum = "0" + newNum; | |
location.href = L.substring(0, s) + newNum + L.slice(e + 1); | |
})(); | |
// ==UserScript== | |
// @ShortcutManager | |
// @name recss - Reload Stylesheets | |
// @namespace PA5ykip5dppO | |
// @key Alt+r Alt+c | |
// @include * | |
// ==/UserScript== | |
javascript:void(function()%7Bvar%20i,a,s;a=document.getElementsByTagName('link');for(i=0;i%3Ca.length;i++)%7Bs=a%5Bi%5D;if(s.rel.toLowerCase().indexOf('stylesheet')%3E=0&&s.href)%20%7Bvar%20h=s.href.replace(/(&%7C%5C?)forceReload=%5Cd+/,'');s.href=h+(h.indexOf('?')%3E=0?'&':'?')+'forceReload='+(new%20Date().valueOf())%7D%7D%7D)(); | |
// ==UserScript== | |
// @ShortcutManager | |
// @name Search Focus | |
// @namespace PA5ykip5dppO | |
// @key s | |
// @include *, http://brettterpstra.com/searchfocus-the-most-useful-bookmarklet-ive-ever-made-at-321am | |
// ==/UserScript== | |
javascript:var%20inputs=document.getElementsByTagName('input'),firstSearch=false,textinputs=[],i,t;for(i=0;i<inputs.length;i++)if(((inputs[i].type==='text')||(inputs[i].type==='search'))&&inputs.disabled!==true)textinputs.push(inputs[i]);for(t=0;t<textinputs.length;t++)if((/search/i).test(textinputs[t].className)||(/(^[sq]$|search|query)/i).test(textinputs[t].id)||(/^(q(uery)?|s|.*?search.*)$/).test(textinputs[t].name)){firstSearch=textinputs[t];break;}if(!firstSearch)textinputs[0].focus();else%20firstSearch.focus(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment