├── src
├── coffee
│ ├── chrome_oauth_receiver.coffee
│ ├── dropbox_chrome.coffee
│ ├── options.coffee
│ ├── options_view.coffee
│ ├── download_controller.coffee
│ ├── upload_controller.coffee
│ ├── dropship_file.coffee
│ ├── popup.coffee
│ ├── event_page.coffee
│ └── dropship_list.coffee
├── images
│ ├── icon128.png
│ ├── icon16.png
│ ├── icon48.png
│ ├── icon64.png
│ ├── action19.png
│ ├── action38.png
│ ├── store_icon128.png
│ └── icon.svg
├── font
│ └── SourceSansPro
│ │ ├── SourceSansPro-Bold.ttf
│ │ ├── SourceSansPro-Black.ttf
│ │ ├── SourceSansPro-Italic.ttf
│ │ ├── SourceSansPro-Light.ttf
│ │ ├── SourceSansPro-Regular.ttf
│ │ ├── SourceSansPro-Semibold.ttf
│ │ ├── SourceSansPro-BlackItalic.ttf
│ │ ├── SourceSansPro-BoldItalic.ttf
│ │ ├── SourceSansPro-ExtraLight.ttf
│ │ ├── SourceSansPro-LightItalic.ttf
│ │ ├── SourceSansPro-SemiboldItalic.ttf
│ │ ├── SourceSansPro-ExtraLightItalic.ttf
│ │ └── OFL.txt
├── html
│ ├── chrome_oauth_receiver.html
│ ├── options.html
│ └── popup.html
├── manifest.json
└── less
│ ├── _fonts.less
│ ├── options.less
│ └── popup.less
├── .gitignore
├── package.json
├── LICENSE.txt
├── README.md
└── Cakefile
/src/coffee/chrome_oauth_receiver.coffee:
--------------------------------------------------------------------------------
1 | Dropbox.AuthDriver.ChromeExtension.oauthReceiver()
2 |
--------------------------------------------------------------------------------
/src/images/icon128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pwnall/dropship-chrome/HEAD/src/images/icon128.png
--------------------------------------------------------------------------------
/src/images/icon16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pwnall/dropship-chrome/HEAD/src/images/icon16.png
--------------------------------------------------------------------------------
/src/images/icon48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pwnall/dropship-chrome/HEAD/src/images/icon48.png
--------------------------------------------------------------------------------
/src/images/icon64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pwnall/dropship-chrome/HEAD/src/images/icon64.png
--------------------------------------------------------------------------------
/src/images/action19.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pwnall/dropship-chrome/HEAD/src/images/action19.png
--------------------------------------------------------------------------------
/src/images/action38.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pwnall/dropship-chrome/HEAD/src/images/action38.png
--------------------------------------------------------------------------------
/src/images/store_icon128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pwnall/dropship-chrome/HEAD/src/images/store_icon128.png
--------------------------------------------------------------------------------
/src/font/SourceSansPro/SourceSansPro-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pwnall/dropship-chrome/HEAD/src/font/SourceSansPro/SourceSansPro-Bold.ttf
--------------------------------------------------------------------------------
/src/font/SourceSansPro/SourceSansPro-Black.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pwnall/dropship-chrome/HEAD/src/font/SourceSansPro/SourceSansPro-Black.ttf
--------------------------------------------------------------------------------
/src/font/SourceSansPro/SourceSansPro-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pwnall/dropship-chrome/HEAD/src/font/SourceSansPro/SourceSansPro-Italic.ttf
--------------------------------------------------------------------------------
/src/font/SourceSansPro/SourceSansPro-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pwnall/dropship-chrome/HEAD/src/font/SourceSansPro/SourceSansPro-Light.ttf
--------------------------------------------------------------------------------
/src/font/SourceSansPro/SourceSansPro-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pwnall/dropship-chrome/HEAD/src/font/SourceSansPro/SourceSansPro-Regular.ttf
--------------------------------------------------------------------------------
/src/font/SourceSansPro/SourceSansPro-Semibold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pwnall/dropship-chrome/HEAD/src/font/SourceSansPro/SourceSansPro-Semibold.ttf
--------------------------------------------------------------------------------
/src/font/SourceSansPro/SourceSansPro-BlackItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pwnall/dropship-chrome/HEAD/src/font/SourceSansPro/SourceSansPro-BlackItalic.ttf
--------------------------------------------------------------------------------
/src/font/SourceSansPro/SourceSansPro-BoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pwnall/dropship-chrome/HEAD/src/font/SourceSansPro/SourceSansPro-BoldItalic.ttf
--------------------------------------------------------------------------------
/src/font/SourceSansPro/SourceSansPro-ExtraLight.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pwnall/dropship-chrome/HEAD/src/font/SourceSansPro/SourceSansPro-ExtraLight.ttf
--------------------------------------------------------------------------------
/src/font/SourceSansPro/SourceSansPro-LightItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pwnall/dropship-chrome/HEAD/src/font/SourceSansPro/SourceSansPro-LightItalic.ttf
--------------------------------------------------------------------------------
/src/font/SourceSansPro/SourceSansPro-SemiboldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pwnall/dropship-chrome/HEAD/src/font/SourceSansPro/SourceSansPro-SemiboldItalic.ttf
--------------------------------------------------------------------------------
/src/font/SourceSansPro/SourceSansPro-ExtraLightItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pwnall/dropship-chrome/HEAD/src/font/SourceSansPro/SourceSansPro-ExtraLightItalic.ttf
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Vim.
2 | *.swp
3 |
4 | # OSX
5 | .DS_Store
6 |
7 | # Npm modules.
8 | node_modules
9 |
10 | # Vendored libraries.
11 | vendor
12 |
13 | # Build output.
14 | build
15 | release
16 | dropship-chrome.zip
17 |
--------------------------------------------------------------------------------
/src/images/icon.svg:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/src/html/chrome_oauth_receiver.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
7 |
8 |
9 | Dropbox sign-in successful
10 |
11 | Please close this window.
12 |
13 |
14 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "dropship-chrome",
3 | "version": "0.1.9",
4 | "description": "Chrome extension for downloading files straight to Dropbox",
5 | "keywords": ["dropbox", "download"],
6 | "homepage": "http://github.com/pwnall/dropship-chrome",
7 | "author": "Victor Costan (http://www.costan.us)",
8 | "license": "MIT",
9 | "repository": {
10 | "type": "git",
11 | "url": "https://github.com/pwnall/dropship-chrome.git"
12 | },
13 | "engines": {
14 | "chrome": ">= 33"
15 | },
16 | "devDependencies": {
17 | "async": ">= 0.9.0",
18 | "codo": ">= 2.0.9",
19 | "coffee-script": ">= 1.8.0",
20 | "fs-extra": ">= 0.6.1",
21 | "glob": ">= 4.3.1",
22 | "less": ">= 2.1.1",
23 | "remove": ">= 0.1.5",
24 | "uglify-js": ">= 2.4.15",
25 | "watch": ">= 0.8.0"
26 | },
27 | "directories": {
28 | "doc": "doc",
29 | "src": "src",
30 | "test": "test"
31 | },
32 | "scripts": {
33 | "test": "cake test"
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012 Victor Costan
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of
4 | this software and associated documentation files (the "Software"), to deal in
5 | the Software without restriction, including without limitation the rights to
6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7 | of the Software, and to permit persons to whom the Software is furnished to do
8 | so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | SOFTWARE.
20 |
--------------------------------------------------------------------------------
/src/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC//8zp1SEjDzv5kjK1Gs7Ld5VDldSiL17aAUa5x6vKWdagoulAI3OwVLa3oiAqfjKivhE7b/A2NX4WEeVV6x+c14WP41k4+yr46Wuk7UgDhNi6fCS+Th7Kt1icuDlKE9QinoDaxpnkF68dvWUySRR79XwXQxzHfxePXDrnPGLvnQIDAQAB",
3 | "name": "Download to Dropbox",
4 | "version": "0.1.9",
5 | "manifest_version": 2,
6 | "description": "Conveniently download straight into your Dropbox account",
7 | "icons": {
8 | "16": "images/icon16.png",
9 | "48": "images/icon48.png",
10 | "128": "images/icon128.png"
11 | },
12 | "browser_action": {
13 | "default_icon": {
14 | "19": "images/action19.png",
15 | "38": "images/action38.png"
16 | },
17 | "default_title": "Starting..."
18 | },
19 | "minimum_chrome_version": "24",
20 | "permissions": [
21 | "",
22 |
23 | "chrome://favicon/",
24 | "contextMenus",
25 | "notifications",
26 | "storage",
27 | "unlimitedStorage"
28 | ],
29 | "optional_permissions": [
30 | ],
31 | "background": {
32 | "scripts": [
33 | "vendor/js/dropbox.js",
34 | "vendor/js/humanize.js",
35 | "vendor/js/uri.js",
36 | "js/dropbox_chrome.js",
37 | "js/download_controller.js",
38 | "js/dropship_file.js",
39 | "js/dropship_list.js",
40 | "js/options.js",
41 | "js/upload_controller.js",
42 | "js/event_page.js"
43 | ],
44 | "persistent": false
45 | },
46 | "options_page": "html/options.html",
47 | "web_accessible_resources": [
48 | "html/chrome_oauth_receiver.html",
49 | "images/icon16.png",
50 | "images/icon48.png",
51 | "images/icon64.png",
52 | "images/icon128.png"
53 | ],
54 | "incognito": "split"
55 | }
56 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Sample dropbox.js Chrome Extension
2 |
3 | This is a demonstration of using dropbox.js, the client library for the Dropbox
4 | API, inside a Google Chrome browser extension.
5 |
6 | Try out the extension by installing it from the
7 | [Google Chrome Store](https://chrome.google.com/webstore/detail/download-to-dropbox/mklccdhnpppcmbpbkaanmamjfmmefbnp).
8 |
9 | ## Development
10 |
11 | ### Dev Environment Setup
12 |
13 | Install [node.js](http://nodejs.org/#download) to get `npm` (the node
14 | package manager), then use it to install the libraries required by the build
15 | process.
16 |
17 | ```bash
18 | git clone https://github.com/pwnall/dropship-chrome.git
19 | cd dropship-chrome
20 | npm install
21 | ```
22 |
23 | ### Build
24 |
25 | Run `cake build` and ignore any deprecation warnings that might come up.
26 |
27 |
28 | ```bash
29 | cake build
30 | ```
31 |
32 | ### Install
33 |
34 | Follow the steps below to install the development version of the extension. You
35 | only need to do this once.
36 |
37 | 1. Type `chrome://extensions` in Chrome's address bar and press _Enter_.
38 | 1. Check the `Developer mode` checkbox.
39 | 1. Press the `Load unpacked extension...` button.
40 | 1. Navigate to the `build/` directory inside the extension and select it.
41 |
42 | Once the extension is installed, follow the steps below to reload it after a
43 | rebuild.
44 |
45 | 1. Right-click the Dropbox icon.
46 | 1. Select `Manage Extensions...` from the pop-up menu.
47 | 1. Click the `Reload` link under the Dropbox extension.
48 |
49 | ### Test
50 |
51 | This extension uses manual testing for now.
52 |
53 |
54 | ## Copyright and License
55 |
56 | The extension is Copyright (c) 2012 Victor Costan, and distributed under the
57 | MIT license.
58 |
--------------------------------------------------------------------------------
/src/less/_fonts.less:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'Source Sans Pro';
3 | font-style: normal;
4 | font-weight: 200;
5 | src: url('/font/SourceSansPro/SourceSansPro-ExtraLight.ttf') format('truetype');
6 | }
7 | @font-face {
8 | font-family: 'Source Sans Pro';
9 | font-style: italic;
10 | font-weight: 200;
11 | src: url('/font/SourceSansPro/SourceSansPro-ExtraLightItalic.ttf') format('truetype');
12 | }
13 | @font-face {
14 | font-family: 'Source Sans Pro';
15 | font-style: normal;
16 | font-weight: 300;
17 | src: url('/font/SourceSansPro/SourceSansPro-Light.ttf') format('truetype');
18 | }
19 | @font-face {
20 | font-family: 'Source Sans Pro';
21 | font-style: italic;
22 | font-weight: 300;
23 | src: url('/font/SourceSansPro/SourceSansPro-LightItalic.ttf') format('truetype');
24 | }
25 |
26 | @font-face {
27 | font-family: 'Source Sans Pro';
28 | font-style: normal;
29 | font-weight: 400;
30 | src: url('/font/SourceSansPro/SourceSansPro-Regular.ttf') format('truetype');
31 | }
32 | @font-face {
33 | font-family: 'Source Sans Pro';
34 | font-style: italic;
35 | font-weight: 400;
36 | src: url('/font/SourceSansPro/SourceSansPro-Italic.ttf') format('truetype');
37 | }
38 |
39 | @font-face {
40 | font-family: 'Source Sans Pro';
41 | font-style: normal;
42 | font-weight: 600;
43 | src: url('/font/SourceSansPro/SourceSansPro-Semibold.ttf') format('truetype');
44 | }
45 | @font-face {
46 | font-family: 'Source Sans Pro';
47 | font-style: italic;
48 | font-weight: 600;
49 | src: url('/font/SourceSansPro/SourceSansPro-SemiboldItalic.ttf') format('truetype');
50 | }
51 | @font-face {
52 | font-family: 'Source Sans Pro';
53 | font-style: normal;
54 | font-weight: 700;
55 | src: url('/font/SourceSansPro/SourceSansPro-Bold.ttf') format('truetype');
56 | }
57 | @font-face {
58 | font-family: 'Source Sans Pro';
59 | font-style: italic;
60 | font-weight: 700;
61 | src: url('/font/SourceSansPro/SourceSansPro-BoldItalic.ttf') format('truetype');
62 | }
63 | @font-face {
64 | font-family: 'Source Sans Pro';
65 | font-style: normal;
66 | font-weight: 800;
67 | src: url('/font/SourceSansPro/SourceSansPro-Black.ttf') format('truetype');
68 | }
69 | @font-face {
70 | font-family: 'Source Sans Pro';
71 | font-style: italic;
72 | font-weight: 800;
73 | src: url('/font/SourceSansPro/SourceSansPro-BlackItalic.ttf') format('truetype');
74 | }
75 |
--------------------------------------------------------------------------------
/src/less/options.less:
--------------------------------------------------------------------------------
1 | @import '../../vendor/less/font_awesome/font-awesome.less';
2 | @fa-font-path: "/vendor/font";
3 |
4 | @import '_fonts.less';
5 |
6 | html, body {
7 | margin: 0;
8 | padding: 0;
9 | font-family: "Source Sans Pro";
10 | font-size: 16px;
11 | font-weight: 400;
12 | line-height: 1.25;
13 |
14 | vertical-align: baseline;
15 | width: 100%;
16 | }
17 |
18 | .hidden {
19 | display: none !important;
20 | }
21 |
22 | nav {
23 | display: table-cell;
24 | -webkit-user-select: none;
25 | user-select: none;
26 | cursor: default;
27 | }
28 | section#page-container {
29 | display: table-cell;
30 | margin: 0;
31 | padding: 0 0 0 3em;
32 | }
33 |
34 |
35 | h1 {
36 | font-weight: 300;
37 | color: hsl(210deg, 60%, 50%);
38 | font-size: 20px;
39 | line-height: 1.75;
40 |
41 | padding: 0 0 0 16px;
42 | }
43 | #nav-list {
44 | list-style: none;
45 | margin: 0;
46 | padding: 0;
47 |
48 | font-size: 16px;
49 | font-weight: 300;
50 | line-height: 2;
51 | color: hsl(0deg, 0%, 33%);
52 | }
53 | .nav-list-item {
54 | margin: 0;
55 | padding: 0;
56 |
57 | &:hover {
58 | background-color: hsl(208deg, 30%, 95%);
59 | color: hsl(0, 0%, 0%);
60 | }
61 | &.current {
62 | font-weight: 400;
63 | color: hsl(0, 0%, 0%);
64 | }
65 |
66 | a, a:hover, a:focus {
67 | margin: 0;
68 | padding: 0 0 0 16px;
69 | display: block;
70 |
71 | color: inherit;
72 | text-decoration: none;
73 | }
74 | }
75 |
76 |
77 | h2 {
78 | font-weight: 600;
79 | font-size: 20px;
80 | border-bottom: 1px solid hsl(0deg, 0%, 85%);
81 | line-height: 1.75;
82 | }
83 |
84 | #download-folder-sample {
85 | display: block;
86 |
87 | margin: 0.5em 0;
88 | padding: 0.1em 0.33em;
89 | border: 1px solid hsl(0deg, 0%, 85%);
90 | border-radius: 4px;
91 | box-shadow: inset rgba(0, 0, 0, 0.1) 1px 1px 2px;
92 |
93 | font-weight: 300;
94 | font-size: 18px;
95 | line-height: 1.5;
96 | }
97 |
98 | #dropbox-info {
99 | #dropbox-signout i {
100 | color: hsl(0deg, 75%, 35%);
101 | }
102 | }
103 | #dropbox-no-info {
104 | #dropbox-no-identity {
105 | font-size: 14px;
106 | font-weight: 300px;
107 | font-style: italic;
108 | }
109 | #dropbox-signin i {
110 | color: hsl(120deg, 75%, 35%);
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/src/html/options.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Download to Dropbox
5 |
6 |
7 |
8 |
9 |
10 |
27 |
28 |
29 |
30 | Download Folder
31 |
32 |
51 |
52 |
53 |
54 | Dropbox Account
55 |
56 |
57 | You are signed into Dropbox as
58 |
59 | <>
60 |
61 |
66 |
67 |
68 |
69 | You are not signed into Dropbox
70 |
71 |
76 |
77 |
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/src/html/popup.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Download to Dropbox
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |