Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove legacy things

  • Loading branch information...
commit 0111b7497fec6c509fa0ab3031f4a275a663cbda 1 parent d2ae4a1
@adamrenklint adamrenklint authored
Showing with 147 additions and 968 deletions.
  1. +6 −4 README.md
  2. +8 −0 _locales/en/messages.json
  3. +4 −0 app.html
  4. +0 −8 chrome/_locales/de/messages.json
  5. +0 −8 chrome/_locales/en/messages.json
  6. +0 −8 chrome/_locales/es/messages.json
  7. +0 −8 chrome/_locales/ru/messages.json
  8. +0 −5 chrome/buffer.html
  9. +0 −11 chrome/data/chrome/buffer-chrome-data-wrapper.js
  10. +0 −46 chrome/data/chrome/buffer-chrome-embed.js
  11. +0 −12 chrome/data/chrome/buffer-chrome.js
  12. +0 −221 chrome/data/chrome/options/css/less/options.less
  13. +0 −84 chrome/data/chrome/options/css/options.css
  14. BIN  chrome/data/chrome/options/img/buffer-logo-small.png
  15. BIN  chrome/data/chrome/options/img/buffer-logo.png
  16. +0 −124 chrome/data/chrome/options/options.js
  17. +0 −246 chrome/data/main.js
  18. +0 −1  chrome/data/shared
  19. BIN  chrome/logo_icon_128.png
  20. BIN  chrome/logo_icon_19.png
  21. BIN  chrome/logo_icon_38.png
  22. BIN  chrome/logo_icon_large.png
  23. BIN  chrome/logo_icon_small.png
  24. +0 −107 chrome/manifest.json
  25. +0 −75 chrome/options.html
  26. 0  chrome/data/chrome/buffer-chrome-port-wrapper.js → data/chrome/wunderlist-chrome-port-wrapper.js
  27. +81 −0 data/chrome/wunderlist-chrome.js
  28. +28 −0 data/main.js
  29. BIN  icon.png
  30. BIN  icon128.png
  31. BIN  icon16.png
  32. BIN  icon48.png
  33. +20 −0 manifest.json
  34. BIN  releases/chrome-2.2.10.zip
  35. BIN  releases/chrome-2.2.11.zip
  36. BIN  releases/chrome-2.2.12.zip
  37. BIN  releases/chrome-2.2.13.zip
  38. BIN  releases/chrome-2.2.14.zip
  39. BIN  releases/chrome-2.2.15.zip
  40. BIN  releases/chrome-2.2.16.zip
  41. BIN  releases/chrome-2.2.17.zip
  42. BIN  releases/chrome-2.2.18.zip
  43. BIN  releases/chrome-2.2.19.zip
  44. BIN  releases/chrome-2.2.20.zip
  45. BIN  releases/chrome-2.2.21.zip
  46. BIN  releases/chrome-2.2.22.zip
  47. BIN  releases/chrome-2.2.3.zip
  48. BIN  releases/chrome-2.2.4.zip
  49. BIN  releases/chrome-2.2.5.zip
  50. BIN  releases/chrome-2.2.6.zip
  51. BIN  releases/chrome-2.2.7.zip
  52. BIN  releases/chrome-2.2.8.zip
  53. BIN  releases/chrome-2.2.9.zip
  54. BIN  releases/chrome-2.3.1.zip
  55. BIN  releases/chrome-2.3.2.zip
  56. BIN  releases/chrome-2.3.3.zip
  57. BIN  releases/chrome-2.3.4.zip
  58. BIN  releases/chrome-2.3.5.zip
  59. BIN  releases/chrome-2.3.6.zip
  60. BIN  releases/chrome-2.3.7.zip
  61. BIN  releases/chrome-2.3.zip
