By Gautham Pai
—
Last update
May 8, 2008
—
Installed
64 times.
// ==UserScript==
// @name Open in quotably v 1.1
// @namespace http://buzypi.in/
// @description Open twitter page in quotably
// @include http://twitter.com/*
// ==/UserScript==
function keyPressEvent(event){
var kcode = (event.keyCode)?event.keyCode:event.which;
var k = String.fromCharCode(kcode);
if((k == 'Q' || k == 'q') && event.ctrlKey && event.altKey){
openInQuotably();
}
}
function openInQuotably(){
var splitArray = document.location.href.split('/');
if(splitArray.length == 4)
document.location.href = "http://quotably.com/"+document.location.href.split('/')[3];
else if(splitArray.length == 5 && splitArray[4] == 'with_friends')
document.location.href = "http://quotably.com/"+document.location.href.split('/')[3]
+"/following";
else
alert("There is no equivalent quotably page for this Twitter page");
}
document.addEventListener("keypress", keyPressEvent, true);