Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

(in progress) Release 1.1 #3

Merged
merged 54 commits into from about 1 year ago

3 participants

Raymond May Jr. Adam Renklint Marvin
Raymond May Jr.
Owner

changes:

  • injected quick add buttons
  • common files in own repo 6wunderkinder/browser-extension-common

todo:

  • parse opengraph, twitter card, on quick add with prioritization
Adam Renklint
  • imdb button position
  • amazon button color/style
Adam Renklint

should we also add a build step to generate the localization files from our master strings? we could save this for 1.2 though...

and others added some commits February 26, 2013
Raymond May Jr. files, update common 9958aab
Raymond May Jr. update common commit 90b4127
Raymond May Jr. update common 8cf5e3a
Raymond May Jr. common commit 5bccd41
Marvin update css 41b1d42
Raymond May Jr. update common commit 915e8a2
Raymond May Jr. Merge branch 'releases/1.1' of github.com:6wunderkinder/wunderlist-ch…
…rome-extension into releases/1.1
0ebc0f8
Raymond May Jr. update common commit da4ab2b
Raymond May Jr. update common - this gets old lol ece3621
Raymond May Jr. update common commit 7387826
Raymond May Jr. move scrape logic to own helper e1f64db
Raymond May Jr. add context menu, add icons from common 6977bc0
Raymond May Jr. remove unused 6e851ac
Raymond May Jr. update commmon 338381e
Marvin updated common 806f055
Adam Renklint update common module 30ec82a
Adam Renklint Merge branch 'releases/1.1' of https://github.com/6wunderkinder/wunde…
…rlist-chrome-extension into releases/1.1
28635c7
Marvin updated submodule d818f8c
Adam Renklint update submodules for analytics events 4378396
Adam Renklint Merge branch 'releases/1.1' of github.com:6wunderkinder/wunderlist-ch…
…rome-extension into releases/1.1
5304ca1
Adam Renklint update common module 7f55cbc
Adam Renklint update common module ab2e700
Marvin updated common f01e90e
Marvin updated common 9a2c88c
Adam Renklint update common module 16838d8
Adam Renklint update common module 56bc683
Adam Renklint update common module, now has hacker news baeee55
Adam Renklint update common module with better gmail and hacker news scrapers c8059e4
Adam Renklint update common scrapers d7e8539
Adam Renklint update submodule c072f2a
Adam Renklint update submod, point to production target aa59188
Adam Renklint adamrenklint merged commit 5897c3d into from March 12, 2013
Adam Renklint adamrenklint closed this March 12, 2013
Adam Renklint adamrenklint deleted the branch March 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 54 unique commits by 3 authors.

Feb 19, 2013
Raymond May Jr. this thang actually does something ... 721c2e0
Raymond May Jr. much better integration 526c259
Raymond May Jr. cleanup and outlook.com inject f119198
Feb 20, 2013
Raymond May Jr. amazon injector 6b760f4
Raymond May Jr. styles in a stylesheet, yo b21bec8
Feb 21, 2013
Raymond May Jr. update styles, move styles out of scripts 44b9a12
Marvin added some styling to existing buttons and added imdb button 169e59c
Raymond May Jr. fix imdb scraper 5dfa2d7
Feb 22, 2013
Raymond May Jr. cleanup imdb formatting 570e656
Raymond May Jr. ooooowwwwwwwyeeeee f04ce02
Feb 25, 2013
Raymond May Jr. final for now 5091e77
Raymond May Jr. refactor, cleanup 6b5b66f
Raymond May Jr. move common into a submodule aa57e50
Raymond May Jr. update common commit ce22bf0
Raymond May Jr. version bump update strings ... temp desc. 0a41f9c
Raymond May Jr. Merge pull request #2 from 6wunderkinder/raymond-injectors
(for merge - to 1.1) chrome extension side injector changes, style updates
4384509
Raymond May Jr. up common commit df558d0
Raymond May Jr. common bump e3a0ae7
Raymond May Jr. Merge branch 'raymond-injectors' into releases/1.1 df3a057
Raymond May Jr. merge injectors 37713a5
Raymond May Jr. update common version f873ba3
Raymond May Jr. update to common files 6d32ca6
Feb 26, 2013
Raymond May Jr. update common commit 792f6d8
Raymond May Jr. files, update common 9958aab
Raymond May Jr. update common commit 90b4127
Feb 27, 2013
Raymond May Jr. update common 8cf5e3a
Raymond May Jr. common commit 5bccd41
Marvin update css 41b1d42
Raymond May Jr. update common commit 915e8a2
Raymond May Jr. Merge branch 'releases/1.1' of github.com:6wunderkinder/wunderlist-ch…
…rome-extension into releases/1.1
0ebc0f8
Feb 28, 2013
Raymond May Jr. update common commit da4ab2b
Raymond May Jr. update common - this gets old lol ece3621
Raymond May Jr. update common commit 7387826
Raymond May Jr. move scrape logic to own helper e1f64db
Mar 01, 2013
Raymond May Jr. add context menu, add icons from common 6977bc0
Raymond May Jr. remove unused 6e851ac
Raymond May Jr. update commmon 338381e
Mar 05, 2013
Marvin updated common 806f055
Adam Renklint update common module 30ec82a
Adam Renklint Merge branch 'releases/1.1' of https://github.com/6wunderkinder/wunde…
…rlist-chrome-extension into releases/1.1
28635c7
Marvin updated submodule d818f8c
Adam Renklint update submodules for analytics events 4378396
Adam Renklint Merge branch 'releases/1.1' of github.com:6wunderkinder/wunderlist-ch…
…rome-extension into releases/1.1
5304ca1
Mar 06, 2013
Adam Renklint update common module 7f55cbc
Adam Renklint update common module ab2e700
Marvin updated common f01e90e
Marvin updated common 9a2c88c
Mar 11, 2013
Adam Renklint update common module 16838d8
Adam Renklint update common module 56bc683
Mar 12, 2013
Adam Renklint update common module, now has hacker news baeee55
Adam Renklint update common module with better gmail and hacker news scrapers c8059e4
Adam Renklint update common scrapers d7e8539
Adam Renklint update submodule c072f2a
Adam Renklint update submod, point to production target aa59188
This page is out of date. Refresh to see the latest.
3  .gitmodules
... ...
@@ -0,0 +1,3 @@
  1
