Commits

Alexey Kozlov committed 434ff79

version 2.0

Comments (0)

Files changed (2)

 <head>
  <script type="text/javascript">
 
-  chrome.browserAction.onClicked.addListener(function(tab) {
+function genericOnClick(info, tab) {
+  TheURL = "http://vi.sualize.us/0/?action=add&address="+info.srcUrl+"&referenceURL="+info.pageUrl;
+  //alert(TheURL);
 
-    chrome.tabs.executeScript(null, {code: "var s=document.createElement('script');s.src='http://cdnstatic.visualizeus.com/js/visualizeus.js?v=1.2187';s.id='visualizeus';document.body.appendChild(s);"});
+  chrome.tabs.create({'url': TheURL});
 
-  });
+}
+
+chrome.contextMenus.create({"title": "Add to vi.sualize.us",
+                            "contexts":["image"],
+                            "onclick": genericOnClick});
 
  </script>
 </head>
 {
    "name": "vi.sualize.us Plus",
    "description": "Adding pictures from page to vi.sualize.us",
-   "version": "1.0.3",
+   "version": "2.0",
    "background_page": "background.html",
-
-   "browser_action": {
-      "default_icon": "48.png",
-      "default_title": "Adding pictures from page to vi.sualize.us"
-   },
-
    "icons": {
       "128": "128.png",
       "48": "48.png",
       "16": "16.png"
    },
-   "permissions": [ "tabs", "http://*/*", "https://*/*" ]
+   "permissions": [ "notifications", "tabs", "contextMenus", "http://*/*", "https://*/*" ]
 }