diff --git a/ep.json b/ep.json index e42354f..90fa663 100644 --- a/ep.json +++ b/ep.json @@ -5,7 +5,6 @@ "hooks":{ "expressCreateServer": "ep_markdown/express", "eejsBlock_exportColumn": "ep_markdown/index", - "eejsBlock_scripts": "ep_markdown/index", "eejsBlock_mySettings": "ep_markdown/index", "import": "ep_markdown/index" }, diff --git a/index.js b/index.js index 79d3c3d..cd6f389 100644 --- a/index.js +++ b/index.js @@ -9,10 +9,6 @@ exports.eejsBlock_exportColumn = (hookName, context) => { context.content += eejs.require('./templates/exportcolumn.html', {}, module); }; -exports.eejsBlock_scripts = (hookName, context) => { - context.content += eejs.require('./templates/scripts.html', {}, module); -}; - exports.eejsBlock_styles = (hookName, context) => { context.content += eejs.require('./templates/styles.html', {}, module); }; diff --git a/static/js/main.js b/static/js/main.js deleted file mode 100644 index 2b26b72..0000000 --- a/static/js/main.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -$(document).ready(() => { - const padRootPath = new RegExp(/.*\/p\/[^/]+/) - .exec(document.location.pathname) || clientVars.padId; - $('#exportmarkdowna').attr('href', `${padRootPath}/export/markdown`); -}); diff --git a/static/js/markdown.js b/static/js/markdown.js index 48a76d8..db8b82a 100644 --- a/static/js/markdown.js +++ b/static/js/markdown.js @@ -1,6 +1,10 @@ 'use strict'; exports.postAceInit = (hookName, context) => { + const padRootPath = new RegExp(/.*\/p\/[^/]+/) + .exec(document.location.pathname) || clientVars.padId; + $('#exportmarkdowna').attr('href', `${padRootPath}/export/markdown`); + const enable = () => { // add css class markdown $('iframe[name="ace_outer"]').contents().find('iframe') diff --git a/templates/scripts.html b/templates/scripts.html deleted file mode 100644 index 82aafa2..0000000 --- a/templates/scripts.html +++ /dev/null @@ -1 +0,0 @@ -