+[submodule "data/common"]
  2
+	path = data/common
  3
+	url = git@github.com:6wunderkinder/browser-extension-common.git
4  _locales/en/messages.json
... ...
@@ -1,8 +1,8 @@
1 1
 {
2 2
    "appDesc": {
3  
-      "message": "Wunderlist is the best way to remember websites you want to visit later, with just one click."
  3
+      "message": "The Add to Wunderlist extension is the best way to remember websites you want to visit later, with just one click."
4 4
    },
5 5
    "appName": {
6  
-      "message": "Wunderlist"
  6
+      "message": "Add to Wunderlist"
7 7
    }
8 8
 }
80  data/chrome/wunderlist-chrome.js
... ...
@@ -1,81 +1,13 @@
1  
-(function() {
  1
+(function (WL) {
2 2
 
3  
-  function buildUrl (data) {
  3
+  // listener for menu button
  4
+  chrome.extension.onConnect.addListener(function (rawPort) {
4 5
 
5  
-    var title = encodeURI(document.title);
6  
-    var note = window.location.href;
7  
-    var selection = window.getSelection().toString();
8  
-
9  
-    if (selection) {
10  
-      note = note + "\n" + selection;
11  
-    }
12  
-
13  
-    note = encodeURI(note);
14  
-
15  
-    return data.config.host + '/#/extension/add/' + title + '/' + note;
16  
-  }
17  
-
18  
-  function buildCss (options) {
19  
-
20  
-    var transitionSpeed = options && options.transitionSpeed || 500;
21  
-    var opacity = options && options.opacity || 0;
22  
-
23  
-    return 'border:none;height:100%;width:100%;position:fixed;z-index:99999999;top:0;left:0;opacity:' + opacity + ';display:block;-webkit-transition:opacity ' + transitionSpeed + 'ms linear;';
24  
-  }
25  
-
26  
-  chrome.extension.onConnect.addListener(function(rawPort) {
27  
-
28  
-    var overlayId = 'wunderlist_overlay';
29 6
     var port = PortWrapper(rawPort);
  7
+    port.on('wunderlist_clickQuickAdd', function (postData) {
30 8
 
31  
-    port.on('wunderlist_clickQuickAdd', function(postData) {
32  
-
33  
-      var existing = document.getElementById(overlayId);
34  
-
35  
-      if (!existing) {
36  
-
37  
-        var frame = document.createElement('iframe');
38  
-
39  
-        frame.allowtransparency = 'true';
40  
-        frame.scrolling = 'no';
41  
-        frame.id = overlayId;
42  
-        frame.name = overlayId;
43  
-
44  
-        frame.style.cssText = buildCss();
45  
-        frame.src = buildUrl(postData);
46  
-
47  
-        frame.onload = function () {
48  
-          frame.style.opacity = 1;
49  
-
50  
-          setTimeout(function () {
51  
-            frame.style.cssText = buildCss({
52  
-              'opacity': 1,
53  
-              'transitionSpeed': 50
54  
-            });
55  
-          }, 1000);
56  
-        };
57  
-
58  
-        document.body.appendChild(frame);
59  
-
60  
-        var close = function close (ev) {
61  
-          if (ev.data === 'close_wunderlist') {
62  
-            
63  
-            frame.style.opacity = 0;
64  
-
65  
-            setTimeout(function () {
66  
-              frame.src = 'about:blank';
67  
-              frame.onload = function() {
68  
-                window.removeEventListener('message', close, false);
69  
-                frame.parentNode.removeChild(frame);
70  
-                frame = null;
71  
-              };
72  
-            }, 500);
73  
-          }
74  
-        };
75  
-        
76  
-        window.addEventListener('message', close, false);
77  
-      }
  9
+      WL.showOverlay(postData);
78 10
     });
79 11
   });
80 12
 
81  
-}());
  13
+})(window.WL);
1  data/common
... ...
@@ -0,0 +1 @@
  1
+Subproject commit 6c353166a22e014f6069426a26d0e729695365c0
24  data/main.js
... ...
@@ -1,11 +1,6 @@
1 1
 // Add manifest access to the extension
2 2
 chrome.manifest = chrome.app.getDetails();
3 3
 
4  
-// Plugin configuration
5  
-var config = {
6  
-  'host': 'https://www.wunderlist.com'
7  
-};
8  
-
9 4
 // Trigger wunderlist_click in the content scripts,
10 5
 // so that an overlay is created
11 6
 var attachOverlay = function (data) {
@@ -18,11 +13,24 @@ var attachOverlay = function (data) {
18 13
 };
19 14
 
20 15
 // Fire the overlay when the browser action button is clicked
21  
-chrome.browserAction.onClicked.addListener(function(tab) {
  16
+chrome.browserAction.onClicked.addListener(function (tab) {
22 17
 
23 18
   attachOverlay({
24  
-    'tab': tab,
25  
-    'config': config
  19
+    'tab': tab
26 20
   });
27 21
 
28 22
 });
  23
+
  24
+// context menu item
  25
+chrome.contextMenus.create({
  26
+
  27
+  "title": "Add to Wunderlist",
  28
+  "contexts": ["page", "selection", "image", "link"],
  29
+  "onclick": function (info, tab) {
  30
+
  31
+    attachOverlay({
  32
+
  33
+      'tab': tab
  34
+    });
  35
+  }
  36
+});
BIN  icon.png
BIN  icon128.png
BIN  icon16.png
BIN  icon48.png
73  manifest.json
... ...
@@ -1,21 +1,64 @@
1 1
 {
2  
-   "background": { "page": "app.html" },
3  
-   "browser_action": { "default_icon": "icon.png" },
4  
-   "content_scripts": [ {
5  
-      "js": [
6  
-        "data/chrome/wunderlist-chrome-port-wrapper.js",
7  
-        "data/chrome/wunderlist-chrome.js"
8  
-      ],
9  
-      "matches": [ "http://*/*", "https://*/*" ]
10  
-   }],
  2
+  "background": {
  3
+
  4
+    "page": "app.html"
  5
+  },
  6
+  
  7
+  "browser_action": {
  8
+    
  9
+    "default_icon": "data/common/icons/AddToWLIcon128.png"
  10
+  },
  11
+
  12
+  "content_scripts": [ {
  13
+
  14
+    "js": [
  15
+
  16
+      "data/common/libs/jquery.min.js",
  17
+
  18
+      "data/common/WL.js",
  19
+      "data/common/Overlay.js",
  20
+      "data/common/Scrapers.js",
  21
+      "data/common/Injectors.js",
  22
+
  23
+      "data/chrome/wunderlist-chrome-port-wrapper.js",
  24
+      "data/chrome/wunderlist-chrome.js"
  25
+    ],
  26
+
  27
+    "css": [
  28
+
  29
+      "data/common/css/styles.css"
  30
+    ],
  31
+
  32
+    "matches": [
  33
+
  34
+      "http://*/*",
  35
+      "https://*/*"
  36
+    ]
  37
+  }],
  38
+
11 39
   "default_locale": "en",
  40
+  
12 41
   "description": "__MSG_appDesc__",
13  
-  "content_security_policy": "script-src 'self' https://www.wunderlist.com; object-src 'self'",
  42
+  
  43
+  // "content_security_policy": "script-src 'self' https://www.wunderlist.com; object-src 'self'",
  44
+  "content_security_policy": "script-src 'self' http://localhost:5000; object-src 'self'",
  45
+  
14 46
   "manifest_version": 2,
  47
+  
15 48
   "name": "__MSG_appName__",
16  
-  "permissions": [ "tabs", "http://*/*", "contextMenus" ],
17  
-  "version": "1.0",
18  
-  "icons": { "16": "icon16.png",
19  
-              "48": "icon48.png",
20  
-              "128": "icon128.png" }
  49
+  
  50
+  "permissions": [
  51
+    "tabs",
  52
+    "http://*/*",
  53
+    "contextMenus"
  54
+  ],
  55
+
  56
+  "version": "1.1",
  57
+  
  58
+  "icons": {
  59
+
  60
+    "16": "data/common/icons/AddToWLIcon16.png",
  61
+    "48": "data/common/icons/AddToWLIcon48.png",
  62
+    "128": "data/common/icons/AddToWLIcon128.png"
  63
+  }
21 64
 }
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.