Skip to content
Browse files

fix new document link & temperary disable presentation link

  • Loading branch information...
1 parent f1ea4db commit 6dc6c88127caf44332359cf2d38ae886a501752d @linjunpop committed Apr 3, 2012
Showing with 31 additions and 30 deletions.
  1. +5 −5 README.markdown
  2. +1 −1 manifest.json
  3. +1 −1 pages/popup.html
  4. +24 −23 scripts/application.js
View
10 README.markdown
@@ -7,11 +7,11 @@ A google chrome extension to create new Google Doc with only two clicks.
Avaliable types:
- * Document
- * Spreadsheet
- * Presentation
- * Drawing
- * Table
+* Document
+* Spreadsheet
+* Presentation (Temperary disabled on version 1.0.7)
+* Drawing
+* Table
Install
---
View
2 manifest.json
@@ -1,6 +1,6 @@
{
"name": "G New Doc",
- "version": "1.0.6",
+ "version": "1.0.7",
"description": "Create new Google Doc with ONLY TWO CLICKS",
"icons": {
"16": "images/icon16.png",
View
2 pages/popup.html
@@ -7,7 +7,7 @@
<ul id="links">
<li id="document" class="link" onClick="newDoc('document')">Document</li>
<li id="spreadsheet" class="link" onClick="newDoc('spreadsheet')">Spreadsheet</li>
- <li id="presentation" class="link" onClick="newDoc('presentation')">Presentation</li>
+ <!--<li id="presentation" class="link" onClick="newDoc('presentation')">Presentation</li>-->
<li id="drawing" class="link" onClick="newDoc('drawing')">Drawing</li>
<li id="table" class="link" onClick="newDoc('table')">Table</li>
<li id="all_items" class="link" onClick="loadURL('https://docs.google.com/#all')">All Items</li>
View
47 scripts/application.js
@@ -1,28 +1,29 @@
function newDoc(type) {
- if (type == 'document') {
- url = 'http://docs.google.com/?action=newdoc';
- }
- else if (type == 'spreadsheet') {
- url = 'http://spreadsheets.google.com/ccc?new';
- }
- else if (type == 'presentation') {
- url = 'http://docs.google.com/?action=new_presentation';
- }
- else if (type == 'drawing') {
- url = 'https://docs.google.com/drawings/create';
- }
- else if (type == 'table') {
- url = 'https://www.google.com/fusiontables/DataSource?dsrcid=implicit';
- }
+ if (type == 'document') {
+ url = 'https://docs.google.com/document/d/new';
+ }
+ else if (type == 'spreadsheet') {
+ url = 'http://spreadsheets.google.com/ccc?new';
+ }
+ else if (type == 'presentation') {
+ // FIXME
+ //url = 'http://docs.google.com/?action=new_presentation';
+ }
+ else if (type == 'drawing') {
+ url = 'https://docs.google.com/drawings/create';
+ }
+ else if (type == 'table') {
+ url = 'https://www.google.com/fusiontables/DataSource?dsrcid=implicit';
+ }
- loadURL(url);
- }
+ loadURL(url);
+}
function loadURL(url) {
- chrome.tabs.create(
- {'url': url},
- function(tab) {
- // Tab opened.
- }
- );
+ chrome.tabs.create(
+ {'url': url},
+ function(tab) {
+ // Tab opened.
+ }
+ );
}

0 comments on commit 6dc6c88

Please sign in to comment.
Something went wrong with that request. Please try again.