diff --git a/controls.html b/controls.html index 5070ae6..abc5b2d 100644 --- a/controls.html +++ b/controls.html @@ -146,11 +146,10 @@ colorpalette.style.display = "none"; } -function newfile() { - chrome.tabs.create({url:"./new.html"}, function(tab2) { +function newFile() { + chrome.tabs.create({url:"./new.html",selected:false}, function(tab2) { chrome.tabs.sendRequest(tab2.id, {edit:true,askName:true}, function(r) { - if(!r.ok) console.log("iDoc communication error"); - localStorage['iDoc-'+r.name] = ' '; + if(!r.ok) console.log('iDoc communication error.'); }); }); } @@ -185,14 +184,14 @@ table { width:100%; background-color: #ebeff9; display: none; } table td { text-align: center; } - +
- +
Cut
diff --git a/idoc.js b/idoc.js index 3c99672..3bbeafe 100644 --- a/idoc.js +++ b/idoc.js @@ -5,13 +5,10 @@ var name = ''; var procol = document.location.protocol; -if(procol == 'http:') - name = document.URL.substring(7); -else if(procol == 'file:') - name = document.URL.substring(8); +if (procol == 'http:') name = document.URL.substring(7); +else if(procol == 'file:') name = document.URL.substring(8); // 1. You have to learn to listen! -if(chrome.extension) chrome.extension.onRequest.addListener( function( request, sender, sendResponse ) { if(request.edit == true) { @@ -100,7 +97,8 @@ chrome.extension.onRequest.addListener( } else sendResponse({}); - }); + } +); // 2. Wiring things up inside the DOM forest. function insertNodeAtSelection(win, insertNode) { diff --git a/manifest.json b/manifest.json index 06f04cd..139bf82 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name": "iDoc", - "version": "0.995", + "version": "0.996", "description": "The Internet In-Page Editor. Edit any web page freely and save them.", "icons": { "48": "pen48.png", diff --git a/new.html b/new.html index c77d8dc..e131a28 100644 --- a/new.html +++ b/new.html @@ -1,6 +1,6 @@ -New File +New File

Title

Content, etc.

diff --git a/options.html b/options.html index 47b5440..88070d8 100644 --- a/options.html +++ b/options.html @@ -44,7 +44,7 @@ font-family: monospace; font-weight: bold; margin-left: 10%; - margin-bottom: 10px; + margin-top: 10px; font-size: 2em; } h2 { @@ -232,8 +232,6 @@ function init() { var folders = []; var inTable = ''; - //var inTable = '
\nNew File'; var uiFs = document.getElementById('fs'); // Show a table of current files. if(localStorage.length >= 0) { @@ -281,7 +279,6 @@

Drafts File System

Preview

-