From ae85a242ee685161081deb2f6342c8a143ea210c Mon Sep 17 00:00:00 2001 From: benweet Date: Thu, 28 Aug 2014 00:11:08 +0100 Subject: [PATCH] Set text/plain as default MIME type --- public/res/settings.js | 2 +- public/res/storage.js | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/public/res/settings.js b/public/res/settings.js index 3d41c3fb..6580bf4b 100644 --- a/public/res/settings.js +++ b/public/res/settings.js @@ -15,7 +15,7 @@ define([ defaultContent: "\n\n\n> Written with [StackEdit](" + constants.MAIN_URL + ").", commitMsg: "Published with " + constants.MAIN_URL, conflictMode: 'merge', - markdownMimeType: 'text/x-markdown', + markdownMimeType: 'text/plain', gdriveMultiAccount: 1, gdriveFullAccess: true, dropboxFullAccess: true, diff --git a/public/res/storage.js b/public/res/storage.js index b4c5b3b9..4af5bcd2 100644 --- a/public/res/storage.js +++ b/public/res/storage.js @@ -255,6 +255,16 @@ define([ version = "v20"; } + if(version == 'v20') { + if(_.has(localStorage, 'settings')) { + settings = JSON.parse(localStorage.settings); + // Force use of text/plain + delete settings.markdownMimeType; + localStorage.settings = JSON.stringify(settings); + } + version = "v21"; + } + localStorage.version = version; return localStorage; });