Customize keyboard shortcut in Chrome with Shortcut Manager extention.md
// ==UserScript==
// @ShortcutManager
// @name Readable
// @namespace OwMK5ZZbbms4
// @key v
// @include *
// ==/UserScript==
javascript:(%28function%28%29%7Bwindow.baseUrl%3D%27http%3A//www.readability.com%27%3Bwindow.readabilityToken%3D%27tdSrwDMSVtNgAw4a7tA5jufuhMaXr8LYQK5a9Baw%27%3Bvar s%3Ddocument.createElement%28%27script%27%29%3Bs.setAttribute%28%27type%27%2C%27text/javascript%27%29%3Bs.setAttribute%28%27charset%27%2C%27UTF-8%27%29%3Bs.setAttribute%28%27src%27%2CbaseUrl%2B%27/bookmarklet/read.js%27%29%3Bdocument.documentElement.appendChild%28s%29%3B%7D%29%28%29)
// ==UserScript==
// @ShortcutManager
// @name Add to Pinboard
// @namespace OwMK5ZZbbms4
// @key p
// @include *
// ==/UserScript==
javascript:q=location.href;if(document.getSelection){d=document.getSelection();}else{d='';};p=document.title;void(open('https://pinboard.in/add?url='+encodeURIComponent(q)+'&description='+encodeURIComponent(d)+'&title='+encodeURIComponent(p),'Pinboard','toolbar=no,width=700,height=350'));
// ==UserScript==
// @ShortcutManager
// @name Search in Google
// @namespace OwMK5ZZbbms4
// @key Alt+g
// @include *
// ==/UserScript==
javascript:(function(){var t='';t=document.getSelection().toString();window.open('https://www.google.com/search?q='+t);})()
// ==UserScript==
// @ShortcutManager
// @name Add current page to Pocket
// @namespace AjU8HbkaZ8dF
// @key o
// @include *
// ==/UserScript==
javascript:(function(){ISRIL_H='88a2';PKT_D='getpocket.com';ISRIL_SCRIPT=document.createElement('SCRIPT');ISRIL_SCRIPT.type='text/javascript';ISRIL_SCRIPT.src='http://'+PKT_D+'/b/r.js';document.getElementsByTagName('head')[0].appendChild(ISRIL_SCRIPT)})();
// ==UserScript==
// @ShortcutManager
// @name Scroll down by 50 pixels
// @namespace AjU8HbkaZ8dF
// @key j
// @include *
// @execute ScrollDown(["50"])
// ==/UserScript==
// ==UserScript==
// @ShortcutManager
// @name Scroll up by 50 pixels
// @namespace AjU8HbkaZ8dF
// @key k
// @include *
// @execute ScrollUp(["50"])
// ==/UserScript==
// ==UserScript==
// @ShortcutManager
// @name Reload
// @namespace AjU8HbkaZ8dF
// @key r
// @include *
// @execute Reload([])
// ==/UserScript==
// ==UserScript==
// @ShortcutManager
// @name miniMap
// @namespace AjU8HbkaZ8dF
// @key m
// @include *
// ==/UserScript==
javascript:(function() {
var doc = document,
body = doc.body,
docEl = doc.documentElement,
computedStylesOf = getComputedStyle,
minimap = body.cloneNode(true),
minimap_style = minimap.style;
minimap_style.position = 'fixed';
minimap_style.zIndex = 65534;
minimap_style.WebkitUserSelect = 'none';
[].forEach.call(minimap.getElementsByTagName('a'), function(link) {
link.href = 'javascript:;';
});
docEl.appendChild(minimap);
var youarehere = doc.createElement('div'), youarehere_style = youarehere.style;
youarehere_style.position = 'fixed';
youarehere_style.zIndex = 65535;
youarehere_style.WebkitUserSelect = 'none';
youarehere_style.right = 0;
youarehere_style.border = 'solid black 2px';
docEl.appendChild(youarehere);
scale();
window.addEventListener('resize', scale);
var scaleFactor;
function scale() {
minimap_style.width = computedStylesOf(body).width;
if (minimap.scrollHeight > 10*innerHeight)
scaleFactor = innerHeight/minimap.scrollHeight;
else
scaleFactor = .1;
minimap_style.WebkitTransform = 'scale('+scaleFactor+')';
minimap_style.top =
(minimap.offsetHeight/2 + computed('marginTop'))*(scaleFactor - 1)
+ 'px';
var outerWidth = minimap.offsetWidth + computed('marginLeft')
+ computed('marginRight');
minimap_style.right =
(minimap.offsetWidth/2 + computed('marginRight'))*(scaleFactor - 1)
+ (minimap.scrollWidth > outerWidth
&& (minimap.scrollWidth - outerWidth)*scaleFactor)
+ 2
+ 'px';
youarehere_style.width = innerWidth * scaleFactor + "px";
youarehere_style.height = innerHeight * scaleFactor + "px";
}
function computed(style) {
return parseInt(computedStylesOf(minimap)[style]);
}
youAreNowHere();
window.addEventListener('scroll',youAreNowHere);
function youAreNowHere() {
youarehere_style.top = body.scrollTop*scaleFactor - 2 + "px";
}
minimap.addEventListener('mousedown', mousedown);
youarehere.addEventListener('mousedown', mousedown);
function mousedown(e) {
scrollTo(e);
doc.addEventListener('mousemove', scrollTo);
doc.addEventListener('mouseup', function(){
doc.removeEventListener('mousemove', scrollTo);
doc.removeEventListener('mouseup', arguments.callee);
});
}
function scrollTo(e) {
body.scrollTop = e.clientY/scaleFactor-innerHeight/2;
}
}())
// ==UserScript==
// @ShortcutManager
// @name Close the current tab
// @namespace AjU8HbkaZ8dF
// @key x
// @include *
// @execute CloseTab([])
// ==/UserScript==
// ==UserScript==
// @ShortcutManager
// @name Open Extension
// @namespace AjU8HbkaZ8dF
// @key e
// @include *
// @execute OpenExtension([])
// ==/UserScript==
// ==UserScript==
// @ShortcutManager
// @name QR Code Generation
// @namespace AjU8HbkaZ8dF
// @key q
// @include *
// ==/UserScript==
javascript:(function(){if(document.getElementById){var x=document.body;var o=document.createElement('script');if(typeof(o)!='object') o=document.standardCreateElement('script');o.setAttribute('src','https://qrbookmarklet.googlecode.com/svn/trunk/qr.js');o.setAttribute('type','text/javascript');x.appendChild(o);}})();
Shortcut Manager