Skip to content

Instantly share code, notes, and snippets.

@cosmin
Created August 12, 2010 18:15
Show Gist options
  • Save cosmin/521396 to your computer and use it in GitHub Desktop.
Save cosmin/521396 to your computer and use it in GitHub Desktop.
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