diff options
author | Nik Nyby <nnyby@columbia.edu> | 2015-10-24 11:50:56 -0400 |
---|---|---|
committer | Nik Nyby <nnyby@columbia.edu> | 2015-10-24 11:50:56 -0400 |
commit | af0fdf2afd5b42a041d97f33170d17d6f18253af (patch) | |
tree | b31f8c59c4ed9d05fa5eaa2f95a204a1f46787f6 /lib/html_script_finder/dom_handler/dom_gatherer.js | |
parent | da101e8eb9da3808b3bd75d571e40d5c2f139d9d (diff) | |
parent | 59597067c21e52ae94340801d4bf6e3a9825c7a3 (diff) | |
download | librejsxul-af0fdf2afd5b42a041d97f33170d17d6f18253af.tar.lz librejsxul-af0fdf2afd5b42a041d97f33170d17d6f18253af.tar.xz librejsxul-af0fdf2afd5b42a041d97f33170d17d6f18253af.zip |
Merge pull request #5 from nikolas/jpm
jpm
Diffstat (limited to 'lib/html_script_finder/dom_handler/dom_gatherer.js')
-rw-r--r-- | lib/html_script_finder/dom_handler/dom_gatherer.js | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/lib/html_script_finder/dom_handler/dom_gatherer.js b/lib/html_script_finder/dom_handler/dom_gatherer.js index 7bb2569..ce29cf6 100644 --- a/lib/html_script_finder/dom_handler/dom_gatherer.js +++ b/lib/html_script_finder/dom_handler/dom_gatherer.js @@ -20,18 +20,19 @@ * along with GNU LibreJS. If not, see <http://www.gnu.org/licenses/>. */ -var scriptProperties = require("html_script_finder/dom_handler/script_properties"); +var scriptProperties = require("./script_properties"); const scriptTypes = scriptProperties.scriptTypes; -const scriptsCached = require("script_entries/scripts_cache").scriptsCached; +const scriptsCached = require("../../script_entries/scripts_cache") + .scriptsCached; const statusTypes = scriptProperties.statusTypes; // object model for script entries. -var scriptObject = require("html_script_finder/dom_handler/script_object"); +var scriptObject = require("./script_object"); -var urlHandler = require("url_handler/url_handler"); +var urlHandler = require("../../url_handler/url_handler"); -var attributeHelpers = require("html_script_finder/dom_handler/attributes"); +var attributeHelpers = require("./attributes"); // javascript:* var jsInAttrRe = attributeHelpers.jsInAttrRe; @@ -39,9 +40,9 @@ var jsInAttrRe = attributeHelpers.jsInAttrRe; // the list of all available event attributes var intrinsicEvents = attributeHelpers.intrinsicEvents; -var privacyChecker = require("js_checker/privacy_checker").privacyCheck; +var privacyChecker = require("../../js_checker/privacy_checker").privacyCheck; -const types = require("js_checker/constant_types"); +const types = require("../../js_checker/constant_types"); var checkTypes = types.checkTypes; @@ -246,8 +247,10 @@ DomGatherer.prototype.gatherScriptsContent = function() { // using else if since script text is // ignored if src attribute is set. // adding this.narcissusBugFixLibreJS to fix comment bug. - var bugfix = require('html_script_finder/bug_fix').narcissusBugFixLibreJS; - currentScript = stripHtmlCommentsInScript(this.d.domScripts[i].text + bugfix); + var bugfix = require('../../html_script_finder/bug_fix') + .narcissusBugFixLibreJS; + currentScript = stripHtmlCommentsInScript( + this.d.domScripts[i].text + bugfix); scriptEntry = scriptObject.Script( {'type': scriptTypes.INLINE, |