diff --git a/contributors/dcoles.md b/contributors/dcoles.md new file mode 100644 index 00000000..4b47257f --- /dev/null +++ b/contributors/dcoles.md @@ -0,0 +1,11 @@ +2018-11-13 + +I hereby agree to the terms of the "Markdown Here Individual Contributor License +Agreement", with MD5 checksum 6a31e08cf66139e91c0db5599b6ab084. + +I furthermore declare that I am authorized and able to make this agreement and +sign this declaration. + +Signed, + +David Coles https://github.com/dcoles diff --git a/src/chrome/backgroundscript.js b/src/chrome/backgroundscript.js index 9c1c4372..871b4ca3 100644 --- a/src/chrome/backgroundscript.js +++ b/src/chrome/backgroundscript.js @@ -51,12 +51,42 @@ function upgradeCheck() { }); } +// Load content script dependencies. +function loadContentScripts(done) { + chrome.tabs.executeScript( + {code: 'document.markdown_here_loaded'}, function(results) { + if (results[0]) { + done(); + return; + } + + let srcs = [ + "common/utils.js", + "common/common-logic.js", + "common/jsHtmlToText.js", + "common/marked.js", + "common/mdh-html-to-text.js", + "common/markdown-here.js", + "chrome/contentscript.js" + ]; + + for (let i=0; i