Created
August 12, 2010 18:15
-
-
Save cosmin/521396 to your computer and use it in GitHub Desktop.
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
require("clicks-in-new-buffer.js"); | |
clicks_in_new_buffer_target = OPEN_NEW_WINDOW; | |
url_completion_use_history = true; | |
url_completion_use_bookmarks = false; | |
can_kill_last_buffer = false; | |
download_buffer_automatic_open_target = OPEN_NEW_BUFFER_BACKGROUND; | |
interactive("instapaper", "Add current page to instapaper", | |
function(I) { | |
var d = I.buffer.document; | |
var z = d.createElement ('scr'+'ipt'); | |
var b = d.body; | |
var l = d.location; | |
var e = encodeURIComponent; | |
var f = l.protocol + '//www.instapaper.com/j/WHsktg2SVhtY'; | |
var p = '?u='+e(l.href)+'&t='+(new Date().getTime ()); | |
var u = f+p; | |
try { | |
if (!b) { | |
throw (0); | |
} | |
d.title='(Saving...) '+d.title; | |
z.setAttribute('src',u); | |
b.appendChild(z); | |
} catch (e) { | |
alert('Please wait until the page has loaded.'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment