Created
July 22, 2011 05:38
-
-
Save kennethreitz/1098949 to your computer and use it in GitHub Desktop.
Instapaper Chrome Extension
This file contains 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
<script> | |
chrome.browserAction.onClicked.addListener(function(tab) { | |
var script = "function iprl5(){var d=document,z=d.createElement('scr'+'ipt'),b=d.body,l=d.location;try{if(!b)throw(0);d.title='(Saving...) '+d.title;z.setAttribute('src',l.protocol+'//www.instapaper.com/j/pUgLJLCrwjg0?u='+encodeURIComponent(l.href)+'&t='+(new Date().getTime()));b.appendChild(z);}catch(e){alert('Please wait until the page has loaded.');}}iprl5();void(0)" | |
chrome.tabs.executeScript(tab.id, {code: script}); | |
}); | |
</script> |
This file contains 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
{ | |
"name": "Instapaper", | |
"description": "Add the current page to your Instapaper List", | |
"version": "1.0", | |
"background_page": "background.html", | |
"icons": { | |
"128": "icon_128.png", | |
"48": "icon_48.png" | |
}, | |
"permissions": [ "tabs", "http://*/*", "https://*/*" ], | |
"browser_action": { | |
"default_title": "Instapaper", | |
"default_icon": "icon_32.png" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment