├── README.md ├── _locales ├── de │ └── messages.json ├── en │ └── messages.json └── es │ └── messages.json ├── docs-32.png ├── drawings-32.png ├── drive_icon.png ├── forms-32.png ├── icon.png ├── icons ├── suite_128.png ├── suite_16.png ├── suite_38.png └── suite_48.png ├── index.html ├── manifest.json ├── options.html ├── options.js ├── popup.js ├── presentations-32.png ├── spreadsheets-32.png └── styles.css /README.md: -------------------------------------------------------------------------------- 1 | Google Docs Quick Create 2 | ======================== 3 | 4 | Simple Chrome Extension for creating new documents in Google Drive 5 | 6 | Available in the Chrome Web Store at https://chrome.google.com/webstore/detail/google-docs-quick-create/bldgenmjegcnjebiongilahhcjldgmlm 7 | -------------------------------------------------------------------------------- /_locales/de/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": { 3 | "message": "Google Docs Quick Create" 4 | }, 5 | "description": { 6 | "message": "Erstelle neue Google Drive Dokumente direkt aus der Browser Leiste." 7 | }, 8 | "new_doc": { 9 | "message": "Neues Dokument" 10 | }, 11 | "new_sheet": { 12 | "message": "Neue Tabelle" 13 | }, 14 | "new_prez": { 15 | "message": "Neue Präsentation" 16 | }, 17 | "new_draw": { 18 | "message": "Neue Zeichnung" 19 | }, 20 | "new_form": { 21 | "message": "Neues Formular" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /_locales/en/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": { 3 | "message": "Google Docs Quick Create" 4 | }, 5 | "description": { 6 | "message": "Create new Documents for Google Drive from your browser bar." 7 | }, 8 | "new_doc": { 9 | "message": "New Document" 10 | }, 11 | "new_sheet": { 12 | "message": "New Spreadsheet" 13 | }, 14 | "new_prez": { 15 | "message": "New Presentation" 16 | }, 17 | "new_draw": { 18 | "message": "New Drawing" 19 | }, 20 | "new_form": { 21 | "message": "New Form" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /_locales/es/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": { 3 | "message": "Crear Rápida para Google Docs" 4 | }, 5 | "description": { 6 | "message": "Crear nuevos documentos para Google Drive usando la barra del navegador." 7 | }, 8 | "new_doc": { 9 | "message": "Nuevo Documento" 10 | }, 11 | "new_sheet": { 12 | "message": "Nueva Hoja de Cálculo" 13 | }, 14 | "new_prez": { 15 | "message": "Nueva Presentación" 16 | }, 17 | "new_draw": { 18 | "message": "Nuevo Dibujo" 19 | }, 20 | "new_form": { 21 | "message": "Nuevo Formulario" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /docs-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmihal/Google-Docs-Quick-Create/a57830f6afcef6377a493996efaec9557aeef55d/docs-32.png -------------------------------------------------------------------------------- /drawings-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmihal/Google-Docs-Quick-Create/a57830f6afcef6377a493996efaec9557aeef55d/drawings-32.png -------------------------------------------------------------------------------- /drive_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmihal/Google-Docs-Quick-Create/a57830f6afcef6377a493996efaec9557aeef55d/drive_icon.png -------------------------------------------------------------------------------- /forms-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmihal/Google-Docs-Quick-Create/a57830f6afcef6377a493996efaec9557aeef55d/forms-32.png -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmihal/Google-Docs-Quick-Create/a57830f6afcef6377a493996efaec9557aeef55d/icon.png -------------------------------------------------------------------------------- /icons/suite_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmihal/Google-Docs-Quick-Create/a57830f6afcef6377a493996efaec9557aeef55d/icons/suite_128.png -------------------------------------------------------------------------------- /icons/suite_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmihal/Google-Docs-Quick-Create/a57830f6afcef6377a493996efaec9557aeef55d/icons/suite_16.png -------------------------------------------------------------------------------- /icons/suite_38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmihal/Google-Docs-Quick-Create/a57830f6afcef6377a493996efaec9557aeef55d/icons/suite_38.png -------------------------------------------------------------------------------- /icons/suite_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmihal/Google-Docs-Quick-Create/a57830f6afcef6377a493996efaec9557aeef55d/icons/suite_48.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Google Docs Quick Launch 6 | 7 | 8 | 9 | 10 | 11 | 53 |
54 |
55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "name" : "__MSG_title__", 4 | "version": "0.1.6", 5 | "description": "__MSG_description__", 6 | "default_locale": "en", 7 | 8 | "browser_action": { 9 | "default_popup": "index.html", 10 | "default_icon": "icons/suite_38.png" 11 | }, 12 | "permissions": [ 13 | "storage" 14 | ], 15 | "options_page": "options.html", 16 | "icons": { 17 | "128": "icons/suite_128.png", 18 | "48": "icons/suite_48.png", 19 | "16": "icons/suite_16.png" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /options.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Google Docs Quick Create Settings 5 | 6 | 7 |
8 | 12 |
13 |
14 | 18 |
19 | 20 |
21 |
22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /options.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | var radios = document.querySelectorAll('input[name=acct_type]'); 3 | var domain_field = document.querySelector('#txt_domain'); 4 | var apps_radio = null; 5 | 6 | // Add event listeners to radio buttons 7 | for (var i = 0; i < radios.length; i++) { 8 | var radio = radios[i]; 9 | radio.addEventListener('change', function(e){ 10 | domain_field.disabled = !apps_radio.checked; 11 | form_changed_event(); 12 | }); 13 | if (radio.value == 'apps'){ 14 | apps_radio = radio; 15 | } 16 | }; 17 | 18 | // Set up event listener to store domain 19 | var form_changed_event = function(){ 20 | var isApps = apps_radio.checked && domain_field.validity.valid; 21 | var domain = isApps ? domain_field.value : null; 22 | chrome.storage.sync.set({'apps_domain': domain}, function() { 23 | // Settings saved 24 | }); 25 | }; 26 | domain_field.addEventListener('change', form_changed_event); 27 | 28 | // Prefill form values 29 | chrome.storage.sync.get('apps_domain', function(values){ 30 | if (values.apps_domain){ 31 | apps_radio.checked = true; 32 | domain_field.disabled = false; 33 | domain_field.value = values.apps_domain; 34 | } 35 | }); 36 | })(); 37 | -------------------------------------------------------------------------------- /popup.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | var apps_urls = { 3 | doc: "https://docs.google.com/a/??/document/create", 4 | sheet: "https://docs.google.com/a/??/spreadsheet/ccc?new", 5 | prez: "https://docs.google.com/a/??/presentation/create", 6 | draw: "https://docs.google.com/a/??/drawings/create", 7 | form: "https://docs.google.com/a/??/forms/create" 8 | }; 9 | 10 | chrome.storage.sync.get('apps_domain', function(values){ 11 | if (values.apps_domain){ 12 | for (var link_id in apps_urls){ 13 | var url = apps_urls[link_id].replace("??", values.apps_domain); 14 | document.getElementById(link_id).firstElementChild.href = url; 15 | } 16 | document.getElementById('status').innerText = `Using the ${values.apps_domain} domain`; 17 | } 18 | }); 19 | 20 | for (var link_id in apps_urls) { 21 | var localLabel = chrome.i18n.getMessage("new_" + link_id); 22 | document.querySelector(`#${link_id} .label`).innerText = localLabel; 23 | } 24 | })(); 25 | -------------------------------------------------------------------------------- /presentations-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmihal/Google-Docs-Quick-Create/a57830f6afcef6377a493996efaec9557aeef55d/presentations-32.png -------------------------------------------------------------------------------- /spreadsheets-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmihal/Google-Docs-Quick-Create/a57830f6afcef6377a493996efaec9557aeef55d/spreadsheets-32.png -------------------------------------------------------------------------------- /styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: Arial, sans-serif; 3 | color: #555; 4 | margin: 0px; 5 | background-color: #FDFDFD; 6 | } 7 | 8 | .btns { 9 | display: block; 10 | width: 200px; 11 | margin: 0; 12 | padding: 0; 13 | } 14 | 15 | .btns li { 16 | margin: 0; 17 | padding: 0; 18 | list-style-type: none; 19 | } 20 | 21 | .btns li:not(:last-of-type) { 22 | border-bottom: 1px solid #f5f5f5; 23 | } 24 | 25 | .btns li a { 26 | display: block; 27 | padding: 0 5px; 28 | font-size: 14px; 29 | line-height: 40px; 30 | color: #444; 31 | text-decoration: none; 32 | outline: 0; 33 | } 34 | 35 | .btns li a img { 36 | float: left; 37 | position: relative; 38 | top: 3px; 39 | margin-right: 5px; 40 | } 41 | 42 | .btns li a:hover { 43 | background-color: #f5f5f5; 44 | } 45 | 46 | #status { 47 | background: #F5F5F5; 48 | text-align: center; 49 | padding: 0 5px; 50 | line-height: 25px; 51 | } 52 | --------------------------------------------------------------------------------