Skip to content

Commit

Permalink
initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
kastner committed Dec 5, 2011
0 parents commit 423ac3e
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
.DS_Store
1 change: 1 addition & 0 deletions background.html
@@ -0,0 +1 @@
<script src="content_script.js?fooo"></script>
17 changes: 17 additions & 0 deletions content_script.js
@@ -0,0 +1,17 @@
function refreshMenu() {
chrome.contextMenus.removeAll();

var imageMenu = chrome.contextMenus.create({
"title": "Pin It!",
"contexts": ["image"], "onclick": function (info, tab) {
console.log(info);
console.log(tab);
var pinUrl = "http://pinterest.com/pin/create/bookmarklet/";
pinUrl += "?media=" + escape(info.srcUrl) + "&url=" + escape(tab.url) + "&alt=alt&title=foo"; //+ escape(tab.title);
pinUrl += "&is_video=false&";
window.open(pinUrl,"pin"+(new Date).getTime(),"status=no,resizable=no,scrollbars=yes,personalbar=no,directories=no,location=no,toolbar=no,menubar=no,width=632,height=270,left=0,top=0");
}
});
}

refreshMenu();
12 changes: 12 additions & 0 deletions manifest.json
@@ -0,0 +1,12 @@
{
"description": "Pin any image to pinterest",
"icons": {
"16": "pinterest-16.png",
"128": "pinterest-128.png"
},
"background_page": "background.html",
"name": "Pinterest quick add",
"permissions": [ "contextMenus", "tabs", "http://*/*", "https://*/*" ],
"update_url": "http://metaatem.net/exts/update.php",
"version": "1.0.3"
}
Binary file added pinterest-128.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pinterest-16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added pinterest.js
Empty file.

0 comments on commit 423ac3e

Please sign in to comment.