Skip to content

Commit

Permalink
change file download type to html fixes #51
Browse files Browse the repository at this point in the history
  • Loading branch information
buggyj committed Nov 19, 2019
1 parent 4cc0ffe commit c88559a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions extension/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ chrome.runtime.onMessage.addListener(function(msg, sender, sendResponse) {


function dodownload (msg,tiddlywikilocations){
var objUrl = URL.createObjectURL(new Blob([msg.txt], {type: 'text/plain'}));
var objUrl = URL.createObjectURL(new Blob([msg.txt], {type: 'text/html'}));
chrome.downloads.download({
url: objUrl,
filename: tiddlywikilocations+$["/"]+ msg.path,
Expand Down Expand Up @@ -80,7 +80,7 @@ function dodownload (msg,tiddlywikilocations){
}
// remember we backedup on this filepath
newvals.backedup[msg.path] = true;
objUrlBkup = URL.createObjectURL(new Blob([msg.txt], {type: 'text/plain'}));
objUrlBkup = URL.createObjectURL(new Blob([msg.txt], {type: 'text/html'}));
chrome.downloads.download({
url: objUrlBkup,
filename: tiddlywikilocations+$["/"]+items.backupdir+$["/"]+msg.path.replace(new RegExp('.{' + msg.path.lastIndexOf(".") + '}'), '$&' + bkdate),
Expand Down Expand Up @@ -164,7 +164,7 @@ function dodownload (msg,tiddlywikilocations){
console.log("savetiddlersbg: start save the file manually");
var path = msg.filePath.split($["/"]);
path = path[path.length-1];
var objUrl = URL.createObjectURL(new Blob([msg.txt], {type: 'text/plain'}));
var objUrl = URL.createObjectURL(new Blob([msg.txt], {type: 'text/html'}));
chrome.downloads.download({
url: objUrl,
filename: tiddlywikilocations+$["/"]+path,
Expand Down
2 changes: 1 addition & 1 deletion extension/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Save Tiddlers",
"version": "0.10",
"version": "0.11",
"manifest_version": 2,
"applications": {
"gecko": {
Expand Down

0 comments on commit c88559a

Please sign in to comment.