View
10 README.md
@@ -1,5 +1,7 @@
-# Buffer for Chrome
+# How to install
-The Buffer Chrome Extension, found on the [Chrome Web Store](https://chrome.google.com/webstore/detail/noojglkidnpfjbincgijbaiedldjfbhh?hl=en-GB).
-
-Easily add great articles, pictures and videos to your Buffer and we automagically share them for you through the day.
+* Clone this repository (or download the .zip)
+* Open chrome://chrome/extensions/ in Chrome
+* Enable **Developer Mode**
+* **Load unpacked extension** and select the chrome extension
+* That's it!
View
8 _locales/en/messages.json
@@ -0,0 +1,8 @@
+{
+ "appDesc": {
+ "message": "Wunderlist is the best way to remember websites you want visit later, with just one click."
+ },
+ "appName": {
+ "message": "Wunderlist"
+ }
+}
View
4 app.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<script src="data/chrome/wunderlist-chrome-port-wrapper.js"></script>
+<script src="data/main.js"></script>
View
8 chrome/_locales/de/messages.json
@@ -1,8 +0,0 @@
-{
- "appName": {
- "message": "Buffer"
- },
- "appDesc": {
- "message": "Buffer macht es einfacher Tweets, Facebook posts oder LinkedIn posts zu optimierter Zeit zu teilen. Es funktioniert auf jeder Website und mit einem Klick."
- }
-}
View
8 chrome/_locales/en/messages.json
@@ -1,8 +0,0 @@
-{
- "appName": {
- "message": "Buffer"
- },
- "appDesc": {
- "message": "Buffer is the best way to share great content to Twitter, Facebook and LinkedIn from anywhere on the web, with just one click."
- }
-}
View
8 chrome/_locales/es/messages.json
@@ -1,8 +0,0 @@
-{
- "appName": {
- "message": "Buffer"
- },
- "appDesc": {
- "message": "Buffer es una forma más conveniente de publicar tus actualizaciones en Twitter, Facebook, LinkedIn y otros. También hace un seguimiento de resultados y analiza por ti todo lo que compartes."
- }
-}
View
8 chrome/_locales/ru/messages.json
@@ -1,8 +0,0 @@
-{
- "appName": {
- "message": "Buffer"
- },
- "appDesc": {
- "message": "Buffer – это более удобный способ публикации новых сообщений в социальных сетях Twitter, Facebook, LinkedIn и многих других. Для Вашего удобства это приложение также ведет статистику и анализирует всю публикуемую Вами информацию."
- }
-}
View
5 chrome/buffer.html
@@ -1,5 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<script src="data/shared/libs/jquery-1.7.2.min.js"></script>
-<script src="data/chrome/buffer-chrome-port-wrapper.js"></script>
-<script src="data/main.js"></script>
View
11 chrome/data/chrome/buffer-chrome-data-wrapper.js
@@ -1,11 +0,0 @@
-// Very small wrapper for getting a data URL
-var DataWrapper = function () {
- return {
- get: function (file) {
- return chrome.extension.getURL(file);
- }
- };
-};
-
-if(!xt) var xt = {};
-xt.data = DataWrapper();
View
46 chrome/data/chrome/buffer-chrome-embed.js
@@ -1,46 +0,0 @@
-;(function () {
-
- // Don't try and connect again if xt.port.raw has already been set
- if( ! xt.port.raw ) {
-
- var rawPort;
-
- // Attempt to reconnect
- var reconnectToExtension = function () {
- // Reset port
- rawPort = null;
-
- // Attempt to reconnect after 1 second
- setTimeout(connectToExtension, 1000 * 1);
- };
-
- // Attempt to connect
- var connectToExtension = function () {
-
- // Make the connection
- rawPort = chrome.extension.connect({name: "buffer-embed"});
-
- // When extension is upgraded or disabled and renabled, the content scripts
- // will still be injected, so we have to reconnect them.
- // We listen for an onDisconnect event, and then wait for a second before
- // trying to connect again. Becuase chrome.extension.connect fires an onDisconnect
- // event if it does not connect, an unsuccessful connection should trigger
- // another attempt, 1 second later.
- rawPort.onDisconnect.addListener(reconnectToExtension);
-
- // Wrap it up for use by the content scripts
- xt.port = PortWrapper(rawPort);
-
- // Wait for options
- xt.port.on('buffer_options', function (options) {
- xt.options = options;
- });
-
- };
-
- // Connect for the first time
- connectToExtension();
-
- }
-
-}());
View
12 chrome/data/chrome/buffer-chrome.js
@@ -1,12 +0,0 @@
-;(function() {
- chrome.extension.onConnect.addListener(function(rawPort) {
- // PortWrapper(port) exposes an on/emit API for Chrome ports.
- // We are waiting for a trigger, buffer_click, to create the overlay.
- var port = PortWrapper(rawPort);
- port.on("buffer_click", function(postData) {
- // bufferData is a method in buffer-overlay that creates
- // the overlay and gives it data.
- bufferData(port, postData);
- });
- });
-}());
View
221 chrome/data/chrome/options/css/less/options.less
@@ -1,221 +0,0 @@
-/**
- * HTML5 ✰ Boilerplate
- */
-article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}html,button,input,select,textarea{font-family:sans-serif;color:#222}body{margin:0;font-size:1em;line-height:1.4}::-moz-selection{background:#fe57a1;color:#fff;text-shadow:none}::selection{background:hsl(99, 53%, 39%);color:#fff;text-shadow:none}a{color:#00e}a:visited{color:#551a8b}a:hover{color:#06e}a:focus{outline:thin dotted}a:hover,a:active{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}blockquote{margin:1em 40px}dfn{font-style:italic}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}ins{background:#ff9;color:#000;text-decoration:none}mark{background:#ff0;color:#000;font-style:italic;font-weight:bold}pre,code,kbd,samp{font-family:monospace,serif;_font-family:'courier new',monospace;font-size:1em}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:before,q:after{content:"";content:none}small{font-size:85%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}ul,ol{margin:1em 0;padding:0 0 0 40px}dd{margin:0 0 0 40px}nav ul,nav ol{list-style:none;list-style-image:none;margin:0;padding:0}img{border:0;-ms-interpolation-mode:bicubic;vertical-align:middle}svg:not(:root){overflow:hidden}figure{margin:0}form{margin:0}fieldset{border:0;margin:0;padding:0}label{cursor:pointer}legend{border:0;*margin-left:-7px;padding:0;white-space:normal}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;*overflow:visible}button[disabled],input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0;*width:13px;*height:13px}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top;resize:vertical}input:invalid,textarea:invalid{background-color:#f0dddd}table{border-collapse:collapse;border-spacing:0}td{vertical-align:top}.chromeframe{margin:.2em 0;background:#ccc;color:black;padding:.2em 0}
-
-/**
- * Mixins
- */
-.padding {
- padding: 1em 1.5em;
-}
-
-.button {
- text-decoration: none;
- border: none;
- background: hsl(99, 53%, 39%);
- border-radius: 3px;
- .padding;
- color: white;
- font-weight: bold;
- font-size: 0.667em;
- text-transform: uppercase;
- -webkit-transition: background .1s linear;
- transition: background .1s linear;
- &:visited {
- color: white;
- }
- &:hover {
- background: hsl(99, 53%, 45%);
- color: white;
- }
- &:active {
- background: hsl(99, 53%, 60%);
- color: white;
- }
-}
-
-/**
- * Reset
- */
-h1, h2, h3, h4, h5, h6, p {
- font-size: 1em;
- font-weight: normal;
- margin: 0;
-}
-
-/**
- * Main Styles
- */
-* {
- box-sizing: border-box;
-}
-
-body {
- font: 16px/1.5 "Helvetica Neue", sans-serif;
- background: white;
- color: black;
- -webkit-font-smoothing: antialiased;
-}
-
-.wrapper {
- width: 50%;
- margin: 2.5em auto;
-}
-
-header {
- position: relative;
- img {
- margin: 1.5em 1.5em;
- }
- h1 {
- background: #efefef;
- .padding;
- -webkit-transition: background .1s linear;
- transition: background .1s linear;
- &.highlight {
- background: hsl(51,80%,80%);
- }
- &.love {
- background: hsl(330,80%,80%);
- }
- }
- menu {
- float: right;
- width: 33%;
- }
- ul {
- overflow: hidden;
- list-style: none;
- padding-left: 0;
- margin: 0;
- li {
- float: right;
- display: block;
- }
- a {
- display: block;
- .button;
- .padding;
- }
- }
-}
-
-.options {
-}
-
-/**
- * Form
- */
-.field {
- .padding;
- overflow: hidden;
- margin: 1em 0;
-
- h2 {
- width: 32%;
- float: left;
- font-weight: bold;
- }
-
- fieldset {
- width: 66%;
- padding-left: 1%;
- float: right;
- overflow: hidden;
- }
-
- .checkbox {
- padding: 0 0 0.262em;
- width: 50%;
- float: left;
- }
-
- .error {
- box-shadow: inset 0 0 1em rgba(255,0,0,.5)!important;
- position: relative;
- margin-bottom: 0.667em;
- }
-
- input[type="checkbox"] {
- margin-right: 0.667em;
- }
-
- input[type="text"] {
- width: 100%;
- display: block;
- background: #efefef;
- border: none;
- outline: none;
- margin-bottom: 0.667em;
- .padding;
- &:focus {
- outline: none;
- box-shadow: inset 0 0 1em rgba(0,0,0,.2);
- }
- }
-
- .submit {
- display: inline-block;
- margin-right: 0.5em;
- .button;
- &.saved {
- background: #aaa;
- }
- }
-
- .other {
- color: #888;
- font-style: italic;
- text-decoration: none;
- border-bottom: 1px solid #ccc;
- -webkit-transition: all .1s linear;
- &:hover {
- color: hsl(99, 53%, 39%);
- border-color: hsl(99, 53%, 39%);
- }
- &:active {
- color: hsl(99, 53%, 45%);
- border-color: hsl(99, 53%, 45%);
- }
- }
-
- small {
- color: #999;
- input {
- margin-top: 1em;
- }
- aside {
- margin-top: 2.5em;
- font-size: 1em;
- }
- }
-
-}
-
-.wiggle {
- position: relative;
- -webkit-animation-name: wiggle;
- -webkit-animation-duration: .15s;
- -webkit-animation-iteration-count: 4;
- -webkit-animation-timing-function: ease;
- -webkit-animation-delay: 0;
-}
-
-@-webkit-keyframes wiggle {
- 0% {
- left: 0;
- }
- 25% {
- left: 0.2em;
- }
- 50% {
- left: 0em;
- }
- 75% {
- left: -0.2em;
- }
-}
-
-
-
View
84 chrome/data/chrome/options/css/options.css
@@ -1,84 +0,0 @@
-article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
-audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
-audio:not([controls]){display:none;}
-[hidden]{display:none;}
-html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
-html,button,input,select,textarea{font-family:sans-serif;color:#222222;}
-body{margin:0;font-size:1em;line-height:1.4;}
-::-moz-selection{background:#fe57a1;color:#fff;text-shadow:none;}
-::selection{background:#54982f;color:#fff;text-shadow:none;}
-a{color:#0000ee;}
-a:visited{color:#551a8b;}
-a:hover{color:#0066ee;}
-a:focus{outline:thin dotted;}
-a:hover,a:active{outline:0;}
-abbr[title]{border-bottom:1px dotted;}
-b,strong{font-weight:bold;}
-blockquote{margin:1em 40px;}
-dfn{font-style:italic;}
-hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0;}
-ins{background:#ff9;color:#000;text-decoration:none;}
-mark{background:#ff0;color:#000;font-style:italic;font-weight:bold;}
-pre,code,kbd,samp{font-family:monospace,serif;_font-family:'courier new',monospace;font-size:1em;}
-pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word;}
-q{quotes:none;}
-q:before,q:after{content:"";content:none;}
-small{font-size:85%;}
-sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}
-sup{top:-0.5em;}
-sub{bottom:-0.25em;}
-ul,ol{margin:1em 0;padding:0 0 0 40px;}
-dd{margin:0 0 0 40px;}
-nav ul,nav ol{list-style:none;list-style-image:none;margin:0;padding:0;}
-img{border:0;-ms-interpolation-mode:bicubic;vertical-align:middle;}
-svg:not(:root){overflow:hidden;}
-figure{margin:0;}
-form{margin:0;}
-fieldset{border:0;margin:0;padding:0;}
-label{cursor:pointer;}
-legend{border:0;*margin-left:-7px;padding:0;white-space:normal;}
-button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}
-button,input{line-height:normal;}
-button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;*overflow:visible;}
-button[disabled],input[disabled]{cursor:default;}
-input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0;*width:13px;*height:13px;}
-input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;}
-input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;}
-button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}
-textarea{overflow:auto;vertical-align:top;resize:vertical;}
-input:invalid,textarea:invalid{background-color:#f0dddd;}
-table{border-collapse:collapse;border-spacing:0;}
-td{vertical-align:top;}
-.chromeframe{margin:.2em 0;background:#ccc;color:black;padding:0.2em 0;}
-.padding{padding:1em 1.5em;}
-.button{text-decoration:none;border:none;background:#54982f;border-radius:3px;padding:1em 1.5em;color:white;font-weight:bold;font-size:0.667em;text-transform:uppercase;-webkit-transition:background .1s linear;transition:background .1s linear;}.button:visited{color:white;}
-.button:hover{background:#61b036;color:white;}
-.button:active{background:#89cf63;color:white;}
-h1,h2,h3,h4,h5,h6,p{font-size:1em;font-weight:normal;margin:0;}
-*{box-sizing:border-box;}
-body{font:16px/1.5 "Helvetica Neue",sans-serif;background:white;color:black;-webkit-font-smoothing:antialiased;}
-.wrapper{width:50%;margin:2.5em auto;}
-header{position:relative;}header img{margin:1.5em 1.5em;}
-header h1{background:#efefef;padding:1em 1.5em;-webkit-transition:background .1s linear;transition:background .1s linear;}header h1.highlight{background:#f5e9a3;}
-header h1.love{background:#f5a3cc;}
-header menu{float:right;width:33%;}
-header ul{overflow:hidden;list-style:none;padding-left:0;margin:0;}header ul li{float:right;display:block;}
-header ul a{display:block;text-decoration:none;border:none;background:#54982f;border-radius:3px;padding:1em 1.5em;color:white;font-weight:bold;font-size:0.667em;text-transform:uppercase;-webkit-transition:background .1s linear;transition:background .1s linear;padding:1em 1.5em;}header ul a:visited{color:white;}
-header ul a:hover{background:#61b036;color:white;}
-header ul a:active{background:#89cf63;color:white;}
-.field{padding:1em 1.5em;overflow:hidden;margin:1em 0;}.field h2{width:32%;float:left;font-weight:bold;}
-.field fieldset{width:66%;padding-left:1%;float:right;overflow:hidden;}
-.field .checkbox{padding:0 0 0.262em;width:50%;float:left;}
-.field .error{box-shadow:inset 0 0 1em rgba(255, 0, 0, 0.5) !important;position:relative;margin-bottom:0.667em;}
-.field input[type="checkbox"]{margin-right:0.667em;}
-.field input[type="text"]{width:100%;display:block;background:#efefef;border:none;outline:none;margin-bottom:0.667em;padding:1em 1.5em;}.field input[type="text"]:focus{outline:none;box-shadow:inset 0 0 1em rgba(0, 0, 0, 0.2);}
-.field .submit{display:inline-block;margin-right:0.5em;text-decoration:none;border:none;background:#54982f;border-radius:3px;padding:1em 1.5em;color:white;font-weight:bold;font-size:0.667em;text-transform:uppercase;-webkit-transition:background .1s linear;transition:background .1s linear;}.field .submit:visited{color:white;}
-.field .submit:hover{background:#61b036;color:white;}
-.field .submit:active{background:#89cf63;color:white;}
-.field .submit.saved{background:#aaa;}
-.field .other{color:#888;font-style:italic;text-decoration:none;border-bottom:1px solid #ccc;-webkit-transition:all .1s linear;}.field .other:hover{color:#54982f;border-color:#54982f;}
-.field .other:active{color:#61b036;border-color:#61b036;}
-.field small{color:#999;}.field small input{margin-top:1em;}
-.field small aside{margin-top:2.5em;font-size:1em;}
-.wiggle{position:relative;-webkit-animation-name:wiggle;-webkit-animation-duration:.15s;-webkit-animation-iteration-count:4;-webkit-animation-timing-function:ease;-webkit-animation-delay:0;}
-@-webkit-keyframes wiggle{0%{left:0;} 25%{left:0.2em;} 50%{left:0em;} 75%{left:-0.2em;}}
View
BIN  chrome/data/chrome/options/img/buffer-logo-small.png
Deleted file not rendered
View
BIN  chrome/data/chrome/options/img/buffer-logo.png
Deleted file not rendered
View
124 chrome/data/chrome/options/options.js
@@ -1,124 +0,0 @@
-/**
- * Turn checkboxes on & off from localStorage based on their values
- */
-var checkboxes = $('input[type="checkbox"]').each(function () {
-
- var val = $(this).attr('value'),
- key = 'buffer.op.' + val;
-
- if( localStorage.getItem(key) === val ) {
- $(this).attr('checked', true);
- } else {
- $(this).attr('checked', false);
- }
-
-});
-
-/**
- * Fill in text inputs from localStorage
- */
-var inputs = $('input[type="text"]').each(function () {
-
- var val = $(this).attr('placeholder'),
- key = 'buffer.op.' + $(this).attr('name');
-
- if( localStorage.getItem(key) !== val ) {
- $(this).val(localStorage.getItem(key));
- }
-
-});
-
-/**
- * Clean up the key combo
- */
-$('input[name="key-combo"]').change(function () {
- var val = $(this)
- .val()
- .trim()
- .toLowerCase()
- .replace(/[\s\,\&]/gi, '+') // Convert possible spacer characters to pluses
- .replace(/[^a-z0-9\+]/gi, ''); // Strip out almost everything else
- $(this).val(val);
-});
-
-/**
- * Save it all
- */
-$('.submit').click(function (ev) {
-
- ev.preventDefault();
-
- var keycombo = $('input[name="key-combo"]').val();
-
- // Check the key combo
- // The regex:
- //
- // starts with (one or more) of alt / shift / ctrl / command and a plus
- // then (zero or more) of a-z / 0-9 (only one) and a plus
- // then ends with a-z / 0-9 (only one)
- if( keycombo.length > 0 &&
- keycombo.match(/^(((alt|shift|ctrl|command)\+)+([a-z0-9]{1}\+)*([a-z0-9]{1}))$/gi) === null ) {
- // Indicate there's an error
- $('input[name="key-combo"]').addClass('error').one('change', function () {
- $(this).removeClass("error");
- });
- // Wiggle the box
- var button = $(this).addClass('wiggle');
- setTimeout(function () {
- $(button).removeClass('wiggle');
- }, 1500 * 0.15);
- return;
- }
-
- // Save the checkbox values based on their values
- $(checkboxes).each(function () {
-
- var val = $(this).attr('value'),
- key = 'buffer.op.' + val;
-
- if( $(this).attr('checked') === 'checked' ) {
- localStorage.setItem(key, val);
- } else {
- localStorage.setItem(key, 'false');
- }
-
- });
-
- // Save the checkbox values based on their values
- $(inputs).each(function () {
-
- var val = $(this).val(),
- key = 'buffer.op.' + $(this).attr('name'),
- placeholder = $(this).attr('placeholder');
-
- if( val !== placeholder ) {
- if( val === '' ) val = placeholder;
- localStorage.setItem(key, val);
- }
-
- });
-
- // Indicate to the user that things went well
- $(this).text('Saved').addClass("saved");
-
- // Ask for a good review
- if( ! localStorage.getItem('buffer.reviewed') ) {
- $('header h1:not(.highlight)').html('Enjoying <strong>Buffer</strong>? Head over to the <a class="fivestars" href="https://chrome.google.com/webstore/detail/noojglkidnpfjbincgijbaiedldjfbhh?hl=en-GB" target="_bank">Chrome Web Store</a> and give us 5 stars.<br>We will love you <em>forever</em>.').addClass('highlight');
- }
-
-});
-
-/**
- * Reset the save button
- */
-$('input').on('keyup click', function () {
- $('.submit').text('Save').removeClass("saved");
-});
-
-/**
- * Store that the user has already been to the Web Store (:. we <3 them)
- */
-$('body').on('click', '.fivestars', function () {
- localStorage.setItem('buffer.reviewed', 'true');
- $('header h1').html("You're <strong>awesome</strong> &hearts;").addClass('love').removeClass('highlight');
-});
View
246 chrome/data/main.js
@@ -1,246 +0,0 @@
-/**=========================================
- * Buffer for Chrome
- *
- * How it works:
- *
- * 1. Content scripts are injected according to the list in
- * the manifest.
- * 2. As each script is injected, a connection is set up
- * and the chrome.extension.onConnectlistener is fired.
- * 3. This creates listeners for events from the content
- * script, which can be triggers or data passing.
- * 4. When a trigger (buffer_click) is fired, from a content
- * script or from a page action or menu, the attachOverlay
- * function is fired, which initiates a connection to the
- * buffer-overlay content script, collates some data and
- * fires an event that triggers the creation of the Buffer
- * overlay.
- *
- * The shared embeds:
- *
- * The embed code (shared/...) is identical across the extensions.
- * They are injected with some or all of the contents of chrome/...
- * to allow them to run the same code across all three+ browsers.
- *
- * The scripts that hack on other's UI do so by defining a list of
- * objects that are processed and converted in DOM elements with
- * event listeners and style etc.
- *
- * For example, in buffer-twitter:
- *
- * config.buttons is the list of elements that are added to the UI.
- * The element, built in the create method, is added to the container
- * elements, after another specific element. It's not quite consistent
- * between the embedded scripts, so it's worth checking out the
- * insertButtons function to see what's possible.
- *
- * I started to extract this out into a library, but there didn't seem
- * to be demand for it so I stopped. https://github.com/phuu/extensio
- =========================================*/
-
-/**=========================================
- * CONFIGURATION
- =========================================*/
-
-// Add manifest access to the extension
-chrome.manifest = chrome.app.getDetails();
-
-// Plugin configuration
-var config = {};
-config.plugin = {
- label: "Buffer This Page",
- version: chrome.manifest.version,
- guide: 'http://bufferapp.com/guides/chrome/installed',
- menu: {
- page: {
- label: "Buffer This Page"
- },
- selection: {
- label: "Buffer Selected Text"
- },
- image: {
- label: "Buffer This Image"
- }
- }
-};
-
-/**=========================================
- * OVERLAY & TAB MANAGEMENT
- =========================================*/
-
-// Trigger buffer_click in the content scripts,
-// so that an overlay is created
-var attachOverlay = function (data, cb) {
-
- // Make sure all the data is in the right place
- if( typeof data === 'function' ) cb = data;
- if( ! data ) data = {};
- if( ! cb ) cb = function () {};
- if( ! data.embed ) data.embed = {};
-
- // Store references to important data
- var tab = data.tab;
- var port = PortWrapper(chrome.tabs.connect(tab.id), {name: 'buffer'});
-
- // Remove the port once the Buffering is complete
- port.on('buffer_done', function (overlayData) {
- cb(overlayData);
- });
-
- // Don't try to JSON encode a tab
- data.tab = null;
-
- // Pass statistic data
- data.version = config.plugin.version;
- if( data.embed.placement ) data.placement = data.embed.placement;
-
- // Inform overlay that click has occurred
- port.emit("buffer_click", data);
-};
-
-/**=========================================
- * CONTENT SCRIPT PORT
- =========================================*/
-
-// Listen for embedded events
-chrome.extension.onConnect.addListener(function(rawPort) {
-
- // Ignore anything that doesn't begin with Buffer
- if( ! rawPort.name.match(/^buffer/) ) { return; }
-
- var port = PortWrapper(rawPort),
- tab = rawPort.sender.tab;
-
- // Send the user's options to content scripts
- port.emit('buffer_options', localStorage);
-
- // Listen for embedded triggers
- port.on("buffer_click", function (embed) {
- attachOverlay({tab: tab, embed: embed}, function (overlaydata) {
- if( !!overlaydata.sent ) {
- // Buffer was sent
- port.emit("buffer_embed_clear");
- }
- });
- });
-
- // Listen for a request for scraper data from the overlay-scraper
- // and send it on to the scraper
- port.on("buffer_details_request", function () {
- port.emit("buffer_details_request");
- });
-
- // overlay-scraper asks for details, then the scraper
- // return it, so we send it back to the overlay-scraper
- port.on("buffer_details", function (data) {
- port.emit("buffer_details", data);
- });
-
-});
-
-/**=========================================
- * INITIAL SETUP
- =========================================*/
-
-// Inject code from the first element of the content script list
-var injectButtonCode = function (id) {
- var scripts = chrome.manifest.content_scripts[0].js;
- // Programmatically inject each script
- scripts.forEach(function (script) {
- chrome.tabs.executeScript(id, {
- file: script
- });
- });
-};
-
-// Show the guide on first run
-if( ! localStorage.getItem('buffer.run') ) {
- localStorage.setItem('buffer.run', true);
- // Inject the scraper scripts into all tabs in all windows straight away
- chrome.windows.getAll({
- populate: true
- }, function (windows) {
- windows.forEach(function (currentWindow) {
- currentWindow.tabs.forEach(function (currentTab) {
- // Skip chrome:// and https:// pages
- if( ! currentTab.url.match(/(chrome|https):\/\//gi) ) {
- injectButtonCode(currentTab.id);
- }
- });
- });
- // Open the guide
- chrome.tabs.create({
- url: config.plugin.guide,
- active: true
- });
- });
-}
-
-// Set up options
-if( ! localStorage.getItem('buffer.op') ) {
- localStorage.setItem('buffer.op', true);
-
- // Grab the options page and use it to generate the options
- $.get('options.html', function (data) {
-
- // Use the checkbox's value attribute as the key and default value
- $('input[type="checkbox"]', data).each(function () {
- var val = $(this).attr('value'),
- key = 'buffer.op.' + val;
-
- localStorage.setItem(key, val);
- });
-
- // Use any text input's placeholder as the value,
- // and the name as the key
- $('input[type="text"]', data).each(function () {
- var val = $(this).attr('placeholder'),
- key = 'buffer.op.' + $(this).attr('name');
-
- localStorage.setItem(key, val);
- });
-
- });
-}
-
-/**=========================================
- * TRIGGERS
- =========================================*/
-
-// Fire the overlay when the browser action button is clicked
-chrome.browserAction.onClicked.addListener(function(tab) {
- attachOverlay({tab: tab, placement: 'toolbar'});
-});
-
-// Context menus
-
-// Page
-chrome.contextMenus.create({
- title: config.plugin.menu.page.label,
- contexts: ["page"],
- onclick: function (info, tab) {
- attachOverlay({tab: tab, placement: 'menu-page'});
- }
-});
-
-// Selection
-chrome.contextMenus.create({
- title: config.plugin.menu.selection.label,
- contexts: ["selection"],
- onclick: function (info, tab) {
- attachOverlay({tab: tab, placement: 'menu-selection'});
- }
-});
-
-// Selection
-chrome.contextMenus.create({
- title: config.plugin.menu.image.label,
- contexts: ["image"],
- onclick: function (info, tab) {
- attachOverlay({
- tab: tab,
- image: info.srcUrl,
- placement: 'menu-image'
- });
- }
-});
1  chrome/data/shared
@@ -1 +0,0 @@
-Subproject commit d8c7eafbd58487e431df050c3206fcaba476ab0f
View
BIN  chrome/logo_icon_128.png
Deleted file not rendered
View
BIN  chrome/logo_icon_19.png
Deleted file not rendered
View
BIN  chrome/logo_icon_38.png
Deleted file not rendered
View
BIN  chrome/logo_icon_large.png
Deleted file not rendered
View
BIN  chrome/logo_icon_small.png
Deleted file not rendered
View
107 chrome/manifest.json
@@ -1,107 +0,0 @@
-{
-
- "name": "__MSG_appName__",
- "description": "__MSG_appDesc__",
- "default_locale": "en",
- "version": "2.3.8",
- "manifest_version": 2,
-
- "browser_action": {
- "default_icon": {
- "19": "logo_icon_19.png",
- "38": "logo_icon_38.png"
- }
- },
-
- "background": {
- "page": "buffer.html"
- },
-
- "options_page": "options.html",
-
- "permissions": [
- "tabs",
- "http://*/*",
- "contextMenus"
- ],
-
- "web_accessible_resources": [
- "data/shared/img/buffer-icon-sprite.png",
- "data/shared/img/buffer_twitter_small.png",
- "data/shared/img/twttr-sprite.png",
- "data/shared/img/twttr-sprite-small.png"
- ],
-
- "content_scripts": [
- {
- "matches": ["http://*/*", "https://*/*"],
- "js": [
- "data/chrome/buffer-chrome-port-wrapper.js",
- "data/chrome/buffer-chrome-data-wrapper.js",
- "data/chrome/buffer-chrome-embed.js",
- "data/shared/libs/jquery-1.7.2.min.js",
- "data/shared/libs/postmessage.js",
- "data/shared/buffer-overlay.js",
- "data/shared/embeds/buffer-scraper.js",
- "data/shared/embeds/buffer-hotkey.js",
- "data/chrome/buffer-chrome.js"
- ]
- },
- {
- "matches": ["*://*.bufferapp.com/*"],
- "js": [
- "data/chrome/buffer-chrome-port-wrapper.js",
- "data/chrome/buffer-chrome-embed.js",
- "data/shared/embeds/buffer-overlay-scraper.js"
- ],
- "all_frames": true
- },
- {
- "matches": ["*://*.facebook.com/*"],
- "js": ["data/shared/embeds/buffer-facebook.js"]
- },
- {
- "matches": ["*://*.reddit.com/*"],
- "js": [
- "data/shared/embeds/buffer-reddit.js"
- ]
- },
- {
- "matches": ["*://*.twitter.com/*"],
- "js": [
- "data/shared/embeds/buffer-twitter.js"
- ]
- },
- {
- "matches": [
- "*://*.google.com/reader/*",
- "*://*.google.co.uk/reader/*",
- "*://*.google.de/reader/*",
- "*://*.google.ca/reader/*",
- "*://*.google.jp/reader/*",
- "*://*.google.es/reader/*",
- "*://*.google.fr/reader/*",
- "*://*.google.it/reader/*",
- "*://*.google.se/reader/*"
- ],
- "js": [
- "data/shared/embeds/buffer-google-reader.js"
- ]
- },
- {
- "matches": [
- "http://*.ycombinator.org/*",
- "http://*.ycombinator.com/*"],
- "js": [
- "data/shared/embeds/buffer-hn.js"
- ]
- }
- ],
-
- "icons": {
- "16": "logo_icon_small.png",
- "48": "logo_icon_large.png",
- "128": "logo_icon_128.png"
- }
-
-}
View
75 chrome/options.html
@@ -1,75 +0,0 @@
-<!doctype html>
-<meta charset="utf-8">
-<title>Options &mdash; Buffer for Chrome</title>
-<link rel="stylesheet" href="data/chrome/options/css/options.css">
-
-<div class="wrapper">
- <header>
- <menu>
- <ul>
- <li>
- <a href='mailto:hello@bufferapp.com?subject=Chrome Extension' title="Email the Buffer Team">Get in touch</a>
- </li>
- </ul>
- </menu>
- <img src="data/chrome/options/img/buffer-logo-small.png">
- <h1>Make <strong>Buffer</strong> work <em>perfectly</em> for you.</h1>
- </header>
- <div class="options">
- <div class="field">
- <h2 for="site">Buffer Integration</h2>
- <fieldset>
- <div class="checkbox">
- <label for="twitter">
- <input type="checkbox" id="twitter" name="site" value="twitter">Twitter
- </label>
- </div>
- <div class="checkbox">
- <label for="facebook">
- <input type="checkbox" id="facebook" name="site" value="facebook">Facebook
- </label>
- </div>
- <div class="checkbox">
- <label for="reader">
- <input type="checkbox" id="reader" name="site" value="reader">Google Reader
- </label>
- </div>
- <div class="checkbox">
- <label for="reddit">
- <input type="checkbox" id="reddit" name="site" value="reddit">Reddit
- </label>
- </div>
- <div class="checkbox">
- <label for="hacker">
- <input type="checkbox" id="hacker" name="site" value="hacker">Hacker News
- </label>
- </div>
- </fieldset>
- </div>
- <div class="field">
- <h2>Keyboard Shortcut</h2>
- <fieldset>
- <input type="text" placeholder="alt+b" name="key-combo">
- <small>Keys separated by '+'. Eg. 'alt+shift+b' or 'ctrl+b'.</small>
- <small class="checkbox">
- <input type="checkbox" name="key-enable" value="key-enable" checked>Use key shortcut?
- </small>
- </fieldset>
- </div>
- <div class="field">
- <h2></h2>
- <fieldset>
- <a class="submit saved" href="#">Saved</a>
- <small>
- or <a class="other" href="http://bufferapp.com/extras" target="_blank">find other ways to add to Buffer...</a>
- <aside>
- Please <strong>refresh</strong> any open pages after making changes.
- </aside>
- </small>
- </fieldset>
- </div>
- </div>
-</div>
-
-<script src="data/shared/libs/jquery-1.7.2.min.js"></script>
-<script src="data/chrome/options/options.js"></script>
View
0  ...data/chrome/buffer-chrome-port-wrapper.js → .../chrome/wunderlist-chrome-port-wrapper.js
File renamed without changes
View
81 data/chrome/wunderlist-chrome.js
@@ -0,0 +1,81 @@
+(function() {
+
+ function buildUrl (data) {
+
+ var title = encodeURI(document.title);
+ var note = window.location.href;
+ var selection = window.getSelection().toString();
+
+ if (selection) {
+ note = note + "\n" + selection;
+ }
+
+ note = encodeURI(note);
+
+ return data.config.host + '/#/extension/add/' + title + '/' + note;
+ }
+
+ function buildCss (options) {
+
+ var transitionSpeed = options && options.transitionSpeed || 500;
+ var opacity = options && options.opacity || 0;
+
+ 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;';
+ }
+
+ chrome.extension.onConnect.addListener(function(rawPort) {
+
+ var overlayId = 'wunderlist_overlay';
+ var port = PortWrapper(rawPort);
+
+ port.on('wunderlist_clickQuickAdd', function(postData) {
+
+ var existing = document.getElementById(overlayId);
+
+ if (!existing) {
+
+ var frame = document.createElement('iframe');
+
+ frame.allowtransparency = 'true';
+ frame.scrolling = 'no';
+ frame.id = overlayId;
+ frame.name = overlayId;
+
+ frame.style.cssText = buildCss();
+ frame.src = buildUrl(postData);
+
+ frame.onload = function () {
+ frame.style.opacity = 1;
+
+ setTimeout(function () {
+ frame.style.cssText = buildCss({
+ 'opacity': 1,
+ 'transitionSpeed': 50
+ });
+ }, 1000);
+ };
+
+ document.body.appendChild(frame);
+
+ var close = function close (ev) {
+ if (ev.data === 'close_wunderlist') {
+
+ frame.style.opacity = 0;
+
+ setTimeout(function () {
+ frame.src = 'about:blank';
+ frame.onload = function() {
+ window.removeEventListener('message', close, false);
+ frame.parentNode.removeChild(frame);
+ frame = null;
+ };
+ }, 500);
+ }
+ };
+
+ window.addEventListener('message', close, false);
+ }
+ });
+ });
+
+}());
View
28 data/main.js
@@ -0,0 +1,28 @@
+// Add manifest access to the extension
+chrome.manifest = chrome.app.getDetails();
+
+// Plugin configuration
+var config = {
+ 'host': 'http://0.0.0.0:5000' //'https://beta.wunderlist.com'
+};
+
+// Trigger wunderlist_click in the content scripts,
+// so that an overlay is created
+var attachOverlay = function (data) {
+
+ // Store references to important data
+ var tab = data.tab;
+ var port = PortWrapper(chrome.tabs.connect(tab.id), {name: 'wunderlist'});
+
+ port.emit('wunderlist_clickQuickAdd', data);
+};
+
+// Fire the overlay when the browser action button is clicked
+chrome.browserAction.onClicked.addListener(function(tab) {
+
+ attachOverlay({
+ 'tab': tab,
+ 'config': config
+ });
+
+});
View
BIN  icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  icon128.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  icon16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  icon48.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
20 manifest.json
@@ -0,0 +1,20 @@
+{
+ "background": { "page": "app.html" },
+ "browser_action": { "default_icon": "icon.png" },
+ "content_scripts": [ {
+ "js": [
+ "data/chrome/wunderlist-chrome-port-wrapper.js",
+ "data/chrome/wunderlist-chrome.js"
+ ],
+ "matches": [ "http://*/*", "https://*/*" ]
+ }],
+ "default_locale": "en",
+ "description": "Add to Wunderlist is the easiest & fastest way to add websites & links you like to Wunderlist to view later.",
+ "manifest_version": 2,
+ "name": "Add to Wunderlist",
+ "permissions": [ "tabs", "http://*/*", "contextMenus" ],
+ "version": "1.0",
+ "icons": { "16": "icon16.png",
+ "48": "icon48.png",
+ "128": "icon128.png" }
+}
View
BIN  releases/chrome-2.2.10.zip
Binary file not shown
View
BIN  releases/chrome-2.2.11.zip
Binary file not shown
View
BIN  releases/chrome-2.2.12.zip
Binary file not shown
View
BIN  releases/chrome-2.2.13.zip
Binary file not shown
View
BIN  releases/chrome-2.2.14.zip
Binary file not shown
View
BIN  releases/chrome-2.2.15.zip
Binary file not shown
View
BIN  releases/chrome-2.2.16.zip
Binary file not shown
View
BIN  releases/chrome-2.2.17.zip
Binary file not shown
View
BIN  releases/chrome-2.2.18.zip
Binary file not shown
View
BIN  releases/chrome-2.2.19.zip
Binary file not shown
View
BIN  releases/chrome-2.2.20.zip
Binary file not shown
View
BIN  releases/chrome-2.2.21.zip
Binary file not shown
View
BIN  releases/chrome-2.2.22.zip
Binary file not shown
View
BIN  releases/chrome-2.2.3.zip
Binary file not shown
View
BIN  releases/chrome-2.2.4.zip
Binary file not shown
View
BIN  releases/chrome-2.2.5.zip
Binary file not shown
View
BIN  releases/chrome-2.2.6.zip
Binary file not shown
View
BIN  releases/chrome-2.2.7.zip
Binary file not shown
View
BIN  releases/chrome-2.2.8.zip
Binary file not shown
View
BIN  releases/chrome-2.2.9.zip
Binary file not shown
View
BIN  releases/chrome-2.3.1.zip
Binary file not shown
View
BIN  releases/chrome-2.3.2.zip
Binary file not shown
View
BIN  releases/chrome-2.3.3.zip
Binary file not shown
View
BIN  releases/chrome-2.3.4.zip
Binary file not shown
View
BIN  releases/chrome-2.3.5.zip
Binary file not shown
View
BIN  releases/chrome-2.3.6.zip
Binary file not shown
View
BIN  releases/chrome-2.3.7.zip
Binary file not shown
View
BIN  releases/chrome-2.3.zip
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.