From 0f46218b222c01aeb12239a640b9bc76d3c2cc48 Mon Sep 17 00:00:00 2001 From: benweet Date: Sun, 2 Feb 2014 22:01:17 +0000 Subject: [PATCH] Release v3.1.6 --- bower.json | 2 +- package.json | 2 +- public/cache.manifest | 2 +- public/res-min/main.js | 108 +++++++++++++++++++----------- public/res-min/themes/default.css | 1 + public/res-min/themes/gray.css | 1 + public/res-min/themes/night.css | 1 + public/res-min/themes/school.css | 1 + public/res/constants.js | 2 +- 9 files changed, 77 insertions(+), 43 deletions(-) diff --git a/bower.json b/bower.json index 186d884d..7718f72a 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "stackedit", - "version": "3.1.5", + "version": "3.1.6", "description": "StackEdit is a free, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites.", "dependencies": { "bootstrap": "v3.0.0", diff --git a/package.json b/package.json index d400d71f..002b0927 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stackedit", - "version": "3.1.5", + "version": "3.1.6", "private": true, "description": "StackEdit is a free, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites.", "main": "res/main.js", diff --git a/public/cache.manifest b/public/cache.manifest index 8a459160..a6664404 100644 --- a/public/cache.manifest +++ b/public/cache.manifest @@ -1,5 +1,5 @@ CACHE MANIFEST -#Date Sun Feb 02 2014 21:53:00 +#Date Sun Feb 02 2014 22:01:16 CACHE: res/worker.js diff --git a/public/res-min/main.js b/public/res-min/main.js index f7927ac4..3be24fc8 100644 --- a/public/res-min/main.js +++ b/public/res-min/main.js @@ -11520,7 +11520,7 @@ function printStackTrace(e) { return e; }), define("constants", [], function() { var e = {}; - return e.VERSION = "3.1.5", e.MAIN_URL = "https://stackedit.io/", e.GOOGLE_ANALYTICS_ACCOUNT_ID = "UA-39556145-1", + return e.VERSION = "3.1.6", e.MAIN_URL = "https://stackedit.io/", e.GOOGLE_ANALYTICS_ACCOUNT_ID = "UA-39556145-1", e.GOOGLE_API_KEY = "AIzaSyAeCU8CGcSkn0z9js6iocHuPBX4f_mMWkw", e.GOOGLE_DRIVE_APP_ID = "241271498917", e.DROPBOX_APP_KEY = "lq6mwopab8wskas", e.DROPBOX_APP_SECRET = "851fgnucpezy84t", e.DROPBOX_RESTRICTED_APP_KEY = "sw0hlixhr8q1xk0", e.DROPBOX_RESTRICTED_APP_SECRET = "1r808p2xygs6lbg", @@ -13582,7 +13582,7 @@ var saveAs = saveAs || "undefined" != typeof navigator && navigator.msSaveOrOpen }, utils.trim = function(e) { return $.trim(e); }; - var nonWordChars = XRegExp("[^\\p{L}-]", "g"); + var nonWordChars = XRegExp("[^\\p{L}\\p{N}-]", "g"); utils.slugify = function(e) { return e.toLowerCase().replace(/\s/g, "-").replace(nonWordChars, "").replace(/\-\-+/g, "-").replace(/^-+/, "").replace(/-+$/, ""); }, utils.checkUrl = function(e, t) { @@ -20419,8 +20419,24 @@ function() { }, a.onError = function(e) { !t.isString(e) && e.message && _gaq.push([ "_trackEvent", "Error", "message", e.message + i.formatEventList() ]); }, a; +}), define("extensions/twitter", [ "jquery", "underscore", "constants", "utils", "classes/Extension" ], function(e, t, n, i, o) { + var r = new o("twitter", "Twitter", !1, !0), s = !1, a = !1, l = function() { + s === !1 && a === !1 && e.ajax({ + url: "http://platform.twitter.com/widgets.js", + dataType: "script" + }).done(function() { + s = !0; + }); + }; + return r.onReady = function() { + l(); + }, r.onOfflineChanged = function(e) { + a = e, l(); + }, r.onTweet = function() { + s && window.twttr.widgets.load(); + }, r; }), define("text!html/dialogAbout.html", [], function() { - return '\n'; + return '\n'; }), define("extensions/dialogAbout", [ "underscore", "constants", "utils", "classes/Extension", "text!html/dialogAbout.html" ], function(e, t, n, i, o) { var r = new i("dialogAbout", 'Dialog "About"'), s = { ACE: "http://ace.c9.io/", @@ -20538,25 +20554,32 @@ function() { u = e(t.querySelectorAll(".msg-no-sync")); }, r; }), define("text!html/dialogManageSharingLocation.html", [], function() { - return '
\n \n
\n'; + return '
\n \n
\n
\n \n
\n'; }), define("extensions/dialogManageSharing", [ "jquery", "underscore", "classes/Extension", "text!html/dialogManageSharingLocation.html" ], function(e, t, n, i) { - var o, r, s, a, l = new n("dialogManageSharing", 'Button "Share"', !1, !0), c = function(e) { - if (void 0 === e || e === o) { - var n = t.reduce(o.publishLocations, function(e, n) { + var o, r = new n("dialogManageSharing", 'Button "Share"', !1, !0); + r.onEventMgrCreated = function(e) { + o = e; + }; + var s, a, l, c, u = function(e) { + if (void 0 === e || e === s) { + var n = t.reduce(s.publishLocations, function(e, n) { return n.sharingLink && (e += t.template(i, { - link: n.sharingLink + link: n.sharingLink, + title: s.title })), e; }, ""); - r.innerHTML = n, s.toggleClass("hide", 0 === n.length), a.toggleClass("hide", 0 !== n.length); + a.innerHTML = n, o.onTweet(), l.toggleClass("hide", 0 === n.length), c.toggleClass("hide", 0 !== n.length); } }; - return l.onFileSelected = function(e) { - o = e, c(e); - }, l.onNewPublishSuccess = c, l.onPublishRemoved = c, l.onReady = function() { + return r.onFileSelected = function(e) { + s = e, u(e); + }, r.onNewPublishSuccess = function(t, n) { + u(t), n.sharingLink && (e(".modal").modal("hide"), e(".modal-manage-sharing").modal("show")); + }, r.onPublishRemoved = u, r.onReady = function() { var t = document.querySelector(".modal-manage-sharing"); - r = t.querySelector(".share-list"), s = e(t.querySelectorAll(".msg-share-list")), - a = e(t.querySelectorAll(".msg-no-share")); - }, l; + a = t.querySelector(".share-list"), l = e(t.querySelectorAll(".msg-share-list")), + c = e(t.querySelectorAll(".msg-no-share")); + }, r; }), function() { var e = this, t = {}, n = !1; "undefined" != typeof module && module.exports ? (module.exports = t, e.toMarkdown = t, @@ -22982,8 +23005,10 @@ function() { return t || e.Tour; }; }(this)), define("extensions/welcomeTour", [ "underscore", "jquery", "storage", "classes/Extension", "bootstrap-tour" ], function(e, t, n, i, o) { - var r = new i("welcomeTour", "Welcome tour", !1, !0); - return r.onReady = function() { + var r, s = new i("welcomeTour", "Welcome tour", !1, !0); + return s.onEventMgrCreated = function(e) { + r = e; + }, s.onReady = function() { var i = new o({ keyboard: !1, storage: { @@ -23046,12 +23071,15 @@ function() { }, { element: ".navbar-inner", title: "Happy StackWriting!", - content: [ 'Enjoy, and don\'t forget to rate StackEdit on Chrome Web Store...' ].join(""), - placement: "bottom" + content: [ '

Enjoy, and don\'t forget to rate StackEdit on Chrome Web Store...

', '' ].join(""), + placement: "bottom", + onShown: function() { + r.onTweet(); + } } ]), e.has(n, "welcomeTour") || i.start(), t(".action-welcome-tour").click(function() { i.restart(); }); - }, r; + }, s; }), define("text!bower-libs/Typo.js/typo/typo.js", [], function() { return '\'use strict\';\n\n/**\n * Typo is a JavaScript implementation of a spellchecker using hunspell-style \n * dictionaries.\n */\n\n/**\n * Typo constructor.\n *\n * @param {String} [dictionary] The locale code of the dictionary being used. e.g.,\n * "en_US". This is only used to auto-load dictionaries.\n * @param {String} [affData] The data from the dictionary\'s .aff file. If omitted\n * and the first argument is supplied, in "chrome" platform,\n * the .aff file will be loaded automatically from\n * lib/typo/dictionaries/[dictionary]/[dictionary].aff\n * In other platform, it will be loaded from\n * [setting.path]/dictionaries/[dictionary]/[dictionary].aff\n * @param {String} [wordsData] The data from the dictionary\'s .dic file. If omitted,\n * and the first argument is supplied, in "chrome" platform,\n * the .dic file will be loaded automatically from\n * lib/typo/dictionaries/[dictionary]/[dictionary].dic\n * In other platform, it will be loaded from\n * [setting.path]/dictionaries/[dictionary]/[dictionary].dic\n * @param {Object} [settings] Constructor settings. Available properties are:\n * {String} [platform]: "chrome" for Chrome Extension or other\n * value for the usual web.\n * {String} [path]: path to load dictionary from in non-chrome\n * environment.\n * {Object} [flags]: flag information.\n *\n *\n * @returns {Typo} A Typo object.\n */\n\nvar Typo = function (dictionary, affData, wordsData, settings) {\n settings = settings || {};\n \n /** Determines the method used for auto-loading .aff and .dic files. **/\n this.platform = settings.platform || "chrome"; \n \n this.dictionary = null;\n \n this.rules = {};\n this.dictionaryTable = {};\n \n this.compoundRules = [];\n this.compoundRuleCodes = {};\n \n this.replacementTable = [];\n \n this.flags = settings.flags || {}; \n \n if (dictionary) {\n this.dictionary = dictionary;\n \n if (this.platform == "chrome") {\n if (!affData) affData = this._readFile(chrome.extension.getURL("lib/typo/dictionaries/" + dictionary + "/" + dictionary + ".aff"));\n if (!wordsData) wordsData = this._readFile(chrome.extension.getURL("lib/typo/dictionaries/" + dictionary + "/" + dictionary + ".dic"));\n } else {\n var path = settings.dictionaryPath || \'\';\n \n if (!affData) affData = this._readFile(path + "/" + dictionary + "/" + dictionary + ".aff");\n if (!wordsData) wordsData = this._readFile(path + "/" + dictionary + "/" + dictionary + ".dic");\n }\n \n this.rules = this._parseAFF(affData);\n \n // Save the rule codes that are used in compound rules.\n this.compoundRuleCodes = {};\n \n for (var i = 0, _len = this.compoundRules.length; i < _len; i++) {\n var rule = this.compoundRules[i];\n \n for (var j = 0, _jlen = rule.length; j < _jlen; j++) {\n this.compoundRuleCodes[rule[j]] = [];\n }\n }\n \n // If we add this ONLYINCOMPOUND flag to this.compoundRuleCodes, then _parseDIC\n // will do the work of saving the list of words that are compound-only.\n if ("ONLYINCOMPOUND" in this.flags) {\n this.compoundRuleCodes[this.flags.ONLYINCOMPOUND] = [];\n }\n \n this.dictionaryTable = this._parseDIC(wordsData);\n \n // Get rid of any codes from the compound rule codes that are never used \n // (or that were special regex characters). Not especially necessary... \n for (var i in this.compoundRuleCodes) {\n if (this.compoundRuleCodes[i].length == 0) {\n delete this.compoundRuleCodes[i];\n }\n }\n \n // Build the full regular expressions for each compound rule.\n // I have a feeling (but no confirmation yet) that this method of \n // testing for compound words is probably slow.\n for (var i = 0, _len = this.compoundRules.length; i < _len; i++) {\n var ruleText = this.compoundRules[i];\n \n var expressionText = "";\n \n for (var j = 0, _jlen = ruleText.length; j < _jlen; j++) {\n var character = ruleText[j];\n \n if (character in this.compoundRuleCodes) {\n expressionText += "(" + this.compoundRuleCodes[character].join("|") + ")";\n }\n else {\n expressionText += character;\n }\n }\n \n this.compoundRules[i] = new RegExp(expressionText, "i");\n }\n }\n \n return this;\n};\n\nTypo.prototype = {\n /**\n * Loads a Typo instance from a hash of all of the Typo properties.\n *\n * @param object obj A hash of Typo properties, probably gotten from a JSON.parse(JSON.stringify(typo_instance)).\n */\n \n load : function (obj) {\n for (var i in obj) {\n this[i] = obj[i];\n }\n \n return this;\n },\n \n /**\n * Read the contents of a file.\n * \n * @param {String} path The path (relative) to the file.\n * @param {String} [charset="ISO8859-1"] The expected charset of the file\n * @returns string The file data.\n */\n \n _readFile : function (path, charset) {\n if (!charset) charset = "ISO8859-1";\n \n var req = new XMLHttpRequest();\n req.open("GET", path, false);\n \n if (req.overrideMimeType)\n req.overrideMimeType("text/plain; charset=" + charset);\n \n req.send(null);\n \n return req.responseText;\n },\n \n /**\n * Parse the rules out from a .aff file.\n *\n * @param {String} data The contents of the affix file.\n * @returns object The rules from the file.\n */\n \n _parseAFF : function (data) {\n var rules = {};\n \n // Remove comment lines\n data = this._removeAffixComments(data);\n \n var lines = data.split("\\n");\n \n for (var i = 0, _len = lines.length; i < _len; i++) {\n var line = lines[i];\n \n var definitionParts = line.split(/\\s+/);\n \n var ruleType = definitionParts[0];\n \n if (ruleType == "PFX" || ruleType == "SFX") {\n var ruleCode = definitionParts[1];\n var combineable = definitionParts[2];\n var numEntries = parseInt(definitionParts[3], 10);\n \n var entries = [];\n \n for (var j = i + 1, _jlen = i + 1 + numEntries; j < _jlen; j++) {\n var line = lines[j];\n \n var lineParts = line.split(/\\s+/);\n var charactersToRemove = lineParts[2];\n \n var additionParts = lineParts[3].split("/");\n \n var charactersToAdd = additionParts[0];\n if (charactersToAdd === "0") charactersToAdd = "";\n \n var continuationClasses = this.parseRuleCodes(additionParts[1]);\n \n var regexToMatch = lineParts[4];\n \n var entry = {};\n entry.add = charactersToAdd;\n \n if (continuationClasses.length > 0) entry.continuationClasses = continuationClasses;\n \n if (regexToMatch !== ".") {\n if (ruleType === "SFX") {\n entry.match = new RegExp(regexToMatch + "$");\n }\n else {\n entry.match = new RegExp("^" + regexToMatch);\n }\n }\n \n if (charactersToRemove != "0") {\n if (ruleType === "SFX") {\n entry.remove = new RegExp(charactersToRemove + "$");\n }\n else {\n entry.remove = charactersToRemove;\n }\n }\n \n entries.push(entry);\n }\n \n rules[ruleCode] = { "type" : ruleType, "combineable" : (combineable == "Y"), "entries" : entries };\n \n i += numEntries;\n }\n else if (ruleType === "COMPOUNDRULE") {\n var numEntries = parseInt(definitionParts[1], 10);\n \n for (var j = i + 1, _jlen = i + 1 + numEntries; j < _jlen; j++) {\n var line = lines[j];\n \n var lineParts = line.split(/\\s+/);\n this.compoundRules.push(lineParts[1]);\n }\n \n i += numEntries;\n }\n else if (ruleType === "REP") {\n var lineParts = line.split(/\\s+/);\n \n if (lineParts.length === 3) {\n this.replacementTable.push([ lineParts[1], lineParts[2] ]);\n }\n }\n else {\n // ONLYINCOMPOUND\n // COMPOUNDMIN\n // FLAG\n // KEEPCASE\n // NEEDAFFIX\n \n this.flags[ruleType] = definitionParts[1];\n }\n }\n \n return rules;\n },\n \n /**\n * Removes comment lines and then cleans up blank lines and trailing whitespace.\n *\n * @param {String} data The data from an affix file.\n * @return {String} The cleaned-up data.\n */\n \n _removeAffixComments : function (data) {\n // Remove comments\n data = data.replace(/#.*$/mg, "");\n \n // Trim each line\n data = data.replace(/^\\s\\s*/m, \'\').replace(/\\s\\s*$/m, \'\');\n \n // Remove blank lines.\n data = data.replace(/\\n{2,}/g, "\\n");\n \n // Trim the entire string\n data = data.replace(/^\\s\\s*/, \'\').replace(/\\s\\s*$/, \'\');\n \n return data;\n },\n \n /**\n * Parses the words out from the .dic file.\n *\n * @param {String} data The data from the dictionary file.\n * @returns object The lookup table containing all of the words and\n * word forms from the dictionary.\n */\n \n _parseDIC : function (data) {\n data = this._removeDicComments(data);\n \n var lines = data.split("\\n");\n var dictionaryTable = {};\n \n function addWord(word, rules) {\n // Some dictionaries will list the same word multiple times with different rule sets.\n if (!(word in dictionaryTable) || typeof dictionaryTable[word] != \'object\') {\n dictionaryTable[word] = [];\n }\n \n dictionaryTable[word].push(rules);\n }\n \n // The first line is the number of words in the dictionary.\n for (var i = 1, _len = lines.length; i < _len; i++) {\n var line = lines[i];\n \n var parts = line.split("/", 2);\n \n var word = parts[0];\n\n // Now for each affix rule, generate that form of the word.\n if (parts.length > 1) {\n var ruleCodesArray = this.parseRuleCodes(parts[1]);\n \n // Save the ruleCodes for compound word situations.\n if (!("NEEDAFFIX" in this.flags) || ruleCodesArray.indexOf(this.flags.NEEDAFFIX) == -1) {\n addWord(word, ruleCodesArray);\n }\n \n for (var j = 0, _jlen = ruleCodesArray.length; j < _jlen; j++) {\n var code = ruleCodesArray[j];\n \n var rule = this.rules[code];\n \n if (rule) {\n var newWords = this._applyRule(word, rule);\n \n for (var ii = 0, _iilen = newWords.length; ii < _iilen; ii++) {\n var newWord = newWords[ii];\n \n addWord(newWord, []);\n \n if (rule.combineable) {\n for (var k = j + 1; k < _jlen; k++) {\n var combineCode = ruleCodesArray[k];\n \n var combineRule = this.rules[combineCode];\n \n if (combineRule) {\n if (combineRule.combineable && (rule.type != combineRule.type)) {\n var otherNewWords = this._applyRule(newWord, combineRule);\n \n for (var iii = 0, _iiilen = otherNewWords.length; iii < _iiilen; iii++) {\n var otherNewWord = otherNewWords[iii];\n addWord(otherNewWord, []);\n }\n }\n }\n }\n }\n }\n }\n \n if (code in this.compoundRuleCodes) {\n this.compoundRuleCodes[code].push(word);\n }\n }\n }\n else {\n addWord(word, []);\n }\n }\n \n return dictionaryTable;\n },\n \n \n /**\n * Removes comment lines and then cleans up blank lines and trailing whitespace.\n *\n * @param {String} data The data from a .dic file.\n * @return {String} The cleaned-up data.\n */\n \n _removeDicComments : function (data) {\n // I can\'t find any official documentation on it, but at least the de_DE\n // dictionary uses tab-indented lines as comments.\n \n // Remove comments\n data = data.replace(/^\\t.*$/mg, "");\n \n return data;\n \n // Trim each line\n data = data.replace(/^\\s\\s*/m, \'\').replace(/\\s\\s*$/m, \'\');\n \n // Remove blank lines.\n data = data.replace(/\\n{2,}/g, "\\n");\n \n // Trim the entire string\n data = data.replace(/^\\s\\s*/, \'\').replace(/\\s\\s*$/, \'\');\n \n return data;\n },\n \n parseRuleCodes : function (textCodes) {\n if (!textCodes) {\n return [];\n }\n else if (!("FLAG" in this.flags)) {\n return textCodes.split("");\n }\n else if (this.flags.FLAG === "long") {\n var flags = [];\n \n for (var i = 0, _len = textCodes.length; i < _len; i += 2) {\n flags.push(textCodes.substr(i, 2));\n }\n \n return flags;\n }\n else if (this.flags.FLAG === "num") {\n return textCode.split(",");\n }\n },\n \n /**\n * Applies an affix rule to a word.\n *\n * @param {String} word The base word.\n * @param {Object} rule The affix rule.\n * @returns {String[]} The new words generated by the rule.\n */\n \n _applyRule : function (word, rule) {\n var entries = rule.entries;\n var newWords = [];\n \n for (var i = 0, _len = entries.length; i < _len; i++) {\n var entry = entries[i];\n \n if (!entry.match || word.match(entry.match)) {\n var newWord = word;\n \n if (entry.remove) {\n newWord = newWord.replace(entry.remove, "");\n }\n \n if (rule.type === "SFX") {\n newWord = newWord + entry.add;\n }\n else {\n newWord = entry.add + newWord;\n }\n \n newWords.push(newWord);\n \n if ("continuationClasses" in entry) {\n for (var j = 0, _jlen = entry.continuationClasses.length; j < _jlen; j++) {\n var continuationRule = this.rules[entry.continuationClasses[j]];\n \n if (continuationRule) {\n newWords = newWords.concat(this._applyRule(newWord, continuationRule));\n }\n /*\n else {\n // This shouldn\'t happen, but it does, at least in the de_DE dictionary.\n // I think the author mistakenly supplied lower-case rule codes instead \n // of upper-case.\n }\n */\n }\n }\n }\n }\n \n return newWords;\n },\n \n /**\n * Checks whether a word or a capitalization variant exists in the current dictionary.\n * The word is trimmed and several variations of capitalizations are checked.\n * If you want to check a word without any changes made to it, call checkExact()\n *\n * @see http://blog.stevenlevithan.com/archives/faster-trim-javascript re:trimming function\n *\n * @param {String} aWord The word to check.\n * @returns {Boolean}\n */\n \n check : function (aWord) {\n // Remove leading and trailing whitespace\n var trimmedWord = aWord.replace(/^\\s\\s*/, \'\').replace(/\\s\\s*$/, \'\');\n \n if (this.checkExact(trimmedWord)) {\n return true;\n }\n \n // The exact word is not in the dictionary.\n if (trimmedWord.toUpperCase() === trimmedWord) {\n // The word was supplied in all uppercase.\n // Check for a capitalized form of the word.\n var capitalizedWord = trimmedWord[0] + trimmedWord.substring(1).toLowerCase();\n \n if (this.hasFlag(capitalizedWord, "KEEPCASE")) {\n // Capitalization variants are not allowed for this word.\n return false;\n }\n \n if (this.checkExact(capitalizedWord)) {\n return true;\n }\n }\n \n var lowercaseWord = trimmedWord.toLowerCase();\n \n if (lowercaseWord !== trimmedWord) {\n if (this.hasFlag(lowercaseWord, "KEEPCASE")) {\n // Capitalization variants are not allowed for this word.\n return false;\n }\n \n // Check for a lowercase form\n if (this.checkExact(lowercaseWord)) {\n return true;\n }\n }\n \n return false;\n },\n \n /**\n * Checks whether a word exists in the current dictionary.\n *\n * @param {String} word The word to check.\n * @returns {Boolean}\n */\n \n checkExact : function (word) {\n var ruleCodes = this.dictionaryTable[word];\n \n if (typeof ruleCodes === \'undefined\') {\n // Check if this might be a compound word.\n if ("COMPOUNDMIN" in this.flags && word.length >= this.flags.COMPOUNDMIN) {\n for (var i = 0, _len = this.compoundRules.length; i < _len; i++) {\n if (word.match(this.compoundRules[i])) {\n return true;\n }\n }\n }\n \n return false;\n }\n else {\n for (var i = 0, _len = ruleCodes.length; i < _len; i++) {\n if (!this.hasFlag(word, "ONLYINCOMPOUND", ruleCodes[i])) {\n return true;\n }\n }\n \n return false;\n }\n },\n \n /**\n * Looks up whether a given word is flagged with a given flag.\n *\n * @param {String} word The word in question.\n * @param {String} flag The flag in question.\n * @return {Boolean}\n */\n \n hasFlag : function (word, flag, wordFlags) {\n if (flag in this.flags) {\n if (typeof wordFlags === \'undefined\') {\n var wordFlags = Array.prototype.concat.apply([], this.dictionaryTable[word]);\n }\n \n if (wordFlags && wordFlags.indexOf(this.flags[flag]) !== -1) {\n return true;\n }\n }\n \n return false;\n },\n \n /**\n * Returns a list of suggestions for a misspelled word.\n *\n * @see http://www.norvig.com/spell-correct.html for the basis of this suggestor.\n * This suggestor is primitive, but it works.\n *\n * @param {String} word The misspelling.\n * @param {Number} [limit=5] The maximum number of suggestions to return.\n * @returns {String[]} The array of suggestions.\n */\n \n alphabet : "",\n \n suggest : function (word, limit) {\n if (!limit) limit = 5;\n \n if (this.check(word)) return [];\n \n // Check the replacement table.\n for (var i = 0, _len = this.replacementTable.length; i < _len; i++) {\n var replacementEntry = this.replacementTable[i];\n \n if (word.indexOf(replacementEntry[0]) !== -1) {\n var correctedWord = word.replace(replacementEntry[0], replacementEntry[1]);\n \n if (this.check(correctedWord)) {\n return [ correctedWord ];\n }\n }\n }\n \n var self = this;\n self.alphabet = "abcdefghijklmnopqrstuvwxyz";\n \n /*\n if (!self.alphabet) {\n // Use the alphabet as implicitly defined by the words in the dictionary.\n var alphaHash = {};\n \n for (var i in self.dictionaryTable) {\n for (var j = 0, _len = i.length; j < _len; j++) {\n alphaHash[i[j]] = true;\n }\n }\n \n for (var i in alphaHash) {\n self.alphabet += i;\n }\n \n var alphaArray = self.alphabet.split("");\n alphaArray.sort();\n self.alphabet = alphaArray.join("");\n }\n */\n \n function edits1(words) {\n var rv = [];\n \n for (var ii = 0, _iilen = words.length; ii < _iilen; ii++) {\n var word = words[ii];\n \n var splits = [];\n \n for (var i = 0, _len = word.length + 1; i < _len; i++) {\n splits.push([ word.substring(0, i), word.substring(i, word.length) ]);\n }\n \n var deletes = [];\n \n for (var i = 0, _len = splits.length; i < _len; i++) {\n var s = splits[i];\n \n if (s[1]) {\n deletes.push(s[0] + s[1].substring(1));\n }\n }\n \n var transposes = [];\n \n for (var i = 0, _len = splits.length; i < _len; i++) {\n var s = splits[i];\n \n if (s[1].length > 1) {\n transposes.push(s[0] + s[1][1] + s[1][0] + s[1].substring(2));\n }\n }\n \n var replaces = [];\n \n for (var i = 0, _len = splits.length; i < _len; i++) {\n var s = splits[i];\n \n if (s[1]) {\n for (var j = 0, _jlen = self.alphabet.length; j < _jlen; j++) {\n replaces.push(s[0] + self.alphabet[j] + s[1].substring(1));\n }\n }\n }\n \n var inserts = [];\n \n for (var i = 0, _len = splits.length; i < _len; i++) {\n var s = splits[i];\n \n if (s[1]) {\n for (var j = 0, _jlen = self.alphabet.length; j < _jlen; j++) {\n replaces.push(s[0] + self.alphabet[j] + s[1]);\n }\n }\n }\n \n rv = rv.concat(deletes);\n rv = rv.concat(transposes);\n rv = rv.concat(replaces);\n rv = rv.concat(inserts);\n }\n \n return rv;\n }\n \n function known(words) {\n var rv = [];\n \n for (var i = 0; i < words.length; i++) {\n if (self.check(words[i])) {\n rv.push(words[i]);\n }\n }\n \n return rv;\n }\n \n function correct(word) {\n // Get the edit-distance-1 and edit-distance-2 forms of this word.\n var ed1 = edits1([word]);\n var ed2 = edits1(ed1);\n \n var corrections = known(ed1).concat(known(ed2));\n \n // Sort the edits based on how many different ways they were created.\n var weighted_corrections = {};\n \n for (var i = 0, _len = corrections.length; i < _len; i++) {\n if (!(corrections[i] in weighted_corrections)) {\n weighted_corrections[corrections[i]] = 1;\n }\n else {\n weighted_corrections[corrections[i]] += 1;\n }\n }\n \n var sorted_corrections = [];\n \n for (var i in weighted_corrections) {\n sorted_corrections.push([ i, weighted_corrections[i] ]);\n }\n \n function sorter(a, b) {\n if (a[1] < b[1]) {\n return -1;\n }\n \n return 1;\n }\n \n sorted_corrections.sort(sorter).reverse();\n \n var rv = [];\n \n for (var i = 0, _len = Math.min(limit, sorted_corrections.length); i < _len; i++) {\n if (!self.hasFlag(sorted_corrections[i][0], "NOSUGGEST")) {\n rv.push(sorted_corrections[i][0]);\n }\n }\n \n return rv;\n }\n \n return correct(word);\n }\n};\n'; }), define("text!bower-libs/lz-string/libs/lz-string-1.3.3.js", [], function() { @@ -23208,7 +23236,7 @@ function() { }); }); }; -}(jQuery), define("jquery-waitforimages", function() {}), define("eventMgr", [ "jquery", "underscore", "crel", "utils", "logger", "classes/Extension", "settings", "text!html/settingsExtensionsAccordion.html", "extensions/yamlFrontMatterParser", "extensions/markdownSectionParser", "extensions/partialRendering", "extensions/buttonMarkdownSyntax", "extensions/googleAnalytics", "extensions/dialogAbout", "extensions/dialogManagePublication", "extensions/dialogManageSynchronization", "extensions/dialogManageSharing", "extensions/dialogOpenHarddrive", "extensions/documentTitle", "extensions/documentSelector", "extensions/documentPanel", "extensions/documentManager", "extensions/workingIndicator", "extensions/notifications", "extensions/markdownExtra", "extensions/toc", "extensions/mathJax", "extensions/emailConverter", "extensions/scrollLink", "extensions/buttonFocusMode", "extensions/buttonSync", "extensions/buttonPublish", "extensions/buttonStat", "extensions/buttonHtmlCode", "extensions/buttonViewer", "extensions/welcomeTour", "extensions/spellCheck", "extensions/userCustom", "bootstrap", "jquery-waitforimages" ], function(e, t, n, i, o, r, s, a) { +}(jQuery), define("jquery-waitforimages", function() {}), define("eventMgr", [ "jquery", "underscore", "crel", "utils", "logger", "classes/Extension", "settings", "text!html/settingsExtensionsAccordion.html", "extensions/yamlFrontMatterParser", "extensions/markdownSectionParser", "extensions/partialRendering", "extensions/buttonMarkdownSyntax", "extensions/googleAnalytics", "extensions/twitter", "extensions/dialogAbout", "extensions/dialogManagePublication", "extensions/dialogManageSynchronization", "extensions/dialogManageSharing", "extensions/dialogOpenHarddrive", "extensions/documentTitle", "extensions/documentSelector", "extensions/documentPanel", "extensions/documentManager", "extensions/workingIndicator", "extensions/notifications", "extensions/markdownExtra", "extensions/toc", "extensions/mathJax", "extensions/emailConverter", "extensions/scrollLink", "extensions/buttonFocusMode", "extensions/buttonSync", "extensions/buttonPublish", "extensions/buttonStat", "extensions/buttonHtmlCode", "extensions/buttonViewer", "extensions/welcomeTour", "extensions/spellCheck", "extensions/userCustom", "bootstrap", "jquery-waitforimages" ], function(e, t, n, i, o, r, s, a) { function l(e) { return t.chain(h).map(function(t) { return t.enabled && t[e]; @@ -23252,6 +23280,8 @@ function() { }); }, d.onSaveSettings = function(e, n) { o.log("onSaveSettings"), t.each(h, function(o) { + if (window.lightMode === !0 && o.disableInLight === !0) return e[o.extensionId] = o.config, + void 0; var r = t.extend({}, o.defaultConfig); r.enabled = i.getInputChecked("#input-enable-extension-" + o.extensionId); var s; @@ -23269,7 +23299,7 @@ function() { u("onSyncExportSuccess"), u("onSyncRemoved"), u("onPublishRunning"), u("onPublishSuccess"), u("onNewPublishSuccess"), u("onPublishRemoved"), u("onLayoutConfigure"), u("onLayoutCreated"), u("onLayoutResize"), u("onPagedownConfigure"), u("onSectionsCreated"), u("onMarkdownTrim"), - u("onAceCreated"); + u("onAceCreated"), u("onTweet"); var g, m, v = c("onPreviewFinished"), b = l("onAsyncPreview"); d.onAsyncPreview = function() { function e(n) { @@ -29177,7 +29207,7 @@ function() { } }), T; }), define("text!WELCOME.md", [], function() { - return 'Welcome to StackEdit! {#welcome}\n=====================\n\n\nHello, I am your first Markdown document within **StackEdit**[^stackedit]. Don\'t delete me, I can be helpful. I can be recovered anyway in the `Utils` tab of the `Settings` dialog.\n\n----------\n\n\nDocuments\n---------\n\n**StackEdit** stores your documents in your browser, which means all your documents are automatically saved locally and are accessible **offline!**\n\n> **NOTE:**\n> \n> - StackEdit is accessible offline after the application has been loaded for the first time.\n> - Your local documents are not shared between different browsers or computers.\n> - Clearing your browser\'s data may **delete all your local documents!** Make sure your documents are backed up using **Google Drive** or **Dropbox** synchronization (see [ Synchronization](#synchronization) section).\n\n#### Create a document\n\nYou can create a new document by clicking the button in the navigation bar. It will switch from the current document to the new one.\n\n#### Switch to another document\n\nYou can list all your local documents and switch from one to another by clicking the button in the navigation bar.\n\n#### Rename a document\n\nYou can rename the current document by clicking the document title in the navigation bar.\n\n#### Delete a document\n\nYou can delete the current document by clicking the button in the navigation bar.\n\n#### Save a document\n\nYou can save the current document to a file using the `Save as...` sub-menu from the menu.\n\n> **Tip:** See [ Publish a document](#publish-a-document) section for a description of the different output formats.\n\n\n----------\n\n\nSynchronization\n---------------\n\n**StackEdit** can be combined with **Google Drive** and **Dropbox** to have your documents centralized in the *Cloud*. The synchronization mechanism will take care of uploading your modifications or downloading the latest version of your documents.\n\n> **NOTE:**\n> \n> - Full access to **Google Drive** or **Dropbox** is required to be able to import any document in StackEdit.\n> - Imported documents are downloaded in your browser and are not transmitted to a server.\n> - If you experience problems exporting documents to Google Drive, check and optionally disable browser extensions, such as Disconnect.\n\n#### Import a document\n\nYou can import a document from the *Cloud* by going to the `Google Drive` or the `Dropbox` sub-menu and by clicking `Import from...`. Once imported, your document will be automatically synchronized with the **Google Drive** / **Dropbox** file.\n\n#### Export a document\n\nYou can export any document by going to the `Google Drive` or the `Dropbox` sub-menu and by clicking `Export to...`. Even if your document is already synchronized with **Google Drive** or **Dropbox**, you can export it to a another location. **StackEdit** can synchronize one document with multiple locations.\n\n> **Tip:** Using **Google Drive**, you can create collaborative documents to work in real time with multiple users on the same document. Just check the box `Create a real time collaborative document` in the dialog options when exporting to Google Drive.\n\n#### Synchronize a document\n\nOnce your document is linked to a **Google Drive** or a **Dropbox** file, **StackEdit** will periodically (every 3 minutes) synchronize it by downloading/uploading any modification. Any conflict will be detected, and a local copy of your document will be created as a backup if necessary.\n\nIf you just have modified your document and you want to force the synchronization, click the button in the navigation bar.\n\n> **NOTE:** The button is disabled when you have no document to synchronize.\n\n#### Manage document synchronization\n\nSince one document can be synchronized with multiple locations, you can list and manage synchronized locations by clicking `Manage synchronization` in the menu. This will open a dialog box allowing you to add or remove synchronization links that are associated to your document.\n\n> **NOTE:** If you delete the file from **Google Drive** or from **Dropbox**, the document will no longer be synchronized with that location.\n\n----------\n\n\nPublication\n-----------\n\nOnce you are happy with your document, you can publish it on different websites directly from **StackEdit**. As for now, **StackEdit** can publish on **Blogger**, **Dropbox**, **Gist**, **GitHub**, **Google Drive**, **Tumblr**, **WordPress** and on any SSH server.\n\n#### Publish a document\n\nYou can publish your document by going to the `Publish on` sub-menu and by choosing a website. In the dialog box, you can choose the publication format:\n\n- Markdown, to publish the Markdown text on a website that can interpret it (**GitHub** for instance),\n- HTML, to publish the document converted into HTML (on a blog for instance),\n- Template, to have a full control of the output.\n\n> **NOTE:** The default template is a simple webpage wrapping your document in HTML format. You can customize it in the `Services` tab of the `Settings` dialog.\n\n#### Update a publication\n\nAfter publishing, **StackEdit** will keep your document linked to that publish location so that you can update it easily. Once you have modified your document and you want to update your publication, click on the button in the navigation bar.\n\n> **NOTE:** The button is disabled when the document has not been published yet.\n\n#### Manage document publication\n\nSince one document can be published on multiple locations, you can list and manage publish locations by clicking `Manage publication` in the menu. This will open a dialog box allowing you to remove publication links that are associated to your document.\n\n> **NOTE:** In some cases, if the file has been removed from the website or the blog, the document will no longer be published on that location.\n\n----------\n\n\nMarkdown Extra\n--------------\n\n**StackEdit** supports **Markdown Extra**, which extends **Markdown** syntax with some nice features.\n\n> **Tip:** You can disable any **Markdown Extra** feature in the `Extensions` tab of the `Settings` dialog.\n\n\n### Tables\n\n**Markdown Extra** has a special syntax for tables:\n\nItem | Value\n--------- | -----\nComputer | \\$1600\nPhone | \\$12\nPipe | \\$1\n\nYou can specify column alignment with one or two colons:\n\n| Item | Value | Qty |\n| :-------- | ------:| :--: |\n| Computer | \\$1600 | 5 |\n| Phone | \\$12 | 12 |\n| Pipe | \\$1 | 234 |\n\n\n### Definition Lists\n\n**Markdown Extra** has a special syntax for definition lists too:\n\nTerm 1\nTerm 2\n: Definition A\n: Definition B\n\nTerm 3\n\n: Definition C\n\n: Definition D\n\n > part of definition D\n\n\n### Fenced code blocks\n\nGitHub\'s fenced code blocks[^gfm] are also supported with **Prettify** syntax highlighting:\n\n```\n// Foo\nvar bar = 0;\n```\n\n> **Tip:** To use **Highlight.js** instead of **Prettify**, just configure the `Markdown Extra` extension in the `Settings` dialog.\n\n\n### Footnotes\n\nYou can create footnotes like this[^footnote].\n\n [^footnote]: Here is the *text* of the **footnote**.\n\n\n### SmartyPants\n\nSmartyPants converts ASCII punctuation characters into "smart" typographic punctuation HTML entities. For example:\n\n| | ASCII | HTML |\n ------------------|------------------------------------------|-------------------------------------\n| Single backticks | `\'Isn\'t this fun?\'` | ‘Isn’t this fun?’ |\n| Quotes | `"Isn\'t this fun?"` | “Isn’t this fun?” |\n| Dashes | `-- is an en-dash and --- is an em-dash` | – is an en-dash and — is an em-dash |\n\n\n### Table of contents\n\nYou can insert a table of contents using the marker `[TOC]`:\n\n[TOC]\n\n\n### Comments\n\nUsually, comments in Markdown are just standard HTML comments. \n**StackEdit** extends HTML comments in order to produce useful, highlighted comments in the preview but not in your exported documents. \n\n\n### MathJax\n \nYou can render *LaTeX* mathematical expressions using **MathJax**, as on [math.stackexchange.com][1]:\n\nThe *Gamma function* satisfying $\\Gamma(n) = (n-1)!\\quad\\forall\nn\\in\\mathbb N$ is via the Euler integral\n\n$$\n\\Gamma(z) = \\int_0^\\infty t^{z-1}e^{-t}dt\\,.\n$$\n\n> **Tip:** Make sure you include MathJax into your publications to render mathematical expression correctly. Your page/template should include something like: \n\n```\n\n```\n\n> **NOTE:** You can find more information:\n>\n> - about **Markdown** syntax [here][2],\n> - about **Markdown Extra** extension [here][3],\n> - about **LaTeX** mathematical expressions [here][4],\n> - about **Prettify** syntax highlighting [here][5],\n> - about **Highlight.js** syntax highlighting [here][6].\n\n [^stackedit]: [StackEdit](https://stackedit.io/) is a full-featured, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites.\n\n [^gfm]: **GitHub Flavored Markdown** (GFM) is supported by StackEdit.\n\n\n [1]: http://math.stackexchange.com/\n [2]: http://daringfireball.net/projects/markdown/syntax "Markdown"\n [3]: https://github.com/jmcmanus/pagedown-extra "Pagedown Extra"\n [4]: http://meta.math.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference\n [5]: https://code.google.com/p/google-code-prettify/\n [6]: http://highlightjs.org/'; + return 'Welcome to StackEdit! {#welcome}\n=====================\n\n\nHello, I am your first Markdown document within **StackEdit**[^stackedit]. Don\'t delete me, I can be helpful. I can be recovered anyway in the `Utils` tab of the `Settings` dialog.\n\n----------\n\n\nDocuments\n---------\n\n**StackEdit** stores your documents in your browser, which means all your documents are automatically saved locally and are accessible **offline!**\n\n> **NOTE:**\n> \n> - StackEdit is accessible offline after the application has been loaded for the first time.\n> - Your local documents are not shared between different browsers or computers.\n> - Clearing your browser\'s data may **delete all your local documents!** Make sure your documents are backed up using **Google Drive** or **Dropbox** synchronization (see [ Synchronization](#synchronization) section).\n\n#### Create a document\n\nYou can create a new document by clicking the button in the navigation bar. It will switch from the current document to the new one.\n\n#### Switch to another document\n\nYou can list all your local documents and switch from one to another by clicking the button in the navigation bar.\n\n#### Rename a document\n\nYou can rename the current document by clicking the document title in the navigation bar.\n\n#### Delete a document\n\nYou can delete the current document by clicking the button in the navigation bar.\n\n#### Save a document\n\nYou can save the current document to a file using the `Save as...` sub-menu from the menu.\n\n> **Tip:** See [ Publish a document](#publish-a-document) section for a description of the different output formats.\n\n\n----------\n\n\nSynchronization\n---------------\n\n**StackEdit** can be combined with **Google Drive** and **Dropbox** to have your documents centralized in the *Cloud*. The synchronization mechanism will take care of uploading your modifications or downloading the latest version of your documents.\n\n> **NOTE:**\n> \n> - Full access to **Google Drive** or **Dropbox** is required to be able to import any document in StackEdit.\n> - Imported documents are downloaded in your browser and are not transmitted to a server.\n> - If you experience problems exporting documents to Google Drive, check and optionally disable browser extensions, such as Disconnect.\n\n#### Import a document\n\nYou can import a document from the *Cloud* by going to the `Google Drive` or the `Dropbox` sub-menu and by clicking `Import from...`. Once imported, your document will be automatically synchronized with the **Google Drive** / **Dropbox** file.\n\n#### Export a document\n\nYou can export any document by going to the `Google Drive` or the `Dropbox` sub-menu and by clicking `Export to...`. Even if your document is already synchronized with **Google Drive** or **Dropbox**, you can export it to a another location. **StackEdit** can synchronize one document with multiple locations.\n\n> **Tip:** Using **Google Drive**, you can create collaborative documents to work in real time with other users. Just check the box `Create a real time collaborative document` in the dialog options when exporting to Google Drive.\n\n#### Synchronize a document\n\nOnce your document is linked to a **Google Drive** or a **Dropbox** file, **StackEdit** will periodically (every 3 minutes) synchronize it by downloading/uploading any modification. Any conflict will be detected, and a local copy of your document will be created as a backup if necessary.\n\nIf you just have modified your document and you want to force the synchronization, click the button in the navigation bar.\n\n> **NOTE:** The button is disabled when you have no document to synchronize.\n\n#### Manage document synchronization\n\nSince one document can be synchronized with multiple locations, you can list and manage synchronized locations by clicking `Manage synchronization` in the menu. This will open a dialog box allowing you to add or remove synchronization links that are associated to your document.\n\n> **NOTE:** If you delete the file from **Google Drive** or from **Dropbox**, the document will no longer be synchronized with that location.\n\n----------\n\n\nPublication\n-----------\n\nOnce you are happy with your document, you can publish it on different websites directly from **StackEdit**. As for now, **StackEdit** can publish on **Blogger**, **Dropbox**, **Gist**, **GitHub**, **Google Drive**, **Tumblr**, **WordPress** and on any SSH server.\n\n#### Publish a document\n\nYou can publish your document by going to the `Publish on` sub-menu and by choosing a website. In the dialog box, you can choose the publication format:\n\n- Markdown, to publish the Markdown text on a website that can interpret it (**GitHub** for instance),\n- HTML, to publish the document converted into HTML (on a blog for instance),\n- Template, to have a full control of the output.\n\n> **NOTE:** The default template is a simple webpage wrapping your document in HTML format. You can customize it in the `Services` tab of the `Settings` dialog.\n\n#### Update a publication\n\nAfter publishing, **StackEdit** will keep your document linked to that publish location so that you can update it easily. Once you have modified your document and you want to update your publication, click on the button in the navigation bar.\n\n> **NOTE:** The button is disabled when the document has not been published yet.\n\n#### Manage document publication\n\nSince one document can be published on multiple locations, you can list and manage publish locations by clicking `Manage publication` in the menu. This will open a dialog box allowing you to remove publication links that are associated to your document.\n\n> **NOTE:** In some cases, if the file has been removed from the website or the blog, the document will no longer be published on that location.\n\n----------\n\n\nMarkdown Extra\n--------------\n\n**StackEdit** supports **Markdown Extra**, which extends **Markdown** syntax with some nice features.\n\n> **Tip:** You can disable any **Markdown Extra** feature in the `Extensions` tab of the `Settings` dialog.\n\n\n### Tables\n\n**Markdown Extra** has a special syntax for tables:\n\nItem | Value\n--------- | -----\nComputer | \\$1600\nPhone | \\$12\nPipe | \\$1\n\nYou can specify column alignment with one or two colons:\n\n| Item | Value | Qty |\n| :-------- | ------:| :--: |\n| Computer | \\$1600 | 5 |\n| Phone | \\$12 | 12 |\n| Pipe | \\$1 | 234 |\n\n\n### Definition Lists\n\n**Markdown Extra** has a special syntax for definition lists too:\n\nTerm 1\nTerm 2\n: Definition A\n: Definition B\n\nTerm 3\n\n: Definition C\n\n: Definition D\n\n > part of definition D\n\n\n### Fenced code blocks\n\nGitHub\'s fenced code blocks[^gfm] are also supported with **Prettify** syntax highlighting:\n\n```\n// Foo\nvar bar = 0;\n```\n\n> **Tip:** To use **Highlight.js** instead of **Prettify**, just configure the `Markdown Extra` extension in the `Settings` dialog.\n\n\n### Footnotes\n\nYou can create footnotes like this[^footnote].\n\n [^footnote]: Here is the *text* of the **footnote**.\n\n\n### SmartyPants\n\nSmartyPants converts ASCII punctuation characters into "smart" typographic punctuation HTML entities. For example:\n\n| | ASCII | HTML |\n ------------------|------------------------------------------|-------------------------------------\n| Single backticks | `\'Isn\'t this fun?\'` | ‘Isn’t this fun?’ |\n| Quotes | `"Isn\'t this fun?"` | “Isn’t this fun?” |\n| Dashes | `-- is an en-dash and --- is an em-dash` | – is an en-dash and — is an em-dash |\n\n\n### Table of contents\n\nYou can insert a table of contents using the marker `[TOC]`:\n\n[TOC]\n\n\n### Comments\n\nUsually, comments in Markdown are just standard HTML comments. \n**StackEdit** extends HTML comments in order to produce useful, highlighted comments in the preview but not in your exported documents. \n\n\n### MathJax\n \nYou can render *LaTeX* mathematical expressions using **MathJax**, as on [math.stackexchange.com][1]:\n\nThe *Gamma function* satisfying $\\Gamma(n) = (n-1)!\\quad\\forall\nn\\in\\mathbb N$ is via the Euler integral\n\n$$\n\\Gamma(z) = \\int_0^\\infty t^{z-1}e^{-t}dt\\,.\n$$\n\n> **Tip:** Make sure you include MathJax into your publications to render mathematical expression correctly. Your page/template should include something like: \n\n```\n\n```\n\n> **NOTE:** You can find more information:\n>\n> - about **Markdown** syntax [here][2],\n> - about **Markdown Extra** extension [here][3],\n> - about **LaTeX** mathematical expressions [here][4],\n> - about **Prettify** syntax highlighting [here][5],\n> - about **Highlight.js** syntax highlighting [here][6].\n\n [^stackedit]: [StackEdit](https://stackedit.io/) is a full-featured, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites.\n\n [^gfm]: **GitHub Flavored Markdown** (GFM) is supported by StackEdit.\n\n\n [1]: http://math.stackexchange.com/\n [2]: http://daringfireball.net/projects/markdown/syntax "Markdown"\n [3]: https://github.com/jmcmanus/pagedown-extra "Pagedown Extra"\n [4]: http://meta.math.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference\n [5]: https://code.google.com/p/google-code-prettify/\n [6]: http://highlightjs.org/'; }), define("fileMgr", [ "jquery", "underscore", "constants", "core", "utils", "storage", "settings", "eventMgr", "fileSystem", "classes/FileDescriptor", "text!WELCOME.md" ], function(e, t, n, i, o, r, s, a, l, c, u) { var d = {}; d.currentFile = void 0, d.selectFile = function(o) { @@ -30336,24 +30366,24 @@ function() { }, "folder", b); }); var s = e("#input-sync-export-" + h + "-realtime"), y = e("#input-sync-export-" + h + "-fileid"); - e("#input-sync-export-" + h + "-realtime").change(function() { + if (e("#input-sync-export-" + h + "-realtime").change(function() { y.prop("disabled", s.prop("checked")); - }); - var w = i.retrieveIgnoreError(h + ".state"); - if (void 0 !== w && w.userId == o[b + ".userId"]) if (o.removeItem(h + ".state"), - "create" == w.action) u.upload(void 0, w.folderId, n.GDRIVE_DEFAULT_FILE_TITLE, a.defaultContent, void 0, void 0, b, function(e, t) { - if (!e) { - var n = m(t.id, t.etag, t.content, t.title), i = {}; - i[n.syncIndex] = n; - var o = c.createFile(t.title, t.content, i); - c.selectFile(o), l.onMessage('"' + t.title + '" created successfully on ' + p + "."); + }), !(f >= a.gdriveMultiAccount)) { + var w = i.retrieveIgnoreError(h + ".state"), x = o[b + ".userId"]; + if (!(void 0 === w || x && w.userId != x)) if (o.removeItem(h + ".state"), "create" == w.action) u.upload(void 0, w.folderId, n.GDRIVE_DEFAULT_FILE_TITLE, a.defaultContent, void 0, void 0, b, function(e, t) { + if (!e) { + var n = m(t.id, t.etag, t.content, t.title), i = {}; + i[n.syncIndex] = n; + var o = c.createFile(t.title, t.content, i); + c.selectFile(o), l.onMessage('"' + t.title + '" created successfully on ' + p + "."); + } + }); else if ("open" == w.action) { + var C = []; + t.each(w.ids, function(e) { + var t = g(e), n = c.getFileFromSyncIndex(t); + void 0 !== n ? n !== c.currentFile && c.selectFile(n) : C.push(e); + }), v(C); } - }); else if ("open" == w.action) { - var x = []; - t.each(w.ids, function(e) { - var t = g(e), n = c.getFileFromSyncIndex(t); - void 0 !== n ? n !== c.currentFile && c.selectFile(n) : x.push(e); - }), v(x); } }), y; }; diff --git a/public/res-min/themes/default.css b/public/res-min/themes/default.css index 82e169a2..98ebf5ee 100644 --- a/public/res-min/themes/default.css +++ b/public/res-min/themes/default.css @@ -1547,6 +1547,7 @@ input[type="file"]{line-height:inherit;height:inherit;border:none !important} .drop-zone{border:2px dashed #bbb;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;padding:40px;text-align:center;font-size:24px;color:#bbb} .modal-import-harddrive-html textarea{width:530px;max-width:530px;height:120px} .label.comment{white-space:inherit} +.sharing-tweet{float:left;margin:5px 10px 0 0} .popover{max-width:350px;padding:15px;-webkit-box-shadow:0 5px 30px rgba(0,0,0,0.175);box-shadow:0 5px 30px rgba(0,0,0,0.175)}.popover .popover-title{font-weight:500;font-size:24px;padding:10px 15px} .popover .icon-lock{font-size:38px;margin:5px} .popover .disabled{display:none} diff --git a/public/res-min/themes/gray.css b/public/res-min/themes/gray.css index c15e9160..a1a86278 100644 --- a/public/res-min/themes/gray.css +++ b/public/res-min/themes/gray.css @@ -1547,6 +1547,7 @@ input[type="file"]{line-height:inherit;height:inherit;border:none !important} .drop-zone{border:2px dashed #bbb;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;padding:40px;text-align:center;font-size:24px;color:#bbb} .modal-import-harddrive-html textarea{width:530px;max-width:530px;height:120px} .label.comment{white-space:inherit} +.sharing-tweet{float:left;margin:5px 10px 0 0} .popover{max-width:350px;padding:15px;-webkit-box-shadow:0 5px 30px rgba(0,0,0,0.175);box-shadow:0 5px 30px rgba(0,0,0,0.175)}.popover .popover-title{font-weight:500;font-size:24px;padding:10px 15px} .popover .icon-lock{font-size:38px;margin:5px} .popover .disabled{display:none} diff --git a/public/res-min/themes/night.css b/public/res-min/themes/night.css index 0761f78f..ee0de8d0 100644 --- a/public/res-min/themes/night.css +++ b/public/res-min/themes/night.css @@ -1547,6 +1547,7 @@ input[type="file"]{line-height:inherit;height:inherit;border:none !important} .drop-zone{border:2px dashed #bbb;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;padding:40px;text-align:center;font-size:24px;color:#bbb} .modal-import-harddrive-html textarea{width:530px;max-width:530px;height:120px} .label.comment{white-space:inherit} +.sharing-tweet{float:left;margin:5px 10px 0 0} .popover{max-width:350px;padding:15px;-webkit-box-shadow:0 5px 30px rgba(0,0,0,0.175);box-shadow:0 5px 30px rgba(0,0,0,0.175)}.popover .popover-title{font-weight:500;font-size:24px;padding:10px 15px} .popover .icon-lock{font-size:38px;margin:5px} .popover .disabled{display:none} diff --git a/public/res-min/themes/school.css b/public/res-min/themes/school.css index ef24fe0e..973ee51a 100644 --- a/public/res-min/themes/school.css +++ b/public/res-min/themes/school.css @@ -1547,6 +1547,7 @@ input[type="file"]{line-height:inherit;height:inherit;border:none !important} .drop-zone{border:2px dashed #bbb;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;padding:40px;text-align:center;font-size:24px;color:#bbb} .modal-import-harddrive-html textarea{width:530px;max-width:530px;height:120px} .label.comment{white-space:inherit} +.sharing-tweet{float:left;margin:5px 10px 0 0} .popover{max-width:350px;padding:15px;-webkit-box-shadow:0 5px 30px rgba(0,0,0,0.175);box-shadow:0 5px 30px rgba(0,0,0,0.175)}.popover .popover-title{font-weight:500;font-size:24px;padding:10px 15px} .popover .icon-lock{font-size:38px;margin:5px} .popover .disabled{display:none} diff --git a/public/res/constants.js b/public/res/constants.js index cb3a1c80..6287ebd7 100644 --- a/public/res/constants.js +++ b/public/res/constants.js @@ -1,6 +1,6 @@ define([], function() { var constants = {}; - constants.VERSION = "3.1.5"; + constants.VERSION = "3.1.6"; constants.MAIN_URL = "https://stackedit.io/"; constants.GOOGLE_ANALYTICS_ACCOUNT_ID = "UA-39556145-1";