summaryrefslogtreecommitdiff
path: root/public/js/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js/index.js')
-rw-r--r--public/js/index.js16
1 files changed, 5 insertions, 11 deletions
diff --git a/public/js/index.js b/public/js/index.js
index bdd4c822..4be11e86 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -1,16 +1,11 @@
/* jquery and jquery plugins */
require('../vendor/showup/showup');
-require('prismjs/themes/prism.css');
-require('highlight.js/styles/github-gist.css');
-
-require('prismjs');
-require('prismjs/components/prism-wiki');
var toMarkdown = require('to-markdown');
var saveAs = require('file-saver').saveAs;
-require('js-url');
-require('randomcolor');
+var url = require('js-url');
+var randomColor = require('randomcolor');
var _ = require("lodash");
@@ -28,7 +23,6 @@ var noteurl = common.noteurl;
var checkLoginStateChanged = common.checkLoginStateChanged;
-require('./pretty');
var extra = require('./extra');
var md = extra.md;
var updateLastChange = extra.updateLastChange;
@@ -41,6 +35,7 @@ var deduplicatedHeaderId = extra.deduplicatedHeaderId;
var renderTOC = extra.renderTOC;
var renderTitle = extra.renderTitle;
var renderFilename = extra.renderFilename;
+var renderTags = extra.renderTags;
var scrollToHash = extra.scrollToHash;
var updateLastChangeUser = extra.updateLastChangeUser;
var updateOwner = extra.updateOwner;
@@ -1541,6 +1536,7 @@ function onGoogleClientLoaded() {
googleApiAuth(true);
buildImportFromGoogleDrive();
}
+window.onGoogleClientLoaded = onGoogleClientLoaded;
// export to google drive
ui.toolbar.export.googleDrive.click(function (e) {
var token = gapi.auth.getToken();
@@ -3414,7 +3410,7 @@ var updateHistoryDebounce = 600;
var updateHistory = _.debounce(updateHistoryInner, updateHistoryDebounce)
function updateHistoryInner() {
- writeHistory(ui.area.markdown);
+ writeHistory(renderFilename(ui.area.markdown), renderTags(ui.area.markdown));
}
function updateDataAttrs(src, des) {
@@ -3732,8 +3728,6 @@ function matchInContainer(text) {
}
}
-var emojify = require('emojify.js');
-
$(editor.getInputField())
.textcomplete([
{ // emoji strategy