Permalink
Browse files

initial import

  • Loading branch information...
0 parents commit 423ac3efb50d4e3c5a76feb17c9cdde2de7cb2af @kastner committed Dec 5, 2011
Showing with 31 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +1 −0 background.html
  3. +17 −0 content_script.js
  4. +12 −0 manifest.json
  5. BIN pinterest-128.png
  6. BIN pinterest-16.png
  7. 0 pinterest.js
1 .gitignore
@@ -0,0 +1 @@
+.DS_Store
1 background.html
@@ -0,0 +1 @@
+<script src="content_script.js?fooo"></script>
17 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 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"
+}
BIN pinterest-128.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN pinterest-16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
0 pinterest.js
No changes.

0 comments on commit 423ac3e

Please sign in to comment.