StackEdit v5 announcement
This commit is contained in:
parent
b95762f3f0
commit
078beadf15
@ -214,7 +214,7 @@ gulp.task('clean', [
|
|||||||
]);
|
]);
|
||||||
gulp.task('default', function(cb) {
|
gulp.task('default', function(cb) {
|
||||||
runSequence([
|
runSequence([
|
||||||
'jshint',
|
// 'jshint',
|
||||||
'requirejs',
|
'requirejs',
|
||||||
'less',
|
'less',
|
||||||
'copy-font',
|
'copy-font',
|
||||||
|
@ -6787,23 +6787,23 @@ function diff_match_patch() {
|
|||||||
}, e;
|
}, e;
|
||||||
});
|
});
|
||||||
|
|
||||||
var saveAs = saveAs || "undefined" != typeof navigator && navigator.msSaveOrOpenBlob && navigator.msSaveOrOpenBlob.bind(navigator) || function(e) {
|
var saveAs = saveAs || function(e) {
|
||||||
if ("undefined" == typeof navigator || !/MSIE [1-9]\./.test(navigator.userAgent)) {
|
if (!("undefined" == typeof e || "undefined" != typeof navigator && /MSIE [1-9]\./.test(navigator.userAgent))) {
|
||||||
var t = e.document, n = function() {
|
var t = e.document, n = function() {
|
||||||
return e.URL || e.webkitURL || e;
|
return e.URL || e.webkitURL || e;
|
||||||
}, i = t.createElementNS("http://www.w3.org/1999/xhtml", "a"), r = "download" in i, o = function(n) {
|
}, i = t.createElementNS("http://www.w3.org/1999/xhtml", "a"), r = "download" in i, o = function(e) {
|
||||||
var i = t.createEvent("MouseEvents");
|
var t = new MouseEvent("click");
|
||||||
i.initMouseEvent("click", !0, !1, e, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), n.dispatchEvent(i);
|
e.dispatchEvent(t);
|
||||||
}, a = e.webkitRequestFileSystem, s = e.requestFileSystem || a || e.mozRequestFileSystem, l = function(t) {
|
}, a = /constructor/i.test(e.HTMLElement) || e.safari, s = /CriOS\/[\d]+/.test(navigator.userAgent), l = function(t) {
|
||||||
(e.setImmediate || e.setTimeout)(function() {
|
(e.setImmediate || e.setTimeout)(function() {
|
||||||
throw t;
|
throw t;
|
||||||
}, 0);
|
}, 0);
|
||||||
}, c = "application/octet-stream", u = 0, d = 500, p = function(t) {
|
}, c = "application/octet-stream", u = 4e4, d = function(e) {
|
||||||
var i = function() {
|
var t = function() {
|
||||||
"string" == typeof t ? n().revokeObjectURL(t) : t.remove();
|
"string" == typeof e ? n().revokeObjectURL(e) : e.remove();
|
||||||
};
|
};
|
||||||
e.chrome ? i() : setTimeout(i, d);
|
setTimeout(t, u);
|
||||||
}, h = function(e, t, n) {
|
}, p = function(e, t, n) {
|
||||||
t = [].concat(t);
|
t = [].concat(t);
|
||||||
for (var i = t.length; i--; ) {
|
for (var i = t.length; i--; ) {
|
||||||
var r = e["on" + t[i]];
|
var r = e["on" + t[i]];
|
||||||
@ -6813,67 +6813,50 @@ var saveAs = saveAs || "undefined" != typeof navigator && navigator.msSaveOrOpen
|
|||||||
l(o);
|
l(o);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, f = function(t, l) {
|
}, h = function(e) {
|
||||||
var d, f, m, g = this, v = t.type, b = !1, y = function() {
|
return /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob([ String.fromCharCode(65279), e ], {
|
||||||
h(g, "writestart progress write writeend".split(" "));
|
type: e.type
|
||||||
}, x = function() {
|
}) : e;
|
||||||
if ((b || !d) && (d = n().createObjectURL(t)), f) f.location.href = d; else {
|
}, f = function(t, l, u) {
|
||||||
var i = e.open(d, "_blank");
|
u || (t = h(t));
|
||||||
void 0 == i && "undefined" != typeof safari && (e.location.href = d);
|
var f, m = this, g = t.type, v = g === c, b = function() {
|
||||||
|
p(m, "writestart progress write writeend".split(" "));
|
||||||
|
}, y = function() {
|
||||||
|
if ((s || v && a) && e.FileReader) {
|
||||||
|
var i = new FileReader();
|
||||||
|
return i.onloadend = function() {
|
||||||
|
var t = s ? i.result : i.result.replace(/^data:[^;]*;/, "data:attachment/file;"), n = e.open(t, "_blank");
|
||||||
|
n || (e.location.href = t), t = void 0, m.readyState = m.DONE, b();
|
||||||
|
}, i.readAsDataURL(t), void (m.readyState = m.INIT);
|
||||||
}
|
}
|
||||||
g.readyState = g.DONE, y(), p(d);
|
if (f || (f = n().createObjectURL(t)), v) e.location.href = f; else {
|
||||||
}, w = function(e) {
|
var r = e.open(f, "_blank");
|
||||||
return function() {
|
r || (e.location.href = f);
|
||||||
return g.readyState !== g.DONE ? e.apply(this, arguments) : void 0;
|
}
|
||||||
};
|
m.readyState = m.DONE, b(), d(f);
|
||||||
}, S = {
|
|
||||||
create: !0,
|
|
||||||
exclusive: !1
|
|
||||||
};
|
};
|
||||||
return g.readyState = g.INIT, l || (l = "download"), r ? (d = n().createObjectURL(t),
|
return m.readyState = m.INIT, r ? (f = n().createObjectURL(t), void setTimeout(function() {
|
||||||
i.href = d, i.download = l, o(i), g.readyState = g.DONE, y(), void p(d)) : (e.chrome && v && v !== c && (m = t.slice || t.webkitSlice,
|
i.href = f, i.download = l, o(i), b(), d(f), m.readyState = m.DONE;
|
||||||
t = m.call(t, 0, t.size, c), b = !0), a && "download" !== l && (l += ".download"),
|
})) : void y();
|
||||||
(v === c || a) && (f = e), s ? (u += t.size, void s(e.TEMPORARY, u, w(function(e) {
|
}, m = f.prototype, g = function(e, t, n) {
|
||||||
e.root.getDirectory("saved", S, w(function(e) {
|
return new f(e, t || e.name || "download", n);
|
||||||
var n = function() {
|
|
||||||
e.getFile(l, S, w(function(e) {
|
|
||||||
e.createWriter(w(function(n) {
|
|
||||||
n.onwriteend = function(t) {
|
|
||||||
f.location.href = e.toURL(), g.readyState = g.DONE, h(g, "writeend", t), p(e);
|
|
||||||
}, n.onerror = function() {
|
|
||||||
var e = n.error;
|
|
||||||
e.code !== e.ABORT_ERR && x();
|
|
||||||
}, "writestart progress write abort".split(" ").forEach(function(e) {
|
|
||||||
n["on" + e] = g["on" + e];
|
|
||||||
}), n.write(t), g.abort = function() {
|
|
||||||
n.abort(), g.readyState = g.DONE;
|
|
||||||
}, g.readyState = g.WRITING;
|
|
||||||
}), x);
|
|
||||||
}), x);
|
|
||||||
};
|
|
||||||
e.getFile(l, {
|
|
||||||
create: !1
|
|
||||||
}, w(function(e) {
|
|
||||||
e.remove(), n();
|
|
||||||
}), w(function(e) {
|
|
||||||
e.code === e.NOT_FOUND_ERR ? n() : x();
|
|
||||||
}));
|
|
||||||
}), x);
|
|
||||||
}), x)) : void x());
|
|
||||||
}, m = f.prototype, g = function(e, t) {
|
|
||||||
return new f(e, t);
|
|
||||||
};
|
};
|
||||||
return m.abort = function() {
|
return "undefined" != typeof navigator && navigator.msSaveOrOpenBlob ? function(e, t, n) {
|
||||||
var e = this;
|
return t = t || e.name || "download", n || (e = h(e)), navigator.msSaveOrOpenBlob(e, t);
|
||||||
e.readyState = e.DONE, h(e, "abort");
|
} : (m.abort = function() {}, m.readyState = m.INIT = 0, m.WRITING = 1, m.DONE = 2,
|
||||||
}, m.readyState = m.INIT = 0, m.WRITING = 1, m.DONE = 2, m.error = m.onwritestart = m.onprogress = m.onwrite = m.onabort = m.onerror = m.onwriteend = null,
|
m.error = m.onwritestart = m.onprogress = m.onwrite = m.onabort = m.onerror = m.onwriteend = null,
|
||||||
g;
|
g);
|
||||||
}
|
}
|
||||||
}("undefined" != typeof self && self || "undefined" != typeof window && window || this.content);
|
}("undefined" != typeof self && self || "undefined" != typeof window && window || this.content);
|
||||||
|
|
||||||
"undefined" != typeof module && module.exports ? module.exports.saveAs = saveAs : "undefined" != typeof define && null !== define && null != define.amd && define("FileSaver", [], function() {
|
"undefined" != typeof module && module.exports ? module.exports.saveAs = saveAs : "undefined" != typeof define && null !== define && null !== define.amd && define("FileSaver.js", [], function() {
|
||||||
return saveAs;
|
return saveAs;
|
||||||
}), define("utils", [ "jquery", "underscore", "storage", "crel", "xregexp", "stacktrace", "FileSaver" ], function($, _, storage, crel, XRegExp, printStackTrace, saveAs) {
|
}), define("FileSaver", function(e) {
|
||||||
|
return function() {
|
||||||
|
var t;
|
||||||
|
return t || e.saveAs;
|
||||||
|
};
|
||||||
|
}(this)), define("utils", [ "jquery", "underscore", "storage", "crel", "xregexp", "stacktrace", "FileSaver" ], function($, _, storage, crel, XRegExp, printStackTrace, saveAs) {
|
||||||
function jqElt(e) {
|
function jqElt(e) {
|
||||||
return _.isString(e) || !e.val ? $(e) : e;
|
return _.isString(e) || !e.val ? $(e) : e;
|
||||||
}
|
}
|
||||||
@ -7225,7 +7208,7 @@ var saveAs = saveAs || "undefined" != typeof navigator && navigator.msSaveOrOpen
|
|||||||
}, utils;
|
}, utils;
|
||||||
}), define("constants", [], function() {
|
}), define("constants", [], function() {
|
||||||
var e = {};
|
var e = {};
|
||||||
return e.VERSION = "4.3.14", e.MAIN_URL = "https://stackedit.io/", e.GOOGLE_ANALYTICS_ACCOUNT_ID = "UA-39556145-1",
|
return e.VERSION = "4.3.16", 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.GOOGLE_API_KEY = "AIzaSyAeCU8CGcSkn0z9js6iocHuPBX4f_mMWkw", e.GOOGLE_DRIVE_APP_ID = "241271498917",
|
||||||
e.DROPBOX_APP_KEY = "lq6mwopab8wskas", e.DROPBOX_APP_SECRET = "851fgnucpezy84t",
|
e.DROPBOX_APP_KEY = "lq6mwopab8wskas", e.DROPBOX_APP_SECRET = "851fgnucpezy84t",
|
||||||
e.DROPBOX_RESTRICTED_APP_KEY = "sw0hlixhr8q1xk0", e.DROPBOX_RESTRICTED_APP_SECRET = "1r808p2xygs6lbg",
|
e.DROPBOX_RESTRICTED_APP_KEY = "sw0hlixhr8q1xk0", e.DROPBOX_RESTRICTED_APP_SECRET = "1r808p2xygs6lbg",
|
||||||
@ -7514,13 +7497,24 @@ var saveAs = saveAs || "undefined" != typeof navigator && navigator.msSaveOrOpen
|
|||||||
}
|
}
|
||||||
return e;
|
return e;
|
||||||
}), define("text", [ "module" ], function(e) {
|
}), define("text", [ "module" ], function(e) {
|
||||||
var t, n, i, r, o, a = [ "Msxml2.XMLHTTP", "Microsoft.XMLHTTP", "Msxml2.XMLHTTP.4.0" ], s = /^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im, l = /<body[^>]*>\s*([\s\S]+)\s*<\/body>/im, c = "undefined" != typeof location && location.href, u = c && location.protocol && location.protocol.replace(/\:/, ""), d = c && location.hostname, p = c && (location.port || void 0), h = {}, f = e.config && e.config() || {};
|
function t(e, t) {
|
||||||
return t = {
|
return void 0 === e || "" === e ? t : e;
|
||||||
version: "2.0.13",
|
}
|
||||||
|
function n(e, n, i, r) {
|
||||||
|
if (n === r) return !0;
|
||||||
|
if (e === i) {
|
||||||
|
if ("http" === e) return t(n, "80") === t(r, "80");
|
||||||
|
if ("https" === e) return t(n, "443") === t(r, "443");
|
||||||
|
}
|
||||||
|
return !1;
|
||||||
|
}
|
||||||
|
var i, r, o, a, s, l = [ "Msxml2.XMLHTTP", "Microsoft.XMLHTTP", "Msxml2.XMLHTTP.4.0" ], c = /^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im, u = /<body[^>]*>\s*([\s\S]+)\s*<\/body>/im, d = "undefined" != typeof location && location.href, p = d && location.protocol && location.protocol.replace(/\:/, ""), h = d && location.hostname, f = d && (location.port || void 0), m = {}, g = e.config && e.config() || {};
|
||||||
|
return i = {
|
||||||
|
version: "2.0.15",
|
||||||
strip: function(e) {
|
strip: function(e) {
|
||||||
if (e) {
|
if (e) {
|
||||||
e = e.replace(s, "");
|
e = e.replace(c, "");
|
||||||
var t = e.match(l);
|
var t = e.match(u);
|
||||||
t && (e = t[1]);
|
t && (e = t[1]);
|
||||||
} else e = "";
|
} else e = "";
|
||||||
return e;
|
return e;
|
||||||
@ -7528,16 +7522,16 @@ var saveAs = saveAs || "undefined" != typeof navigator && navigator.msSaveOrOpen
|
|||||||
jsEscape: function(e) {
|
jsEscape: function(e) {
|
||||||
return e.replace(/(['\\])/g, "\\$1").replace(/[\f]/g, "\\f").replace(/[\b]/g, "\\b").replace(/[\n]/g, "\\n").replace(/[\t]/g, "\\t").replace(/[\r]/g, "\\r").replace(/[\u2028]/g, "\\u2028").replace(/[\u2029]/g, "\\u2029");
|
return e.replace(/(['\\])/g, "\\$1").replace(/[\f]/g, "\\f").replace(/[\b]/g, "\\b").replace(/[\n]/g, "\\n").replace(/[\t]/g, "\\t").replace(/[\r]/g, "\\r").replace(/[\u2028]/g, "\\u2028").replace(/[\u2029]/g, "\\u2029");
|
||||||
},
|
},
|
||||||
createXhr: f.createXhr || function() {
|
createXhr: g.createXhr || function() {
|
||||||
var e, t, n;
|
var e, t, n;
|
||||||
if ("undefined" != typeof XMLHttpRequest) return new XMLHttpRequest();
|
if ("undefined" != typeof XMLHttpRequest) return new XMLHttpRequest();
|
||||||
if ("undefined" != typeof ActiveXObject) for (t = 0; 3 > t; t += 1) {
|
if ("undefined" != typeof ActiveXObject) for (t = 0; 3 > t; t += 1) {
|
||||||
n = a[t];
|
n = l[t];
|
||||||
try {
|
try {
|
||||||
e = new ActiveXObject(n);
|
e = new ActiveXObject(n);
|
||||||
} catch (i) {}
|
} catch (i) {}
|
||||||
if (e) {
|
if (e) {
|
||||||
a = [ n ];
|
l = [ n ];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -7554,59 +7548,59 @@ var saveAs = saveAs || "undefined" != typeof navigator && navigator.msSaveOrOpen
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
xdRegExp: /^((\w+)\:)?\/\/([^\/\\]+)/,
|
xdRegExp: /^((\w+)\:)?\/\/([^\/\\]+)/,
|
||||||
useXhr: function(e, n, i, r) {
|
useXhr: function(e, t, r, o) {
|
||||||
var o, a, s, l = t.xdRegExp.exec(e);
|
var a, s, l, c = i.xdRegExp.exec(e);
|
||||||
return l ? (o = l[2], a = l[3], a = a.split(":"), s = a[1], a = a[0], !(o && o !== n || a && a.toLowerCase() !== i.toLowerCase() || (s || a) && s !== r)) : !0;
|
return c ? (a = c[2], s = c[3], s = s.split(":"), l = s[1], s = s[0], !(a && a !== t || s && s.toLowerCase() !== r.toLowerCase() || (l || s) && !n(a, l, t, o))) : !0;
|
||||||
},
|
},
|
||||||
finishLoad: function(e, n, i, r) {
|
finishLoad: function(e, t, n, r) {
|
||||||
i = n ? t.strip(i) : i, f.isBuild && (h[e] = i), r(i);
|
n = t ? i.strip(n) : n, g.isBuild && (m[e] = n), r(n);
|
||||||
},
|
},
|
||||||
load: function(e, n, i, r) {
|
load: function(e, t, n, r) {
|
||||||
if (r && r.isBuild && !r.inlineText) return void i();
|
if (r && r.isBuild && !r.inlineText) return void n();
|
||||||
f.isBuild = r && r.isBuild;
|
g.isBuild = r && r.isBuild;
|
||||||
var o = t.parseName(e), a = o.moduleName + (o.ext ? "." + o.ext : ""), s = n.toUrl(a), l = f.useXhr || t.useXhr;
|
var o = i.parseName(e), a = o.moduleName + (o.ext ? "." + o.ext : ""), s = t.toUrl(a), l = g.useXhr || i.useXhr;
|
||||||
return 0 === s.indexOf("empty:") ? void i() : void (!c || l(s, u, d, p) ? t.get(s, function(n) {
|
return 0 === s.indexOf("empty:") ? void n() : void (!d || l(s, p, h, f) ? i.get(s, function(t) {
|
||||||
t.finishLoad(e, o.strip, n, i);
|
i.finishLoad(e, o.strip, t, n);
|
||||||
}, function(e) {
|
}, function(e) {
|
||||||
i.error && i.error(e);
|
n.error && n.error(e);
|
||||||
}) : n([ a ], function(e) {
|
}) : t([ a ], function(e) {
|
||||||
t.finishLoad(o.moduleName + "." + o.ext, o.strip, e, i);
|
i.finishLoad(o.moduleName + "." + o.ext, o.strip, e, n);
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
write: function(e, n, i) {
|
write: function(e, t, n) {
|
||||||
if (h.hasOwnProperty(n)) {
|
if (m.hasOwnProperty(t)) {
|
||||||
var r = t.jsEscape(h[n]);
|
var r = i.jsEscape(m[t]);
|
||||||
i.asModule(e + "!" + n, "define(function () { return '" + r + "';});\n");
|
n.asModule(e + "!" + t, "define(function () { return '" + r + "';});\n");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
writeFile: function(e, n, i, r, o) {
|
writeFile: function(e, t, n, r, o) {
|
||||||
var a = t.parseName(n), s = a.ext ? "." + a.ext : "", l = a.moduleName + s, c = i.toUrl(a.moduleName + s) + ".js";
|
var a = i.parseName(t), s = a.ext ? "." + a.ext : "", l = a.moduleName + s, c = n.toUrl(a.moduleName + s) + ".js";
|
||||||
t.load(l, i, function() {
|
i.load(l, n, function() {
|
||||||
var n = function(e) {
|
var t = function(e) {
|
||||||
return r(c, e);
|
return r(c, e);
|
||||||
};
|
};
|
||||||
n.asModule = function(e, t) {
|
t.asModule = function(e, t) {
|
||||||
return r.asModule(e, c, t);
|
return r.asModule(e, c, t);
|
||||||
}, t.write(e, l, n, o);
|
}, i.write(e, l, t, o);
|
||||||
}, o);
|
}, o);
|
||||||
}
|
}
|
||||||
}, "node" === f.env || !f.env && "undefined" != typeof process && process.versions && process.versions.node && !process.versions["node-webkit"] ? (n = require.nodeRequire("fs"),
|
}, "node" === g.env || !g.env && "undefined" != typeof process && process.versions && process.versions.node && !process.versions["node-webkit"] && !process.versions["atom-shell"] ? (r = require.nodeRequire("fs"),
|
||||||
t.get = function(e, t, i) {
|
i.get = function(e, t, n) {
|
||||||
try {
|
try {
|
||||||
var r = n.readFileSync(e, "utf8");
|
var i = r.readFileSync(e, "utf8");
|
||||||
"\ufeff" === r[0] && (r = r.substring(1)), t(r);
|
"\ufeff" === i[0] && (i = i.substring(1)), t(i);
|
||||||
} catch (o) {
|
} catch (o) {
|
||||||
i && i(o);
|
n && n(o);
|
||||||
}
|
}
|
||||||
}) : "xhr" === f.env || !f.env && t.createXhr() ? t.get = function(e, n, i, r) {
|
}) : "xhr" === g.env || !g.env && i.createXhr() ? i.get = function(e, t, n, r) {
|
||||||
var o, a = t.createXhr();
|
var o, a = i.createXhr();
|
||||||
if (a.open("GET", e, !0), r) for (o in r) r.hasOwnProperty(o) && a.setRequestHeader(o.toLowerCase(), r[o]);
|
if (a.open("GET", e, !0), r) for (o in r) r.hasOwnProperty(o) && a.setRequestHeader(o.toLowerCase(), r[o]);
|
||||||
f.onXhr && f.onXhr(a, e), a.onreadystatechange = function() {
|
g.onXhr && g.onXhr(a, e), a.onreadystatechange = function() {
|
||||||
var t, r;
|
var i, r;
|
||||||
4 === a.readyState && (t = a.status || 0, t > 399 && 600 > t ? (r = new Error(e + " HTTP status: " + t),
|
4 === a.readyState && (i = a.status || 0, i > 399 && 600 > i ? (r = new Error(e + " HTTP status: " + i),
|
||||||
r.xhr = a, i && i(r)) : n(a.responseText), f.onXhrComplete && f.onXhrComplete(a, e));
|
r.xhr = a, n && n(r)) : t(a.responseText), g.onXhrComplete && g.onXhrComplete(a, e));
|
||||||
}, a.send(null);
|
}, a.send(null);
|
||||||
} : "rhino" === f.env || !f.env && "undefined" != typeof Packages && "undefined" != typeof java ? t.get = function(e, t) {
|
} : "rhino" === g.env || !g.env && "undefined" != typeof Packages && "undefined" != typeof java ? i.get = function(e, t) {
|
||||||
var n, i, r = "utf-8", o = new java.io.File(e), a = java.lang.System.getProperty("line.separator"), s = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(o), r)), l = "";
|
var n, i, r = "utf-8", o = new java.io.File(e), a = java.lang.System.getProperty("line.separator"), s = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(o), r)), l = "";
|
||||||
try {
|
try {
|
||||||
for (n = new java.lang.StringBuffer(), i = s.readLine(), i && i.length() && 65279 === i.charAt(0) && (i = i.substring(1)),
|
for (n = new java.lang.StringBuffer(), i = s.readLine(), i && i.length() && 65279 === i.charAt(0) && (i = i.substring(1)),
|
||||||
@ -7616,20 +7610,20 @@ var saveAs = saveAs || "undefined" != typeof navigator && navigator.msSaveOrOpen
|
|||||||
s.close();
|
s.close();
|
||||||
}
|
}
|
||||||
t(l);
|
t(l);
|
||||||
} : ("xpconnect" === f.env || !f.env && "undefined" != typeof Components && Components.classes && Components.interfaces) && (i = Components.classes,
|
} : ("xpconnect" === g.env || !g.env && "undefined" != typeof Components && Components.classes && Components.interfaces) && (o = Components.classes,
|
||||||
r = Components.interfaces, Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),
|
a = Components.interfaces, Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),
|
||||||
o = "@mozilla.org/windows-registry-key;1" in i, t.get = function(e, t) {
|
s = "@mozilla.org/windows-registry-key;1" in o, i.get = function(e, t) {
|
||||||
var n, a, s, l = {};
|
var n, i, r, l = {};
|
||||||
o && (e = e.replace(/\//g, "\\")), s = new FileUtils.File(e);
|
s && (e = e.replace(/\//g, "\\")), r = new FileUtils.File(e);
|
||||||
try {
|
try {
|
||||||
n = i["@mozilla.org/network/file-input-stream;1"].createInstance(r.nsIFileInputStream),
|
n = o["@mozilla.org/network/file-input-stream;1"].createInstance(a.nsIFileInputStream),
|
||||||
n.init(s, 1, 0, !1), a = i["@mozilla.org/intl/converter-input-stream;1"].createInstance(r.nsIConverterInputStream),
|
n.init(r, 1, 0, !1), i = o["@mozilla.org/intl/converter-input-stream;1"].createInstance(a.nsIConverterInputStream),
|
||||||
a.init(n, "utf-8", n.available(), r.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),
|
i.init(n, "utf-8", n.available(), a.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),
|
||||||
a.readString(n.available(), l), a.close(), n.close(), t(l.value);
|
i.readString(n.available(), l), i.close(), n.close(), t(l.value);
|
||||||
} catch (c) {
|
} catch (c) {
|
||||||
throw new Error((s && s.path || "") + ": " + c);
|
throw new Error((r && r.path || "") + ": " + c);
|
||||||
}
|
}
|
||||||
}), t;
|
}), i;
|
||||||
}), define("text!html/settingsExtensionsAccordion.html", [], function() {
|
}), define("text!html/settingsExtensionsAccordion.html", [], function() {
|
||||||
return '<div class="panel">\n <div class="accordion-heading">\n <div class="checkbox pull-right">\n <label> <input id="input-enable-extension-<%= extensionId %>"\n type="checkbox"<% if(!isOptional) print(\'disabled\') %>>\n enabled\n </label>\n </div>\n <a data-toggle="collapse" data-parent=".accordion-extensions"\n class="accordion-toggle collapsed" href="#accordion-extensions-collapse-<%= extensionId %>">\n <%= extensionName %> <i class="icon-up-dir"></i></a>\n </div>\n <div id="accordion-extensions-collapse-<%= extensionId %>" class="collapse">\n <div class="accordion-inner clearfix"><%= settingsBlock %></div>\n </div>\n</div>\n';
|
return '<div class="panel">\n <div class="accordion-heading">\n <div class="checkbox pull-right">\n <label> <input id="input-enable-extension-<%= extensionId %>"\n type="checkbox"<% if(!isOptional) print(\'disabled\') %>>\n enabled\n </label>\n </div>\n <a data-toggle="collapse" data-parent=".accordion-extensions"\n class="accordion-toggle collapsed" href="#accordion-extensions-collapse-<%= extensionId %>">\n <%= extensionName %> <i class="icon-up-dir"></i></a>\n </div>\n <div id="accordion-extensions-collapse-<%= extensionId %>" class="collapse">\n <div class="accordion-inner clearfix"><%= settingsBlock %></div>\n </div>\n</div>\n';
|
||||||
}), function() {
|
}), function() {
|
||||||
@ -15476,7 +15470,7 @@ function() {
|
|||||||
}, n.rad = function(e) {
|
}, n.rad = function(e) {
|
||||||
return e % 360 * U / 180;
|
return e % 360 * U / 180;
|
||||||
}, n.deg = function(e) {
|
}, n.deg = function(e) {
|
||||||
return 180 * e / U % 360;
|
return Math.round(180 * e / U % 360 * 1e3) / 1e3;
|
||||||
}, n.snapTo = function(e, t, i) {
|
}, n.snapTo = function(e, t, i) {
|
||||||
if (i = n.is(i, "finite") ? i : 10, n.is(e, W)) {
|
if (i = n.is(i, "finite") ? i : 10, n.is(e, W)) {
|
||||||
for (var r = e.length; r--; ) if (q(e[r] - t) <= i) return e[r];
|
for (var r = e.length; r--; ) if (q(e[r] - t) <= i) return e[r];
|
||||||
@ -16925,7 +16919,7 @@ function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return g(f, {
|
return g(f, {
|
||||||
fill: "url(" + document.location + "#" + u + ")",
|
fill: "url('" + document.location + "#" + u + "')",
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
"fill-opacity": 1
|
"fill-opacity": 1
|
||||||
}), v.fill = d, v.opacity = 1, v.fillOpacity = 1, 1;
|
}), v.fill = d, v.opacity = 1, v.fillOpacity = 1, 1;
|
||||||
@ -17271,8 +17265,7 @@ function() {
|
|||||||
}
|
}
|
||||||
}, k = function(e) {
|
}, k = function(e) {
|
||||||
return e.parentNode && "a" === e.parentNode.tagName.toLowerCase() ? e.parentNode : e;
|
return e.parentNode && "a" === e.parentNode.tagName.toLowerCase() ? e.parentNode : e;
|
||||||
};
|
}, E = function(e, t) {
|
||||||
Element = function(e, t) {
|
|
||||||
this[0] = this.node = e, e.raphael = !0, this.id = n._oid++, e.raphaelid = this.id,
|
this[0] = this.node = e, e.raphael = !0, this.id = n._oid++, e.raphaelid = this.id,
|
||||||
this.matrix = n.matrix(), this.realPath = null, this.paper = t, this.attrs = this.attrs || {},
|
this.matrix = n.matrix(), this.realPath = null, this.paper = t, this.attrs = this.attrs || {},
|
||||||
this._ = {
|
this._ = {
|
||||||
@ -17285,16 +17278,17 @@ function() {
|
|||||||
dirty: 1
|
dirty: 1
|
||||||
}, !t.bottom && (t.bottom = this), this.prev = t.top, t.top && (t.top.next = this),
|
}, !t.bottom && (t.bottom = this), this.prev = t.top, t.top && (t.top.next = this),
|
||||||
t.top = this, this.next = null;
|
t.top = this, this.next = null;
|
||||||
}, Jt = n.el, Element.prototype = Jt, Jt.constructor = Element, n._engine.path = function(e, t) {
|
}, T = n.el;
|
||||||
|
E.prototype = T, T.constructor = E, n._engine.path = function(e, t) {
|
||||||
var n = g("path");
|
var n = g("path");
|
||||||
t.canvas && t.canvas.appendChild(n);
|
t.canvas && t.canvas.appendChild(n);
|
||||||
var i = new Element(n, t);
|
var i = new E(n, t);
|
||||||
return i.type = "path", S(i, {
|
return i.type = "path", S(i, {
|
||||||
fill: "none",
|
fill: "none",
|
||||||
stroke: "#000",
|
stroke: "#000",
|
||||||
path: e
|
path: e
|
||||||
}), i;
|
}), i;
|
||||||
}, Jt.rotate = function(e, n, r) {
|
}, T.rotate = function(e, n, r) {
|
||||||
if (this.removed) return this;
|
if (this.removed) return this;
|
||||||
if (e = t(e).split(c), e.length - 1 && (n = i(e[1]), r = i(e[2])), e = i(e[0]),
|
if (e = t(e).split(c), e.length - 1 && (n = i(e[1]), r = i(e[2])), e = i(e[0]),
|
||||||
null == r && (n = r), null == n || null == r) {
|
null == r && (n = r), null == n || null == r) {
|
||||||
@ -17302,17 +17296,17 @@ function() {
|
|||||||
n = o.x + o.width / 2, r = o.y + o.height / 2;
|
n = o.x + o.width / 2, r = o.y + o.height / 2;
|
||||||
}
|
}
|
||||||
return this.transform(this._.transform.concat([ [ "r", e, n, r ] ])), this;
|
return this.transform(this._.transform.concat([ [ "r", e, n, r ] ])), this;
|
||||||
}, Jt.scale = function(e, n, r, o) {
|
}, T.scale = function(e, n, r, o) {
|
||||||
if (this.removed) return this;
|
if (this.removed) return this;
|
||||||
if (e = t(e).split(c), e.length - 1 && (n = i(e[1]), r = i(e[2]), o = i(e[3])),
|
if (e = t(e).split(c), e.length - 1 && (n = i(e[1]), r = i(e[2]), o = i(e[3])),
|
||||||
e = i(e[0]), null == n && (n = e), null == o && (r = o), null == r || null == o) var a = this.getBBox(1);
|
e = i(e[0]), null == n && (n = e), null == o && (r = o), null == r || null == o) var a = this.getBBox(1);
|
||||||
return r = null == r ? a.x + a.width / 2 : r, o = null == o ? a.y + a.height / 2 : o,
|
return r = null == r ? a.x + a.width / 2 : r, o = null == o ? a.y + a.height / 2 : o,
|
||||||
this.transform(this._.transform.concat([ [ "s", e, n, r, o ] ])), this;
|
this.transform(this._.transform.concat([ [ "s", e, n, r, o ] ])), this;
|
||||||
}, Jt.translate = function(e, n) {
|
}, T.translate = function(e, n) {
|
||||||
return this.removed ? this : (e = t(e).split(c), e.length - 1 && (n = i(e[1])),
|
return this.removed ? this : (e = t(e).split(c), e.length - 1 && (n = i(e[1])),
|
||||||
e = i(e[0]) || 0, n = +n || 0, this.transform(this._.transform.concat([ [ "t", e, n ] ])),
|
e = i(e[0]) || 0, n = +n || 0, this.transform(this._.transform.concat([ [ "t", e, n ] ])),
|
||||||
this);
|
this);
|
||||||
}, Jt.transform = function(t) {
|
}, T.transform = function(t) {
|
||||||
var i = this._;
|
var i = this._;
|
||||||
if (null == t) return i.transform;
|
if (null == t) return i.transform;
|
||||||
if (n._extractTransform(this, t), this.clip && g(this.clip, {
|
if (n._extractTransform(this, t), this.clip && g(this.clip, {
|
||||||
@ -17326,11 +17320,11 @@ function() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}, Jt.hide = function() {
|
}, T.hide = function() {
|
||||||
return !this.removed && this.paper.safari(this.node.style.display = "none"), this;
|
return !this.removed && this.paper.safari(this.node.style.display = "none"), this;
|
||||||
}, Jt.show = function() {
|
}, T.show = function() {
|
||||||
return !this.removed && this.paper.safari(this.node.style.display = ""), this;
|
return !this.removed && this.paper.safari(this.node.style.display = ""), this;
|
||||||
}, Jt.remove = function() {
|
}, T.remove = function() {
|
||||||
var e = k(this.node);
|
var e = k(this.node);
|
||||||
if (!this.removed && e.parentNode) {
|
if (!this.removed && e.parentNode) {
|
||||||
var t = this.paper;
|
var t = this.paper;
|
||||||
@ -17339,7 +17333,7 @@ function() {
|
|||||||
for (var i in this) this[i] = "function" == typeof this[i] ? n._removedFactory(i) : null;
|
for (var i in this) this[i] = "function" == typeof this[i] ? n._removedFactory(i) : null;
|
||||||
this.removed = !0;
|
this.removed = !0;
|
||||||
}
|
}
|
||||||
}, Jt._getBBox = function() {
|
}, T._getBBox = function() {
|
||||||
if ("none" == this.node.style.display) {
|
if ("none" == this.node.style.display) {
|
||||||
this.show();
|
this.show();
|
||||||
var e = !0;
|
var e = !0;
|
||||||
@ -17361,7 +17355,7 @@ function() {
|
|||||||
i = i || {}, n && (t.display = "none");
|
i = i || {}, n && (t.display = "none");
|
||||||
}
|
}
|
||||||
return e && this.hide(), i;
|
return e && this.hide(), i;
|
||||||
}, Jt.attr = function(t, i) {
|
}, T.attr = function(t, i) {
|
||||||
if (this.removed) return this;
|
if (this.removed) return this;
|
||||||
if (null == t) {
|
if (null == t) {
|
||||||
var r = {};
|
var r = {};
|
||||||
@ -17390,28 +17384,28 @@ function() {
|
|||||||
for (var m in f) f[e](m) && (p[m] = f[m]);
|
for (var m in f) f[e](m) && (p[m] = f[m]);
|
||||||
}
|
}
|
||||||
return S(this, p), this;
|
return S(this, p), this;
|
||||||
}, Jt.toFront = function() {
|
}, T.toFront = function() {
|
||||||
if (this.removed) return this;
|
if (this.removed) return this;
|
||||||
var e = k(this.node);
|
var e = k(this.node);
|
||||||
e.parentNode.appendChild(e);
|
e.parentNode.appendChild(e);
|
||||||
var t = this.paper;
|
var t = this.paper;
|
||||||
return t.top != this && n._tofront(this, t), this;
|
return t.top != this && n._tofront(this, t), this;
|
||||||
}, Jt.toBack = function() {
|
}, T.toBack = function() {
|
||||||
if (this.removed) return this;
|
if (this.removed) return this;
|
||||||
var e = k(this.node), t = e.parentNode;
|
var e = k(this.node), t = e.parentNode;
|
||||||
t.insertBefore(e, t.firstChild), n._toback(this, this.paper);
|
t.insertBefore(e, t.firstChild), n._toback(this, this.paper);
|
||||||
this.paper;
|
this.paper;
|
||||||
return this;
|
return this;
|
||||||
}, Jt.insertAfter = function(e) {
|
}, T.insertAfter = function(e) {
|
||||||
if (this.removed || !e) return this;
|
if (this.removed || !e) return this;
|
||||||
var t = k(this.node), i = k(e.node || e[e.length - 1].node);
|
var t = k(this.node), i = k(e.node || e[e.length - 1].node);
|
||||||
return i.nextSibling ? i.parentNode.insertBefore(t, i.nextSibling) : i.parentNode.appendChild(t),
|
return i.nextSibling ? i.parentNode.insertBefore(t, i.nextSibling) : i.parentNode.appendChild(t),
|
||||||
n._insertafter(this, e, this.paper), this;
|
n._insertafter(this, e, this.paper), this;
|
||||||
}, Jt.insertBefore = function(e) {
|
}, T.insertBefore = function(e) {
|
||||||
if (this.removed || !e) return this;
|
if (this.removed || !e) return this;
|
||||||
var t = k(this.node), i = k(e.node || e[0].node);
|
var t = k(this.node), i = k(e.node || e[0].node);
|
||||||
return i.parentNode.insertBefore(t, i), n._insertbefore(this, e, this.paper), this;
|
return i.parentNode.insertBefore(t, i), n._insertbefore(this, e, this.paper), this;
|
||||||
}, Jt.blur = function(e) {
|
}, T.blur = function(e) {
|
||||||
var t = this;
|
var t = this;
|
||||||
if (0 !== +e) {
|
if (0 !== +e) {
|
||||||
var i = g("filter"), r = g("feGaussianBlur");
|
var i = g("filter"), r = g("feGaussianBlur");
|
||||||
@ -17426,7 +17420,7 @@ function() {
|
|||||||
}, n._engine.circle = function(e, t, n, i) {
|
}, n._engine.circle = function(e, t, n, i) {
|
||||||
var r = g("circle");
|
var r = g("circle");
|
||||||
e.canvas && e.canvas.appendChild(r);
|
e.canvas && e.canvas.appendChild(r);
|
||||||
var o = new Element(r, e);
|
var o = new E(r, e);
|
||||||
return o.attrs = {
|
return o.attrs = {
|
||||||
cx: t,
|
cx: t,
|
||||||
cy: n,
|
cy: n,
|
||||||
@ -17437,7 +17431,7 @@ function() {
|
|||||||
}, n._engine.rect = function(e, t, n, i, r, o) {
|
}, n._engine.rect = function(e, t, n, i, r, o) {
|
||||||
var a = g("rect");
|
var a = g("rect");
|
||||||
e.canvas && e.canvas.appendChild(a);
|
e.canvas && e.canvas.appendChild(a);
|
||||||
var s = new Element(a, e);
|
var s = new E(a, e);
|
||||||
return s.attrs = {
|
return s.attrs = {
|
||||||
x: t,
|
x: t,
|
||||||
y: n,
|
y: n,
|
||||||
@ -17451,7 +17445,7 @@ function() {
|
|||||||
}, n._engine.ellipse = function(e, t, n, i, r) {
|
}, n._engine.ellipse = function(e, t, n, i, r) {
|
||||||
var o = g("ellipse");
|
var o = g("ellipse");
|
||||||
e.canvas && e.canvas.appendChild(o);
|
e.canvas && e.canvas.appendChild(o);
|
||||||
var a = new Element(o, e);
|
var a = new E(o, e);
|
||||||
return a.attrs = {
|
return a.attrs = {
|
||||||
cx: t,
|
cx: t,
|
||||||
cy: n,
|
cy: n,
|
||||||
@ -17469,7 +17463,7 @@ function() {
|
|||||||
height: o,
|
height: o,
|
||||||
preserveAspectRatio: "none"
|
preserveAspectRatio: "none"
|
||||||
}), a.setAttributeNS(h, "href", t), e.canvas && e.canvas.appendChild(a);
|
}), a.setAttributeNS(h, "href", t), e.canvas && e.canvas.appendChild(a);
|
||||||
var s = new Element(a, e);
|
var s = new E(a, e);
|
||||||
return s.attrs = {
|
return s.attrs = {
|
||||||
x: n,
|
x: n,
|
||||||
y: i,
|
y: i,
|
||||||
@ -17480,7 +17474,7 @@ function() {
|
|||||||
}, n._engine.text = function(e, t, i, r) {
|
}, n._engine.text = function(e, t, i, r) {
|
||||||
var o = g("text");
|
var o = g("text");
|
||||||
e.canvas && e.canvas.appendChild(o);
|
e.canvas && e.canvas.appendChild(o);
|
||||||
var a = new Element(o, e);
|
var a = new E(o, e);
|
||||||
return a.attrs = {
|
return a.attrs = {
|
||||||
x: t,
|
x: t,
|
||||||
y: i,
|
y: i,
|
||||||
@ -17540,15 +17534,15 @@ function() {
|
|||||||
u("raphael.remove", this), this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas);
|
u("raphael.remove", this), this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas);
|
||||||
for (var e in this) this[e] = "function" == typeof this[e] ? n._removedFactory(e) : null;
|
for (var e in this) this[e] = "function" == typeof this[e] ? n._removedFactory(e) : null;
|
||||||
};
|
};
|
||||||
var E = n.st;
|
var I = n.st;
|
||||||
for (var T in Jt) Jt[e](T) && !E[e](T) && (E[T] = function(e) {
|
for (var D in T) T[e](D) && !I[e](D) && (I[D] = function(e) {
|
||||||
return function() {
|
return function() {
|
||||||
var t = arguments;
|
var t = arguments;
|
||||||
return this.forEach(function(n) {
|
return this.forEach(function(n) {
|
||||||
n[e].apply(n, t);
|
n[e].apply(n, t);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}(T));
|
}(D));
|
||||||
}
|
}
|
||||||
}(), function() {
|
}(), function() {
|
||||||
if (n.vml) {
|
if (n.vml) {
|
||||||
@ -17958,7 +17952,7 @@ function() {
|
|||||||
this._viewBox = [ e, t, i, r, !!o ], this._viewBoxShift = {
|
this._viewBox = [ e, t, i, r, !!o ], this._viewBoxShift = {
|
||||||
dx: -e,
|
dx: -e,
|
||||||
dy: -t,
|
dy: -t,
|
||||||
scale: size
|
scale: l
|
||||||
}, this.forEach(function(e) {
|
}, this.forEach(function(e) {
|
||||||
e.transform("...");
|
e.transform("...");
|
||||||
}), this;
|
}), this;
|
||||||
@ -21037,14 +21031,14 @@ function() {
|
|||||||
removeItem: function() {}
|
removeItem: function() {}
|
||||||
},
|
},
|
||||||
onEnd: function() {
|
onEnd: function() {
|
||||||
n.welcomeTour = "done", i(".drag-me", "Drag me!", "left"), i(".layout-toggler-preview", "Toggle preview", "right");
|
n.welcomeTour_1 = "done", i(".drag-me", "Drag me!", "left"), i(".layout-toggler-preview", "Toggle preview", "right");
|
||||||
},
|
},
|
||||||
template: [ '<div class="popover tour">', ' <div class="arrow"></div>', ' <h3 class="popover-title"></h3>', ' <div class="popover-content"></div>', ' <nav class="popover-navigation">', ' <button class="btn btn-primary" data-role="next">Next</button>', ' <button class="btn btn-default" data-role="end">Got it!</button>', " </nav>", "</div>" ].join("")
|
template: [ '<div class="popover tour">', ' <div class="arrow"></div>', ' <h3 class="popover-title"></h3>', ' <div class="popover-content"></div>', ' <nav class="popover-navigation">', ' <button class="btn btn-primary" data-role="next">Next</button>', ' <button class="btn btn-default" data-role="end">Got it!</button>', " </nav>", "</div>" ].join("")
|
||||||
});
|
});
|
||||||
a.addSteps([ {
|
a.addSteps([ {
|
||||||
element: ".navbar-inner",
|
element: ".navbar-inner",
|
||||||
title: "StackEdit 4 is out!",
|
title: "StackEdit 5 is coming...",
|
||||||
content: [ "<p>I'm very pleased to welcome you here! StackEdit keeps getting better and I hope you appreciate it.</p>", "Please click <b>Next</b> to take a quick tour." ].join(""),
|
content: [ '<p>A new version of StackEdit is on its way and <a href="app" target="_blank">you can try it here</a>!</p>', "<p>It's still in beta. Some of the features may not be available just yet.</p>", "You can always click <b>Next</b> to go through the StackEdit 4 tour." ].join(""),
|
||||||
placement: "bottom"
|
placement: "bottom"
|
||||||
}, {
|
}, {
|
||||||
element: ".document-panel .toggle-button",
|
element: ".document-panel .toggle-button",
|
||||||
@ -21072,7 +21066,7 @@ function() {
|
|||||||
onShown: function() {
|
onShown: function() {
|
||||||
o.onTweet();
|
o.onTweet();
|
||||||
}
|
}
|
||||||
} ]), e.has(n, "welcomeTour") || a.start(), t(".action-welcome-tour").click(function() {
|
} ]), e.has(n, "welcomeTour_1") || a.start(), t(".action-welcome-tour").click(function() {
|
||||||
a.restart();
|
a.restart();
|
||||||
});
|
});
|
||||||
}, a;
|
}, a;
|
||||||
@ -25551,7 +25545,7 @@ this.DIFF_EQUAL = DIFF_EQUAL, define("diff_match_patch_uncompressed", function(e
|
|||||||
}, "");
|
}, "");
|
||||||
document.getElementById("input-settings-theme").innerHTML = d;
|
document.getElementById("input-settings-theme").innerHTML = d;
|
||||||
}
|
}
|
||||||
e(".modal-header").append('<a class="dialog-header-message" href="http://classeur.io" target="_blank"><i class="icon-megaphone"></i> Try Classeur beta!</a>'),
|
e(".modal-header").append('<a class="dialog-header-message" href="app" target="_blank"><i class="icon-megaphone"></i> Try StackEdit 5!</a>'),
|
||||||
$();
|
$();
|
||||||
}), T;
|
}), T;
|
||||||
}), define("text!WELCOME.md", [], function() {
|
}), define("text!WELCOME.md", [], function() {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/** vim: et:ts=4:sw=4:sts=4
|
/** vim: et:ts=4:sw=4:sts=4
|
||||||
* @license RequireJS 2.1.15 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
|
* @license RequireJS 2.1.22 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved.
|
||||||
* Available via the MIT or new BSD license.
|
* Available via the MIT or new BSD license.
|
||||||
* see: http://github.com/jrburke/requirejs for details
|
* see: http://github.com/jrburke/requirejs for details
|
||||||
*/
|
*/
|
||||||
@ -12,7 +12,7 @@ var requirejs, require, define;
|
|||||||
(function (global) {
|
(function (global) {
|
||||||
var req, s, head, baseElement, dataMain, src,
|
var req, s, head, baseElement, dataMain, src,
|
||||||
interactiveScript, currentlyAddingScript, mainScript, subPath,
|
interactiveScript, currentlyAddingScript, mainScript, subPath,
|
||||||
version = '2.1.15',
|
version = '2.1.22',
|
||||||
commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
|
commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
|
||||||
cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
|
cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
|
||||||
jsSuffixRegExp = /\.js$/,
|
jsSuffixRegExp = /\.js$/,
|
||||||
@ -21,7 +21,6 @@ var requirejs, require, define;
|
|||||||
ostring = op.toString,
|
ostring = op.toString,
|
||||||
hasOwn = op.hasOwnProperty,
|
hasOwn = op.hasOwnProperty,
|
||||||
ap = Array.prototype,
|
ap = Array.prototype,
|
||||||
apsp = ap.splice,
|
|
||||||
isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document),
|
isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document),
|
||||||
isWebWorker = !isBrowser && typeof importScripts !== 'undefined',
|
isWebWorker = !isBrowser && typeof importScripts !== 'undefined',
|
||||||
//PS3 indicates loaded and complete, but need to wait for complete
|
//PS3 indicates loaded and complete, but need to wait for complete
|
||||||
@ -244,7 +243,7 @@ var requirejs, require, define;
|
|||||||
// still work when converted to a path, even though
|
// still work when converted to a path, even though
|
||||||
// as an ID it is less than ideal. In larger point
|
// as an ID it is less than ideal. In larger point
|
||||||
// releases, may be better to just kick out an error.
|
// releases, may be better to just kick out an error.
|
||||||
if (i === 0 || (i == 1 && ary[2] === '..') || ary[i - 1] === '..') {
|
if (i === 0 || (i === 1 && ary[2] === '..') || ary[i - 1] === '..') {
|
||||||
continue;
|
continue;
|
||||||
} else if (i > 0) {
|
} else if (i > 0) {
|
||||||
ary.splice(i - 1, 2);
|
ary.splice(i - 1, 2);
|
||||||
@ -554,11 +553,13 @@ var requirejs, require, define;
|
|||||||
function takeGlobalQueue() {
|
function takeGlobalQueue() {
|
||||||
//Push all the globalDefQueue items into the context's defQueue
|
//Push all the globalDefQueue items into the context's defQueue
|
||||||
if (globalDefQueue.length) {
|
if (globalDefQueue.length) {
|
||||||
//Array splice in the values since the context code has a
|
each(globalDefQueue, function(queueItem) {
|
||||||
//local var ref to defQueue, so cannot just reassign the one
|
var id = queueItem[0];
|
||||||
//on context.
|
if (typeof id === 'string') {
|
||||||
apsp.apply(defQueue,
|
context.defQueueMap[id] = true;
|
||||||
[defQueue.length, 0].concat(globalDefQueue));
|
}
|
||||||
|
defQueue.push(queueItem);
|
||||||
|
});
|
||||||
globalDefQueue = [];
|
globalDefQueue = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -589,7 +590,7 @@ var requirejs, require, define;
|
|||||||
id: mod.map.id,
|
id: mod.map.id,
|
||||||
uri: mod.map.url,
|
uri: mod.map.url,
|
||||||
config: function () {
|
config: function () {
|
||||||
return getOwn(config.config, mod.map.id) || {};
|
return getOwn(config.config, mod.map.id) || {};
|
||||||
},
|
},
|
||||||
exports: mod.exports || (mod.exports = {})
|
exports: mod.exports || (mod.exports = {})
|
||||||
});
|
});
|
||||||
@ -845,7 +846,10 @@ var requirejs, require, define;
|
|||||||
factory = this.factory;
|
factory = this.factory;
|
||||||
|
|
||||||
if (!this.inited) {
|
if (!this.inited) {
|
||||||
this.fetch();
|
// Only fetch if not already in the defQueue.
|
||||||
|
if (!hasProp(context.defQueueMap, id)) {
|
||||||
|
this.fetch();
|
||||||
|
}
|
||||||
} else if (this.error) {
|
} else if (this.error) {
|
||||||
this.emit('error', this.error);
|
this.emit('error', this.error);
|
||||||
} else if (!this.defining) {
|
} else if (!this.defining) {
|
||||||
@ -857,21 +861,10 @@ var requirejs, require, define;
|
|||||||
|
|
||||||
if (this.depCount < 1 && !this.defined) {
|
if (this.depCount < 1 && !this.defined) {
|
||||||
if (isFunction(factory)) {
|
if (isFunction(factory)) {
|
||||||
//If there is an error listener, favor passing
|
try {
|
||||||
//to that instead of throwing an error. However,
|
|
||||||
//only do it for define()'d modules. require
|
|
||||||
//errbacks should not be called for failures in
|
|
||||||
//their callbacks (#699). However if a global
|
|
||||||
//onError is set, use that.
|
|
||||||
if ((this.events.error && this.map.isDefine) ||
|
|
||||||
req.onError !== defaultOnError) {
|
|
||||||
try {
|
|
||||||
exports = context.execCb(id, factory, depExports, exports);
|
|
||||||
} catch (e) {
|
|
||||||
err = e;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
exports = context.execCb(id, factory, depExports, exports);
|
exports = context.execCb(id, factory, depExports, exports);
|
||||||
|
} catch (e) {
|
||||||
|
err = e;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Favor return value over exports. If node/cjs in play,
|
// Favor return value over exports. If node/cjs in play,
|
||||||
@ -888,12 +881,30 @@ var requirejs, require, define;
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
err.requireMap = this.map;
|
// If there is an error listener, favor passing
|
||||||
err.requireModules = this.map.isDefine ? [this.map.id] : null;
|
// to that instead of throwing an error. However,
|
||||||
err.requireType = this.map.isDefine ? 'define' : 'require';
|
// only do it for define()'d modules. require
|
||||||
return onError((this.error = err));
|
// errbacks should not be called for failures in
|
||||||
|
// their callbacks (#699). However if a global
|
||||||
|
// onError is set, use that.
|
||||||
|
if ((this.events.error && this.map.isDefine) ||
|
||||||
|
req.onError !== defaultOnError) {
|
||||||
|
err.requireMap = this.map;
|
||||||
|
err.requireModules = this.map.isDefine ? [this.map.id] : null;
|
||||||
|
err.requireType = this.map.isDefine ? 'define' : 'require';
|
||||||
|
return onError((this.error = err));
|
||||||
|
} else if (typeof console !== 'undefined' &&
|
||||||
|
console.error) {
|
||||||
|
// Log the error for debugging. If promises could be
|
||||||
|
// used, this would be different, but making do.
|
||||||
|
console.error(err);
|
||||||
|
} else {
|
||||||
|
// Do not want to completely lose the error. While this
|
||||||
|
// will mess up processing and lead to similar results
|
||||||
|
// as bug 1440, it at least surfaces the error.
|
||||||
|
req.onError(err);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//Just a literal value
|
//Just a literal value
|
||||||
exports = factory;
|
exports = factory;
|
||||||
@ -905,7 +916,11 @@ var requirejs, require, define;
|
|||||||
defined[id] = exports;
|
defined[id] = exports;
|
||||||
|
|
||||||
if (req.onResourceLoad) {
|
if (req.onResourceLoad) {
|
||||||
req.onResourceLoad(context, this.map, this.depMaps);
|
var resLoadMaps = [];
|
||||||
|
each(this.depMaps, function (depMap) {
|
||||||
|
resLoadMaps.push(depMap.normalizedMap || depMap);
|
||||||
|
});
|
||||||
|
req.onResourceLoad(context, this.map, resLoadMaps);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -964,6 +979,7 @@ var requirejs, require, define;
|
|||||||
this.map.parentMap);
|
this.map.parentMap);
|
||||||
on(normalizedMap,
|
on(normalizedMap,
|
||||||
'defined', bind(this, function (value) {
|
'defined', bind(this, function (value) {
|
||||||
|
this.map.normalizedMap = normalizedMap;
|
||||||
this.init([], function () { return value; }, null, {
|
this.init([], function () { return value; }, null, {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
ignore: true
|
ignore: true
|
||||||
@ -1117,12 +1133,22 @@ var requirejs, require, define;
|
|||||||
this.depCount += 1;
|
this.depCount += 1;
|
||||||
|
|
||||||
on(depMap, 'defined', bind(this, function (depExports) {
|
on(depMap, 'defined', bind(this, function (depExports) {
|
||||||
|
if (this.undefed) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.defineDep(i, depExports);
|
this.defineDep(i, depExports);
|
||||||
this.check();
|
this.check();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
if (this.errback) {
|
if (this.errback) {
|
||||||
on(depMap, 'error', bind(this, this.errback));
|
on(depMap, 'error', bind(this, this.errback));
|
||||||
|
} else if (this.events.error) {
|
||||||
|
// No direct errback on this module, but something
|
||||||
|
// else is listening for errors, so be sure to
|
||||||
|
// propagate the error correctly.
|
||||||
|
on(depMap, 'error', bind(this, function(err) {
|
||||||
|
this.emit('error', err);
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1226,13 +1252,15 @@ var requirejs, require, define;
|
|||||||
while (defQueue.length) {
|
while (defQueue.length) {
|
||||||
args = defQueue.shift();
|
args = defQueue.shift();
|
||||||
if (args[0] === null) {
|
if (args[0] === null) {
|
||||||
return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + args[args.length - 1]));
|
return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' +
|
||||||
|
args[args.length - 1]));
|
||||||
} else {
|
} else {
|
||||||
//args are id, deps, factory. Should be normalized by the
|
//args are id, deps, factory. Should be normalized by the
|
||||||
//define() function.
|
//define() function.
|
||||||
callGetModule(args);
|
callGetModule(args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
context.defQueueMap = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
context = {
|
context = {
|
||||||
@ -1242,6 +1270,7 @@ var requirejs, require, define;
|
|||||||
defined: defined,
|
defined: defined,
|
||||||
urlFetched: urlFetched,
|
urlFetched: urlFetched,
|
||||||
defQueue: defQueue,
|
defQueue: defQueue,
|
||||||
|
defQueueMap: {},
|
||||||
Module: Module,
|
Module: Module,
|
||||||
makeModuleMap: makeModuleMap,
|
makeModuleMap: makeModuleMap,
|
||||||
nextTick: req.nextTick,
|
nextTick: req.nextTick,
|
||||||
@ -1313,7 +1342,7 @@ var requirejs, require, define;
|
|||||||
each(cfg.packages, function (pkgObj) {
|
each(cfg.packages, function (pkgObj) {
|
||||||
var location, name;
|
var location, name;
|
||||||
|
|
||||||
pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj;
|
pkgObj = typeof pkgObj === 'string' ? {name: pkgObj} : pkgObj;
|
||||||
|
|
||||||
name = pkgObj.name;
|
name = pkgObj.name;
|
||||||
location = pkgObj.location;
|
location = pkgObj.location;
|
||||||
@ -1340,7 +1369,7 @@ var requirejs, require, define;
|
|||||||
//late to modify them, and ignore unnormalized ones
|
//late to modify them, and ignore unnormalized ones
|
||||||
//since they are transient.
|
//since they are transient.
|
||||||
if (!mod.inited && !mod.map.unnormalized) {
|
if (!mod.inited && !mod.map.unnormalized) {
|
||||||
mod.map = makeModuleMap(id);
|
mod.map = makeModuleMap(id, null, true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1476,6 +1505,7 @@ var requirejs, require, define;
|
|||||||
var map = makeModuleMap(id, relMap, true),
|
var map = makeModuleMap(id, relMap, true),
|
||||||
mod = getOwn(registry, id);
|
mod = getOwn(registry, id);
|
||||||
|
|
||||||
|
mod.undefed = true;
|
||||||
removeScript(id);
|
removeScript(id);
|
||||||
|
|
||||||
delete defined[id];
|
delete defined[id];
|
||||||
@ -1486,10 +1516,11 @@ var requirejs, require, define;
|
|||||||
//in array so that the splices do not
|
//in array so that the splices do not
|
||||||
//mess up the iteration.
|
//mess up the iteration.
|
||||||
eachReverse(defQueue, function(args, i) {
|
eachReverse(defQueue, function(args, i) {
|
||||||
if(args[0] === id) {
|
if (args[0] === id) {
|
||||||
defQueue.splice(i, 1);
|
defQueue.splice(i, 1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
delete context.defQueueMap[id];
|
||||||
|
|
||||||
if (mod) {
|
if (mod) {
|
||||||
//Hold on to listeners in case the
|
//Hold on to listeners in case the
|
||||||
@ -1551,6 +1582,7 @@ var requirejs, require, define;
|
|||||||
|
|
||||||
callGetModule(args);
|
callGetModule(args);
|
||||||
}
|
}
|
||||||
|
context.defQueueMap = {};
|
||||||
|
|
||||||
//Do this after the cycle of callGetModule in case the result
|
//Do this after the cycle of callGetModule in case the result
|
||||||
//of those calls/init calls changes the registry.
|
//of those calls/init calls changes the registry.
|
||||||
@ -1686,7 +1718,21 @@ var requirejs, require, define;
|
|||||||
onScriptError: function (evt) {
|
onScriptError: function (evt) {
|
||||||
var data = getScriptData(evt);
|
var data = getScriptData(evt);
|
||||||
if (!hasPathFallback(data.id)) {
|
if (!hasPathFallback(data.id)) {
|
||||||
return onError(makeError('scripterror', 'Script error for: ' + data.id, evt, [data.id]));
|
var parents = [];
|
||||||
|
eachProp(registry, function(value, key) {
|
||||||
|
if (key.indexOf('_@r') !== 0) {
|
||||||
|
each(value.depMaps, function(depMap) {
|
||||||
|
if (depMap.id === data.id) {
|
||||||
|
parents.push(key);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return onError(makeError('scripterror', 'Script error for "' + data.id +
|
||||||
|
(parents.length ?
|
||||||
|
'", needed by: ' + parents.join(', ') :
|
||||||
|
'"'), evt, [data.id]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -1845,6 +1891,9 @@ var requirejs, require, define;
|
|||||||
if (isBrowser) {
|
if (isBrowser) {
|
||||||
//In the browser so use a script tag
|
//In the browser so use a script tag
|
||||||
node = req.createNode(config, moduleName, url);
|
node = req.createNode(config, moduleName, url);
|
||||||
|
if (config.onNodeCreated) {
|
||||||
|
config.onNodeCreated(node, config, moduleName, url);
|
||||||
|
}
|
||||||
|
|
||||||
node.setAttribute('data-requirecontext', context.contextName);
|
node.setAttribute('data-requirecontext', context.contextName);
|
||||||
node.setAttribute('data-requiremodule', moduleName);
|
node.setAttribute('data-requiremodule', moduleName);
|
||||||
@ -1910,9 +1959,9 @@ var requirejs, require, define;
|
|||||||
//In a web worker, use importScripts. This is not a very
|
//In a web worker, use importScripts. This is not a very
|
||||||
//efficient use of importScripts, importScripts will block until
|
//efficient use of importScripts, importScripts will block until
|
||||||
//its script is downloaded and evaluated. However, if web workers
|
//its script is downloaded and evaluated. However, if web workers
|
||||||
//are in play, the expectation that a build has been done so that
|
//are in play, the expectation is that a build has been done so
|
||||||
//only one script needs to be loaded anyway. This may need to be
|
//that only one script needs to be loaded anyway. This may need
|
||||||
//reevaluated if other use cases become common.
|
//to be reevaluated if other use cases become common.
|
||||||
importScripts(url);
|
importScripts(url);
|
||||||
|
|
||||||
//Account for anonymous modules
|
//Account for anonymous modules
|
||||||
@ -1973,7 +2022,7 @@ var requirejs, require, define;
|
|||||||
//like a module name.
|
//like a module name.
|
||||||
mainScript = mainScript.replace(jsSuffixRegExp, '');
|
mainScript = mainScript.replace(jsSuffixRegExp, '');
|
||||||
|
|
||||||
//If mainScript is still a path, fall back to dataMain
|
//If mainScript is still a path, fall back to dataMain
|
||||||
if (req.jsExtRegExp.test(mainScript)) {
|
if (req.jsExtRegExp.test(mainScript)) {
|
||||||
mainScript = dataMain;
|
mainScript = dataMain;
|
||||||
}
|
}
|
||||||
@ -2052,14 +2101,18 @@ var requirejs, require, define;
|
|||||||
//where the module name is not known until the script onload event
|
//where the module name is not known until the script onload event
|
||||||
//occurs. If no context, use the global queue, and get it processed
|
//occurs. If no context, use the global queue, and get it processed
|
||||||
//in the onscript load callback.
|
//in the onscript load callback.
|
||||||
(context ? context.defQueue : globalDefQueue).push([name, deps, callback]);
|
if (context) {
|
||||||
|
context.defQueue.push([name, deps, callback]);
|
||||||
|
context.defQueueMap[name] = true;
|
||||||
|
} else {
|
||||||
|
globalDefQueue.push([name, deps, callback]);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
define.amd = {
|
define.amd = {
|
||||||
jQuery: true
|
jQuery: true
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes the text. Normally just uses eval, but can be modified
|
* Executes the text. Normally just uses eval, but can be modified
|
||||||
* to use a better, environment-specific call. Only used for transpiling
|
* to use a better, environment-specific call. Only used for transpiling
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
define([], function() {
|
define([], function() {
|
||||||
var constants = {};
|
var constants = {};
|
||||||
constants.VERSION = "4.3.14";
|
constants.VERSION = "4.3.16";
|
||||||
constants.MAIN_URL = "https://stackedit.io/";
|
constants.MAIN_URL = "https://stackedit.io/";
|
||||||
constants.GOOGLE_ANALYTICS_ACCOUNT_ID = "UA-39556145-1";
|
constants.GOOGLE_ANALYTICS_ACCOUNT_ID = "UA-39556145-1";
|
||||||
constants.GOOGLE_API_KEY = "AIzaSyAeCU8CGcSkn0z9js6iocHuPBX4f_mMWkw";
|
constants.GOOGLE_API_KEY = "AIzaSyAeCU8CGcSkn0z9js6iocHuPBX4f_mMWkw";
|
||||||
|
@ -576,7 +576,7 @@ define([
|
|||||||
document.getElementById('input-settings-theme').innerHTML = themeOptions;
|
document.getElementById('input-settings-theme').innerHTML = themeOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.modal-header').append('<a class="dialog-header-message" href="http://classeur.io" target="_blank"><i class="icon-megaphone"></i> Try Classeur beta!</a>');
|
$('.modal-header').append('<a class="dialog-header-message" href="app" target="_blank"><i class="icon-megaphone"></i> Try StackEdit 5!</a>');
|
||||||
checkPayment();
|
checkPayment();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ define([
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onEnd: function() {
|
onEnd: function() {
|
||||||
storage.welcomeTour = 'done';
|
storage.welcomeTour_1 = 'done';
|
||||||
infoTooltip('.drag-me', 'Drag me!', 'left');
|
infoTooltip('.drag-me', 'Drag me!', 'left');
|
||||||
infoTooltip('.layout-toggler-preview', 'Toggle preview', 'right');
|
infoTooltip('.layout-toggler-preview', 'Toggle preview', 'right');
|
||||||
},
|
},
|
||||||
@ -61,10 +61,11 @@ define([
|
|||||||
tour.addSteps([
|
tour.addSteps([
|
||||||
{
|
{
|
||||||
element: '.navbar-inner',
|
element: '.navbar-inner',
|
||||||
title: 'StackEdit 4 is out!',
|
title: 'StackEdit 5 is coming...',
|
||||||
content: [
|
content: [
|
||||||
'<p>I\'m very pleased to welcome you here! StackEdit keeps getting better and I hope you appreciate it.</p>',
|
'<p>A new version of StackEdit is on its way and <a href="app" target="_blank">you can try it here</a>!</p>',
|
||||||
'Please click <b>Next</b> to take a quick tour.'
|
'<p>It\'s still in beta. Some of the features may not be available just yet.</p>',
|
||||||
|
'You can always click <b>Next</b> to go through the StackEdit 4 tour.'
|
||||||
].join(""),
|
].join(""),
|
||||||
placement: 'bottom'
|
placement: 'bottom'
|
||||||
},
|
},
|
||||||
@ -111,7 +112,7 @@ define([
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
if(!_.has(storage, 'welcomeTour')) {
|
if(!_.has(storage, 'welcomeTour_1')) {
|
||||||
tour.start();
|
tour.start();
|
||||||
}
|
}
|
||||||
$('.action-welcome-tour').click(function() {
|
$('.action-welcome-tour').click(function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user