From e4a3586a14996bbece3b26c9e3b7704ea6af8615 Mon Sep 17 00:00:00 2001 From: Ruben Rodriguez Date: Sat, 28 Nov 2015 15:24:36 -0600 Subject: LibreJS upgraded to 6.0.10 --- .../resources/librejs/data/README | 2 - .../resources/librejs/data/assets/css/style.css | 191 -- .../resources/librejs/data/assets/images/README | 21 - .../data/assets/images/complain-button3.png | Bin 8958 -> 0 bytes .../librejs/data/assets/images/complain.png | Bin 1206 -> 0 bytes .../librejs/data/assets/images/info-title.png | Bin 4310 -> 0 bytes .../librejs/data/assets/images/separator.png | Bin 279 -> 0 bytes .../librejs/data/assets/images/torchy2.png | Bin 273 -> 0 bytes .../librejs/data/chrome_worker/parser/jsdefs.js | 751 ------- .../librejs/data/chrome_worker/parser/jslex.js | 719 ------- .../librejs/data/chrome_worker/parser/jsparse.js | 2042 -------------------- .../librejs/data/chrome_worker/parser/parse.js | 57 - .../librejs/data/complain/contact_finder.js | 436 ----- .../librejs/data/complain/contact_regex.js | 100 - .../resources/librejs/data/complain/link_types.js | 44 - .../librejs/data/complain/pagemod_finder.js | 314 --- .../librejs/data/complain/worker_finder.js | 37 - .../librejs/data/display_panel/content/README | 21 - .../display_panel/content/background-panel.png | Bin 14814 -> 0 bytes .../data/display_panel/content/display-panel.html | 72 - .../display_panel/content/librejs-title-old.png | Bin 2673 -> 0 bytes .../data/display_panel/content/librejs-title.png | Bin 14123 -> 0 bytes .../data/display_panel/content/panel-styles.css | 190 -- .../librejs/data/display_panel/main_panel.js | 395 ---- .../librejs/data/images/gnu-icon-white.ico | Bin 4286 -> 0 bytes .../resources/librejs/data/images/gnu-icon.ico | Bin 4286 -> 0 bytes .../resources/librejs/data/images/gnu-icon.png | Bin 2667 -> 0 bytes .../resources/librejs/data/librejs-settings.html | 23 - .../resources/librejs/data/licenses/Boost-1.0.txt | 23 - .../resources/librejs/data/licenses/ISC.txt | 12 - .../resources/librejs/data/licenses/IntelACPI.txt | 116 -- .../resources/librejs/data/licenses/agpl-3.0.txt | 661 ------- .../resources/librejs/data/licenses/apache-2.0.txt | 202 -- .../librejs/data/licenses/artistic-2.0.txt | 201 -- .../librejs/data/licenses/bsd-3-clause.txt | 27 - .../resources/librejs/data/licenses/cc0.txt | 118 -- .../resources/librejs/data/licenses/clear-bsd.txt | 33 - .../resources/librejs/data/licenses/cpal-1.0.txt | 105 - .../librejs/data/licenses/create-magnets.sh | 28 - .../resources/librejs/data/licenses/epl-1.0.txt | 231 --- .../resources/librejs/data/licenses/expat.txt | 5 - .../resources/librejs/data/licenses/freebsd.txt | 25 - .../resources/librejs/data/licenses/gpl-2.0.txt | 339 ---- .../resources/librejs/data/licenses/gpl-3.0.txt | 674 ------- .../librejs/data/licenses/illinois-NCSA.txt | 24 - .../resources/librejs/data/licenses/imlib2.txt | 31 - .../resources/librejs/data/licenses/lgpl-2.0.txt | 481 ----- .../resources/librejs/data/licenses/lgpl-2.1.txt | 502 ----- .../resources/librejs/data/licenses/lgpl-3.0.txt | 165 -- .../librejs/data/licenses/magnet-links.txt | 28 - .../resources/librejs/data/licenses/mpl-2.0.txt | 373 ---- .../librejs/data/licenses/public-domain.txt | 18 - .../data/licenses/torrents/Boost-1.0.txt.torrent | 2 - .../librejs/data/licenses/torrents/ISC.txt.torrent | 1 - .../data/licenses/torrents/IntelACPI.txt.torrent | 1 - .../data/licenses/torrents/agpl-3.0.txt.torrent | 1 - .../data/licenses/torrents/apache-2.0.txt.torrent | 1 - .../licenses/torrents/artistic-2.0.txt.torrent | Bin 200 -> 0 bytes .../licenses/torrents/bsd-3-clause.txt.torrent | 1 - .../librejs/data/licenses/torrents/cc0.txt.torrent | 1 - .../data/licenses/torrents/clear-bsd.txt.torrent | 1 - .../data/licenses/torrents/cpal-1.0.txt.torrent | 1 - .../data/licenses/torrents/expat.txt.torrent | 1 - .../data/licenses/torrents/freebsd.txt.torrent | 1 - .../data/licenses/torrents/gpl-2.0.txt.torrent | 1 - .../data/licenses/torrents/gpl-3.0.txt.torrent | 1 - .../licenses/torrents/illinois-NCSA.txt.torrent | 1 - .../data/licenses/torrents/imlib2.txt.torrent | 1 - .../data/licenses/torrents/lgpl-2.0.txt.torrent | 1 - .../data/licenses/torrents/lgpl-2.1.txt.torrent | 1 - .../data/licenses/torrents/lgpl-3.0.txt.torrent | 2 - .../licenses/torrents/magnet-links.txt.torrent | Bin 200 -> 0 bytes .../data/licenses/torrents/mpl-2.0.txt.torrent | 1 - .../licenses/torrents/public-domain.txt.torrent | 1 - .../data/licenses/torrents/unlicense.txt.torrent | 1 - .../data/licenses/torrents/wtfpl.txt.torrent | 1 - .../librejs/data/licenses/torrents/x11.txt.torrent | 1 - .../data/licenses/torrents/xfree86.txt.torrent | 1 - .../resources/librejs/data/licenses/unlicense.txt | 25 - .../resources/librejs/data/licenses/wtfpl.txt | 13 - .../resources/librejs/data/licenses/x11.txt | 26 - .../resources/librejs/data/licenses/xfree86.txt | 43 - .../resources/librejs/data/loading/loader.gif | Bin 8787 -> 0 bytes .../librejs/data/loading/loading-panel.html | 31 - .../data/preferences_panel/contentscript.js | 69 - .../data/preferences_panel/preferences_panel.html | 73 - .../data/script_detector/script_detector.js | 361 ---- .../librejs/data/script_libraries/gethash.sh | 24 - .../data/script_libraries/script-libraries.json | 1567 --------------- .../data/settings/images/button-download.png | Bin 3426 -> 0 bytes .../librejs/data/settings/images/libre.png | Bin 19048 -> 0 bytes .../librejs/data/settings/images/logo-medium.png | Bin 11050 -> 0 bytes .../resources/librejs/data/settings/index.html | 108 -- .../resources/librejs/data/settings/js/form-row.js | 120 -- .../librejs/data/settings/js/form-types.js | 145 -- .../librejs/data/settings/js/pagescript-emitter.js | 14 - .../data/settings/js/pagescript-listener.js | 51 - .../data/settings/js/permafrost-info-box.js | 21 - .../librejs/data/settings/styles/form.css | 40 - .../librejs/data/settings/styles/styles.css | 129 -- .../data/settings/third-party/jquery/jquery.min.js | 4 - .../resources/librejs/data/widget/images/README | 21 - .../librejs/data/widget/images/librejs-32.png | Bin 1011 -> 0 bytes .../librejs/data/widget/images/librejs-64.png | Bin 1604 -> 0 bytes .../librejs/data/widget/images/librejs-off.png | Bin 498 -> 0 bytes .../librejs/data/widget/images/librejs.png | Bin 503 -> 0 bytes .../lib/addon_management/install_uninstall.js | 67 - .../librejs/lib/addon_management/prefchange.js | 126 -- .../librejs/lib/html_script_finder/bug_fix.js | 24 - .../librejs/lib/html_script_finder/dom_handler.js | 573 ------ .../html_script_finder/dom_handler/attributes.js | 139 -- .../html_script_finder/dom_handler/dom_checker.js | 480 ----- .../html_script_finder/dom_handler/dom_gatherer.js | 283 --- .../lib/html_script_finder/dom_handler/request.js | 117 -- .../dom_handler/script_object.js | 210 -- .../dom_handler/script_properties.js | 45 - .../librejs/lib/html_script_finder/html_parser.js | 160 -- .../lib/html_script_finder/url_seen_tester.js | 80 - .../web_labels/find_js_labels.js | 133 -- .../html_script_finder/web_labels/js_web_labels.js | 300 --- .../web_labels/script_hash_worker.js | 77 - .../librejs/lib/http_observer/allowed_referrers.js | 69 - .../resources/librejs/lib/http_observer/caching.js | 32 - .../lib/http_observer/http_request_observer.js | 148 -- .../librejs/lib/http_observer/process_response.js | 420 ---- .../librejs/lib/http_observer/stream_loader.js | 160 -- .../librejs/lib/js_checker/constant_types.js | 192 -- .../librejs/lib/js_checker/free_checker.js | 233 --- .../resources/librejs/lib/js_checker/js_checker.js | 561 ------ .../librejs/lib/js_checker/license_definitions.js | 284 --- .../librejs/lib/js_checker/nontrivial_checker.js | 376 ---- .../librejs/lib/js_checker/pattern_utils.js | 42 - .../librejs/lib/js_checker/privacy_checker.js | 46 - .../lib/js_checker/privacy_threat_definitions.js | 54 - .../librejs/lib/js_checker/relation_checker.js | 291 --- .../resources/librejs/lib/main.js | 71 - .../librejs/lib/parser/narcissus_worker.js | 81 - .../librejs/lib/pref_observer/pref_observer.js | 72 - .../librejs/lib/script_entries/accepted_scripts.js | 69 - .../librejs/lib/script_entries/all_scripts.js | 110 -- .../resources/librejs/lib/script_entries/crypto.js | 61 - .../librejs/lib/script_entries/dryrun_scripts.js | 78 - .../librejs/lib/script_entries/free_libraries.js | 67 - .../librejs/lib/script_entries/removed_scripts.js | 73 - .../librejs/lib/script_entries/scripts_cache.js | 192 -- .../resources/librejs/lib/settings/settings_tab.js | 80 - .../resources/librejs/lib/settings/storage.js | 177 -- .../resources/librejs/lib/ui.js | 188 -- .../resources/librejs/lib/ui/notification.js | 78 - .../resources/librejs/lib/ui/script_panel.js | 75 - .../resources/librejs/lib/ui/ui_info.js | 204 -- .../librejs/lib/url_handler/node_punycode.js | 510 ----- .../librejs/lib/url_handler/node_querystring.js | 213 -- .../resources/librejs/lib/url_handler/node_url.js | 691 ------- .../librejs/lib/url_handler/url_handler.js | 116 -- 155 files changed, 21676 deletions(-) delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/README delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/css/style.css delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/images/README delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/images/complain-button3.png delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/images/complain.png delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/images/info-title.png delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/images/separator.png delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/images/torchy2.png delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/chrome_worker/parser/jsdefs.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/chrome_worker/parser/jslex.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/chrome_worker/parser/jsparse.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/chrome_worker/parser/parse.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/complain/contact_finder.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/complain/contact_regex.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/complain/link_types.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/complain/pagemod_finder.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/complain/worker_finder.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/display_panel/content/README delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/display_panel/content/background-panel.png delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/display_panel/content/display-panel.html delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/display_panel/content/librejs-title-old.png delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/display_panel/content/librejs-title.png delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/display_panel/content/panel-styles.css delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/display_panel/main_panel.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/images/gnu-icon-white.ico delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/images/gnu-icon.ico delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/images/gnu-icon.png delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/librejs-settings.html delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/Boost-1.0.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/ISC.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/IntelACPI.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/agpl-3.0.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/apache-2.0.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/artistic-2.0.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/bsd-3-clause.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/cc0.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/clear-bsd.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/cpal-1.0.txt delete mode 100755 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/create-magnets.sh delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/epl-1.0.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/expat.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/freebsd.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/gpl-2.0.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/gpl-3.0.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/illinois-NCSA.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/imlib2.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/lgpl-2.0.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/lgpl-2.1.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/lgpl-3.0.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/magnet-links.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/mpl-2.0.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/public-domain.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/Boost-1.0.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/ISC.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/IntelACPI.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/agpl-3.0.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/apache-2.0.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/artistic-2.0.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/bsd-3-clause.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/cc0.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/clear-bsd.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/cpal-1.0.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/expat.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/freebsd.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/gpl-2.0.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/gpl-3.0.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/illinois-NCSA.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/imlib2.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/lgpl-2.0.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/lgpl-2.1.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/lgpl-3.0.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/magnet-links.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/mpl-2.0.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/public-domain.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/unlicense.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/wtfpl.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/x11.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/torrents/xfree86.txt.torrent delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/unlicense.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/wtfpl.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/x11.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/licenses/xfree86.txt delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/loading/loader.gif delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/loading/loading-panel.html delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/preferences_panel/contentscript.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/preferences_panel/preferences_panel.html delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/script_detector/script_detector.js delete mode 100755 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/script_libraries/gethash.sh delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/script_libraries/script-libraries.json delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/settings/images/button-download.png delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/settings/images/libre.png delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/settings/images/logo-medium.png delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/settings/index.html delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/settings/js/form-row.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/settings/js/form-types.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/settings/js/pagescript-emitter.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/settings/js/pagescript-listener.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/settings/js/permafrost-info-box.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/settings/styles/form.css delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/settings/styles/styles.css delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/settings/third-party/jquery/jquery.min.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/widget/images/README delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/widget/images/librejs-32.png delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/widget/images/librejs-64.png delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/widget/images/librejs-off.png delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/widget/images/librejs.png delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/addon_management/install_uninstall.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/addon_management/prefchange.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder/bug_fix.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder/dom_handler.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder/dom_handler/attributes.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder/dom_handler/dom_checker.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder/dom_handler/dom_gatherer.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder/dom_handler/request.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder/dom_handler/script_object.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder/dom_handler/script_properties.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder/html_parser.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder/url_seen_tester.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder/web_labels/find_js_labels.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder/web_labels/js_web_labels.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder/web_labels/script_hash_worker.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/http_observer/allowed_referrers.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/http_observer/caching.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/http_observer/http_request_observer.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/http_observer/process_response.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/http_observer/stream_loader.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/js_checker/constant_types.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/js_checker/free_checker.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/js_checker/js_checker.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/js_checker/license_definitions.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/js_checker/nontrivial_checker.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/js_checker/pattern_utils.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/js_checker/privacy_checker.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/js_checker/privacy_threat_definitions.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/js_checker/relation_checker.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/main.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/parser/narcissus_worker.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/pref_observer/pref_observer.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/script_entries/accepted_scripts.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/script_entries/all_scripts.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/script_entries/crypto.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/script_entries/dryrun_scripts.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/script_entries/free_libraries.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/script_entries/removed_scripts.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/script_entries/scripts_cache.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/settings/settings_tab.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/settings/storage.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/ui.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/ui/notification.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/ui/script_panel.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/ui/ui_info.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/url_handler/node_punycode.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/url_handler/node_querystring.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/url_handler/node_url.js delete mode 100644 data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/url_handler/url_handler.js (limited to 'data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs') diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/README b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/README deleted file mode 100644 index 6633b5e..0000000 --- a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/README +++ /dev/null @@ -1,2 +0,0 @@ -The stylesheets, HTML files, and images provided in this folder and -its subfolders are released under the GPL version 3 or later. \ No newline at end of file diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/css/style.css b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/css/style.css deleted file mode 100644 index ac93c1b..0000000 --- a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/css/style.css +++ /dev/null @@ -1,191 +0,0 @@ -/** - * GNU LibreJS - A browser add-on to block nonfree nontrivial JavaScript. - * * - * Copyright (C) 2011, 2012, 2014 Loic J. Duros - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - - - -*/ -/* quick reset for box and children */ -#librejs-complaint-box, -#librejs-complaint-box *, -#librejs-complaint-box a:hover, -#librejs-complaint-box a:active, -#librejs-complaint-box a:visited, -#librejs-time-mention, -#librejs-time-mention:hover { - margin:0; - padding:0; - line-height:1; - list-style:square; - color:#000; - text-align:left; - border:0; - content: ''; - font-style:normal; - font-weight:normal; - font-size:12px; - text-decoration:none; - font-variant:normal; - font-family: sans-serif !important; - text-shadow: none !important; - text-transform: none; - background-image:none; - background-color:transparent; -} - -#librejs-time-mention, #librejs-time-mention:hover { - font-size:14px; - font-weight:bold; - text-align:center; -} - -#librejs-complaint-box, #librejs-complaint-box * { - box-sizing: content-box; - width: auto; -} - -div { - width:auto; -} - -#librejs-tab-button { - cursor: pointer; - opacity: 0.6; - display: block; - width: 18px; - - padding-top: 16px; - padding-bottom: 16px; - padding-left: 20px; - - background-color: #e3dedb !important; - border: solid #454545 1px !important; - border-right:none !important; - overflow: hidden; - border-top-left-radius:20px !important; - border-bottom-left-radius:20px !important; - float:left; - z-index:50; - position: relative; - - top: 40px; -} - -#librejs-tab-button:hover { - opacity: 1; -} - -#librejs-tab-button .librejs-complain-button { - height: 93px; - width: 20px; - margin-left: -10px; - background-image: url('../images/complain.png'); - background-repeat: no-repeat; -} - -#librejs-tab-button .librejs-complain-separator { - width: 18px; - height: 88px; - position: absolute; - top: 36px; - left: 46px; - background-image: url("../images/separator.png") !important; - background-repeat: no-repeat !important; -} - -#librejs-complaint-box { - position: fixed; - z-index: 2147483647 !important; /* fix for tech crunch big number */ - right: -465px; - display: none; -} - -#librejs-complaint-info { - border: solid #454545 1px; - background-color:#e3dedb !important; - width:460px !important; - border-top-left-radius: 10px; - z-index:0; - text-align:center; - position: relative; - margin-left: 38px !important; - margin-top: 40px; -} - -#librejs-complaint-info .librejs-hide-button { - cursor: pointer; - font-size: 24px; - float: left; - margin-top: 6px; - margin-left: 8px; -} - -#librejs-complaint-info .librejs-hide-button:hover { - font-weight: bold; -} - -#librejs-complaint-info:hover { - background-color:#e3dedb !important; -} - -#librejs-complaint-info-text { - overflow: auto; - height: auto; - padding: 0 30px; -} - -#librejs-complaint-info h1 { - z-index:1; - font:"Century Schoolbook"; - font-size:25px; - text-align:center; - background:url('../images/info-title.png') no-repeat 50% 30px !important; - overflow: hidden; - text-indent:-3000em; - height:100px; - padding: 20px; - margin:0 !important; - line-height:0 !important; - display:block !important; - clear:none !important; - width:auto !important; -} - -#librejs-complaint-info h1 span.huge { - display:block; - font-size:35px; - font-weight:bold; -} - -#librejs-complaint-info h2 { - font-weight:bold !important; - font-size:14px !important; - margin:20px 0 10px !important; - display:none; - border-top:1px solid #CCC; - padding:10px 0 10px; - text-shadow: 0 1px 0 #FFF !important; -} - -#librejs-complaint-info ul { - margin-left: 15px; -} - -#librejs-complaint-info ul li a { - font-size: 14px !important; -} \ No newline at end of file diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/images/README b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/images/README deleted file mode 100644 index e442861..0000000 --- a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/images/README +++ /dev/null @@ -1,21 +0,0 @@ -/** - * GNU LibreJS - A browser add-on to block nonfree nontrivial JavaScript. - * * - * Copyright (C) 2011, 2012 Loic J. Duros - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -All images in this directory are free, released under the GPLv3 or later. \ No newline at end of file diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/images/complain-button3.png b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/images/complain-button3.png deleted file mode 100644 index 5e3b4e3..0000000 Binary files a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/images/complain-button3.png and /dev/null differ diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/images/complain.png b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/images/complain.png deleted file mode 100644 index ca0cf27..0000000 Binary files a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/images/complain.png and /dev/null differ diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/images/info-title.png b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/images/info-title.png deleted file mode 100644 index 02ebbfa..0000000 Binary files a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/images/info-title.png and /dev/null differ diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/images/separator.png b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/images/separator.png deleted file mode 100644 index 7eedd12..0000000 Binary files a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/images/separator.png and /dev/null differ diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/images/torchy2.png b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/images/torchy2.png deleted file mode 100644 index 60da8fc..0000000 Binary files a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/assets/images/torchy2.png and /dev/null differ diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/chrome_worker/parser/jsdefs.js b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/chrome_worker/parser/jsdefs.js deleted file mode 100644 index aff5c08..0000000 --- a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/chrome_worker/parser/jsdefs.js +++ /dev/null @@ -1,751 +0,0 @@ -/* vim: set sw=4 ts=4 et tw=78: */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Narcissus JavaScript engine. - * - * The Initial Developer of the Original Code is - * Brendan Eich . - * Portions created by the Initial Developer are Copyright (C) 2004 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Tom Austin - * Brendan Eich - * Shu-Yu Guo - * Dave Herman - * Dimitris Vardoulakis - * Patrick Walton - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -/* - * Narcissus - JS implemented in JS. - * - * Well-known constants and lookup tables. Many consts are generated from the - * tokens table via eval to minimize redundancy, so consumers must be compiled - * separately to take advantage of the simple switch-case constant propagation - * done by SpiderMonkey. - */ -/** - * GNU LibreJS - A browser add-on to block nonfree nontrivial JavaScript. - * * - * Copyright (C) 2011, 2012, 2014 Loic J. Duros - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ -//"use scrict"; - -var Narcissus = {}; -(function() { - - var narcissus = { - options: { - version: 185, - // Global variables to hide from the interpreter - hiddenHostGlobals: { Narcissus: true }, - // Desugar SpiderMonkey language extensions? - desugarExtensions: false - }, - hostSupportsEvalConst: (function() { - try { - return eval("(function(s) { eval(s); return x })('const x = true;')"); - } catch (e) { - return false; - } - })(), - hostGlobal: this - }; - Narcissus = narcissus; -})(); - -Narcissus.definitions = (function() { - - var tokens = [ - // End of source. - "END", - - // Operators and punctuators. Some pair-wise order matters, e.g. (+, -) - // and (UNARY_PLUS, UNARY_MINUS). - "\n", ";", - ",", - "=", - "?", ":", "CONDITIONAL", - "||", - "&&", - "|", - "^", - "&", - "==", "!=", "===", "!==", - "<", "<=", ">=", ">", - "<<", ">>", ">>>", - "+", "-", - "*", "/", "%", - "!", "~", "UNARY_PLUS", "UNARY_MINUS", - "++", "--", - ".", - "[", "]", - "{", "}", - "(", ")", - - // Nonterminal tree node type codes. - "SCRIPT", "BLOCK", "LABEL", "FOR_IN", "CALL", "NEW_WITH_ARGS", "INDEX", - "ARRAY_INIT", "OBJECT_INIT", "PROPERTY_INIT", "GETTER", "SETTER", - "GROUP", "LIST", "LET_BLOCK", "ARRAY_COMP", "GENERATOR", "COMP_TAIL", - - // Terminals. - "IDENTIFIER", "NUMBER", "STRING", "REGEXP", - - // Keywords. - "break", - "case", "catch", "const", "continue", - "debugger", "default", "delete", "do", - "else", "export", - "false", "finally", "for", "function", - "if", "import", "in", "instanceof", - "let", "module", - "new", "null", - "return", - "switch", - "this", "throw", "true", "try", "typeof", - "var", "void", - "yield", - "while", "with", - ]; - - var statementStartTokens = [ - "break", - "const", "continue", - "debugger", "do", - "for", - "if", - "return", - "switch", - "throw", "try", - "var", - "yield", - "while", "with", - ]; - - // Whitespace characters (see ECMA-262 7.2) - var whitespaceChars = [ - // normal whitespace: - "\u0009", "\u000B", "\u000C", "\u0020", "\u00A0", "\uFEFF", - - // high-Unicode whitespace: - "\u1680", "\u180E", - "\u2000", "\u2001", "\u2002", "\u2003", "\u2004", "\u2005", "\u2006", - "\u2007", "\u2008", "\u2009", "\u200A", - "\u202F", "\u205F", "\u3000" - ]; - - var whitespace = {}; - for (var i = 0; i < whitespaceChars.length; i++) { - whitespace[whitespaceChars[i]] = true; - } - - // Operator and punctuator mapping from token to tree node type name. - // NB: because the lexer doesn't backtrack, all token prefixes must themselves - // be valid tokens (e.g. !== is acceptable because its prefixes are the valid - // tokens != and !). - var opTypeNames = { - '\n': "NEWLINE", - ';': "SEMICOLON", - ',': "COMMA", - '?': "HOOK", - ':': "COLON", - '||': "OR", - '&&': "AND", - '|': "BITWISE_OR", - '^': "BITWISE_XOR", - '&': "BITWISE_AND", - '===': "STRICT_EQ", - '==': "EQ", - '=': "ASSIGN", - '!==': "STRICT_NE", - '!=': "NE", - '<<': "LSH", - '<=': "LE", - '<': "LT", - '>>>': "URSH", - '>>': "RSH", - '>=': "GE", - '>': "GT", - '++': "INCREMENT", - '--': "DECREMENT", - '+': "PLUS", - '-': "MINUS", - '*': "MUL", - '/': "DIV", - '%': "MOD", - '!': "NOT", - '~': "BITWISE_NOT", - '.': "DOT", - '[': "LEFT_BRACKET", - ']': "RIGHT_BRACKET", - '{': "LEFT_CURLY", - '}': "RIGHT_CURLY", - '(': "LEFT_PAREN", - ')': "RIGHT_PAREN" - }; - - // Hash of keyword identifier to tokens index. NB: we must null __proto__ to - // avoid toString, etc. namespace pollution. - var keywords = {__proto__: null}; - - // Define const END, etc., based on the token names. Also map name to index. - var tokenIds = {}; - - // Building up a string to be eval'd in different contexts. - var consts = Narcissus.hostSupportsEvalConst ? "const " : "var "; - for (var i = 0, j = tokens.length; i < j; i++) { - if (i > 0) - consts += ", "; - var t = tokens[i]; - var name; - if (/^[a-z]/.test(t)) { - name = t.toUpperCase(); - keywords[t] = i; - } else { - name = (/^\W/.test(t) ? opTypeNames[t] : t); - } - consts += name + " = " + i; - tokenIds[name] = i; - tokens[t] = i; - } - consts += ";"; - - var isStatementStartCode = {__proto__: null}; - for (i = 0, j = statementStartTokens.length; i < j; i++) - isStatementStartCode[keywords[statementStartTokens[i]]] = true; - - // Map assignment operators to their indexes in the tokens array. - var assignOps = ['|', '^', '&', '<<', '>>', '>>>', '+', '-', '*', '/', '%']; - - for (i = 0, j = assignOps.length; i < j; i++) { - t = assignOps[i]; - assignOps[t] = tokens[t]; - } - - function defineGetter(obj, prop, fn, dontDelete, dontEnum) { - Object.defineProperty(obj, prop, - { get: fn, configurable: !dontDelete, enumerable: !dontEnum }); - } - - function defineGetterSetter(obj, prop, getter, setter, dontDelete, dontEnum) { - Object.defineProperty(obj, prop, { - get: getter, - set: setter, - configurable: !dontDelete, - enumerable: !dontEnum - }); - } - - function defineMemoGetter(obj, prop, fn, dontDelete, dontEnum) { - Object.defineProperty(obj, prop, { - get: function() { - var val = fn(); - defineProperty(obj, prop, val, dontDelete, true, dontEnum); - return val; - }, - configurable: true, - enumerable: !dontEnum - }); - } - - function defineProperty(obj, prop, val, dontDelete, readOnly, dontEnum) { - Object.defineProperty(obj, prop, - { value: val, writable: !readOnly, configurable: !dontDelete, - enumerable: !dontEnum }); - } - - // Returns true if fn is a native function. (Note: SpiderMonkey specific.) - function isNativeCode(fn) { - // Relies on the toString method to identify native code. - return ((typeof fn) === "function") && fn.toString().match(/\[native code\]/); - } - - var Fpapply = Function.prototype.apply; - - function apply(f, o, a) { - return Fpapply.call(f, [o].concat(a)); - } - - var applyNew; - - // ES5's bind is a simpler way to implement applyNew - if (Function.prototype.bind) { - applyNew = function applyNew(f, a) { - return new (f.bind.apply(f, [,].concat(a)))(); - }; - } else { - applyNew = function applyNew(f, a) { - switch (a.length) { - case 0: - return new f(); - case 1: - return new f(a[0]); - case 2: - return new f(a[0], a[1]); - case 3: - return new f(a[0], a[1], a[2]); - default: - var argStr = "a[0]"; - for (var i = 1, n = a.length; i < n; i++) - argStr += ",a[" + i + "]"; - return eval("new f(" + argStr + ")"); - } - }; - } - - function getPropertyDescriptor(obj, name) { - while (obj) { - if (({}).hasOwnProperty.call(obj, name)) - return Object.getOwnPropertyDescriptor(obj, name); - obj = Object.getPrototypeOf(obj); - } - return undefined; - } - - function getPropertyNames(obj) { - var table = Object.create(null, {}); - while (obj) { - var names = Object.getOwnPropertyNames(obj); - for (var i = 0, n = names.length; i < n; i++) - table[names[i]] = true; - obj = Object.getPrototypeOf(obj); - } - return Object.keys(table); - } - - function getOwnProperties(obj) { - var map = {}; - for (var name in Object.getOwnPropertyNames(obj)) - map[name] = Object.getOwnPropertyDescriptor(obj, name); - return map; - } - - function blacklistHandler(target, blacklist) { - var mask = Object.create(null, {}); - var redirect = StringMap.create(blacklist).mapObject(function(name) { return mask; }); - return mixinHandler(redirect, target); - } - - function whitelistHandler(target, whitelist) { - var catchall = Object.create(null, {}); - var redirect = StringMap.create(whitelist).mapObject(function(name) { return target; }); - return mixinHandler(redirect, catchall); - } - - function mirrorHandler(target, writable) { - var handler = makePassthruHandler(target); - - var defineProperty = handler.defineProperty; - handler.defineProperty = function(name, desc) { - if (!desc.enumerable) - throw new Error("mirror property must be enumerable"); - if (!desc.configurable) - throw new Error("mirror property must be configurable"); - if (desc.writable !== writable) - throw new Error("mirror property must " + (writable ? "" : "not ") + "be writable"); - defineProperty(name, desc); - }; - - handler.fix = function() { }; - handler.getOwnPropertyDescriptor = handler.getPropertyDescriptor; - handler.getOwnPropertyNames = getPropertyNames.bind(handler, target); - handler.keys = handler.enumerate; - handler["delete"] = function() { return false; }; - handler.hasOwn = handler.has; - return handler; - } - - /* - * Mixin proxies break the single-inheritance model of prototypes, so - * the handler treats all properties as own-properties: - * - * X - * | - * +------------+------------+ - * | O | - * | | | - * | O O O | - * | | | | | - * | O O O O | - * | | | | | | - * | O O O O O | - * | | | | | | | - * +-(*)--(w)--(x)--(y)--(z)-+ - */ - - function mixinHandler(redirect, catchall) { - function targetFor(name) { - return hasOwn(redirect, name) ? redirect[name] : catchall; - } - - function getMuxPropertyDescriptor(name) { - var desc = getPropertyDescriptor(targetFor(name), name); - if (desc) - desc.configurable = true; - return desc; - } - - function getMuxPropertyNames() { - var names1 = Object.getOwnPropertyNames(redirect).filter(function(name) { - return name in redirect[name]; - }); - var names2 = getPropertyNames(catchall).filter(function(name) { - return !hasOwn(redirect, name); - }); - return names1.concat(names2); - } - - function enumerateMux() { - var result = Object.getOwnPropertyNames(redirect).filter(function(name) { - return name in redirect[name]; - }); - for (name in catchall) { - if (!hasOwn(redirect, name)) - result.push(name); - }; - return result; - } - - function hasMux(name) { - return name in targetFor(name); - } - - return { - getOwnPropertyDescriptor: getMuxPropertyDescriptor, - getPropertyDescriptor: getMuxPropertyDescriptor, - getOwnPropertyNames: getMuxPropertyNames, - defineProperty: function(name, desc) { - Object.defineProperty(targetFor(name), name, desc); - }, - "delete": function(name) { - var target = targetFor(name); - return delete target[name]; - }, - // FIXME: ha ha ha - fix: function() { }, - has: hasMux, - hasOwn: hasMux, - get: function(receiver, name) { - var target = targetFor(name); - return target[name]; - }, - set: function(receiver, name, val) { - var target = targetFor(name); - target[name] = val; - return true; - }, - enumerate: enumerateMux, - keys: enumerateMux - }; - } - - function makePassthruHandler(obj) { - // Handler copied from - // http://wiki.ecmascript.org/doku.php?id=harmony:proxies&s=proxy%20object#examplea_no-op_forwarding_proxy - return { - getOwnPropertyDescriptor: function(name) { - var desc = Object.getOwnPropertyDescriptor(obj, name); - - // a trapping proxy's properties must always be configurable - desc.configurable = true; - return desc; - }, - getPropertyDescriptor: function(name) { - var desc = getPropertyDescriptor(obj, name); - - // a trapping proxy's properties must always be configurable - desc.configurable = true; - return desc; - }, - getOwnPropertyNames: function() { - return Object.getOwnPropertyNames(obj); - }, - defineProperty: function(name, desc) { - Object.defineProperty(obj, name, desc); - }, - "delete": function(name) { return delete obj[name]; }, - fix: function() { - if (Object.isFrozen(obj)) { - return getOwnProperties(obj); - } - - // As long as obj is not frozen, the proxy won't allow itself to be fixed. - return undefined; // will cause a TypeError to be thrown - }, - - has: function(name) { return name in obj; }, - hasOwn: function(name) { return ({}).hasOwnProperty.call(obj, name); }, - get: function(receiver, name) { return obj[name]; }, - - // bad behavior when set fails in non-strict mode - set: function(receiver, name, val) { obj[name] = val; return true; }, - enumerate: function() { - var result = []; - for (name in obj) { result.push(name); }; - return result; - }, - keys: function() { return Object.keys(obj); } - }; - } - - var hasOwnProperty = ({}).hasOwnProperty; - - function hasOwn(obj, name) { - return hasOwnProperty.call(obj, name); - } - - function StringMap(table, size) { - this.table = table || Object.create(null, {}); - this.size = size || 0; - } - - StringMap.create = function(table) { - var init = Object.create(null, {}); - var size = 0; - var names = Object.getOwnPropertyNames(table); - for (var i = 0, n = names.length; i < n; i++) { - var name = names[i]; - init[name] = table[name]; - size++; - } - return new StringMap(init, size); - }; - - StringMap.prototype = { - has: function(x) { return hasOwnProperty.call(this.table, x); }, - set: function(x, v) { - if (!hasOwnProperty.call(this.table, x)) - this.size++; - this.table[x] = v; - }, - get: function(x) { return this.table[x]; }, - getDef: function(x, thunk) { - if (!hasOwnProperty.call(this.table, x)) { - this.size++; - this.table[x] = thunk(); - } - return this.table[x]; - }, - forEach: function(f) { - var table = this.table; - for (var key in table) - f.call(this, key, table[key]); - }, - map: function(f) { - var table1 = this.table; - var table2 = Object.create(null, {}); - this.forEach(function(key, val) { - table2[key] = f.call(this, val, key); - }); - return new StringMap(table2, this.size); - }, - mapObject: function(f) { - var table1 = this.table; - var table2 = Object.create(null, {}); - this.forEach(function(key, val) { - table2[key] = f.call(this, val, key); - }); - return table2; - }, - toObject: function() { - return this.mapObject(function(val) { return val; }); - }, - choose: function() { - return Object.getOwnPropertyNames(this.table)[0]; - }, - remove: function(x) { - if (hasOwnProperty.call(this.table, x)) { - this.size--; - delete this.table[x]; - } - }, - copy: function() { - var table = Object.create(null, {}); - for (var key in this.table) - table[key] = this.table[key]; - return new StringMap(table, this.size); - }, - keys: function() { - return Object.keys(this.table); - }, - toString: function() { return "[object StringMap]" } - }; - - // an object-key table with poor asymptotics (replace with WeakMap when possible) - function ObjectMap(array) { - this.array = array || []; - } - - function searchMap(map, key, found, notFound) { - var a = map.array; - for (var i = 0, n = a.length; i < n; i++) { - var pair = a[i]; - if (pair.key === key) - return found(pair, i); - } - return notFound(); - } - - ObjectMap.prototype = { - has: function(x) { - return searchMap(this, x, function() { return true }, function() { return false }); - }, - set: function(x, v) { - var a = this.array; - searchMap(this, x, - function(pair) { pair.value = v }, - function() { a.push({ key: x, value: v }) }); - }, - get: function(x) { - return searchMap(this, x, - function(pair) { return pair.value }, - function() { return null }); - }, - getDef: function(x, thunk) { - var a = this.array; - return searchMap(this, x, - function(pair) { return pair.value }, - function() { - var v = thunk(); - a.push({ key: x, value: v }); - return v; - }); - }, - forEach: function(f) { - var a = this.array; - for (var i = 0, n = a.length; i < n; i++) { - var pair = a[i]; - f.call(this, pair.key, pair.value); - } - }, - choose: function() { - return this.array[0].key; - }, - get size() { - return this.array.length; - }, - remove: function(x) { - var a = this.array; - searchMap(this, x, - function(pair, i) { a.splice(i, 1) }, - function() { }); - }, - copy: function() { - return new ObjectMap(this.array.map(function(pair) { - return { key: pair.key, value: pair.value } - })); - }, - clear: function() { - this.array = []; - }, - toString: function() { return "[object ObjectMap]" } - }; - - // non-destructive stack - function Stack(elts) { - this.elts = elts || null; - } - - Stack.prototype = { - push: function(x) { - return new Stack({ top: x, rest: this.elts }); - }, - top: function() { - if (!this.elts) - throw new Error("empty stack"); - return this.elts.top; - }, - isEmpty: function() { - return this.top === null; - }, - find: function(test) { - for (var elts = this.elts; elts; elts = elts.rest) { - if (test(elts.top)) - return elts.top; - } - return null; - }, - has: function(x) { - return Boolean(this.find(function(elt) { return elt === x })); - }, - forEach: function(f) { - for (var elts = this.elts; elts; elts = elts.rest) { - f(elts.top); - } - } - }; - - if (!Array.prototype.copy) { - Array.prototype.copy = function() { - var result = []; - for (var i = 0, n = this.length; i < n; i++) - result[i] = this[i]; - return result; - }; - } - - return { - tokens: tokens, - whitespace: whitespace, - opTypeNames: opTypeNames, - keywords: keywords, - isStatementStartCode: isStatementStartCode, - tokenIds: tokenIds, - consts: consts, - assignOps: assignOps, - defineGetter: defineGetter, - defineGetterSetter: defineGetterSetter, - defineMemoGetter: defineMemoGetter, - defineProperty: defineProperty, - isNativeCode: isNativeCode, - apply: apply, - applyNew: applyNew, - mirrorHandler: mirrorHandler, - mixinHandler: mixinHandler, - whitelistHandler: whitelistHandler, - blacklistHandler: blacklistHandler, - makePassthruHandler: makePassthruHandler, - StringMap: StringMap, - ObjectMap: ObjectMap, - Stack: Stack - }; -}()); diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/chrome_worker/parser/jslex.js b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/chrome_worker/parser/jslex.js deleted file mode 100644 index c5c2673..0000000 --- a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/chrome_worker/parser/jslex.js +++ /dev/null @@ -1,719 +0,0 @@ -/* vim: set sw=4 ts=4 et tw=78: */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Narcissus JavaScript engine. - * - * The Initial Developer of the Original Code is - * Brendan Eich . - * Portions created by the Initial Developer are Copyright (C) 2004 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Tom Austin - * Brendan Eich - * Shu-Yu Guo - * Stephan Herhut - * Dave Herman - * Dimitris Vardoulakis - * Patrick Walton - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ -/** - * GNU LibreJS - A browser add-on to block nonfree nontrivial JavaScript. - * * - * Copyright (C) 2011, 2012, 2014 Loic J. Duros - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ -/* - * Narcissus - JS implemented in JS. - * - * Lexical scanner. - */ - -"use strict"; - -Narcissus.lexer = (function() { - - var definitions = Narcissus.definitions; - - //throw Error (definitions.consts); - - // Set constants in the local scope. - //eval(definitions.consts); - const END = 0, - NEWLINE = 1, - SEMICOLON = 2, - COMMA = 3, - ASSIGN = 4, - HOOK = 5, - COLON = 6, - CONDITIONAL = 7, - OR = 8, - AND = 9, - BITWISE_OR = 10, - BITWISE_XOR = 11, - BITWISE_AND = 12, - EQ = 13, - NE = 14, - STRICT_EQ = 15, - STRICT_NE = 16, - LT = 17, - LE = 18, - GE = 19, - GT = 20, - LSH = 21, - RSH = 22, - URSH = 23, - PLUS = 24, - MINUS = 25, - MUL = 26, - DIV = 27, - MOD = 28, - NOT = 29, - BITWISE_NOT = 30, - UNARY_PLUS = 31, - UNARY_MINUS = 32, - INCREMENT = 33, - DECREMENT = 34, - DOT = 35, - LEFT_BRACKET = 36, - RIGHT_BRACKET = 37, - LEFT_CURLY = 38, - RIGHT_CURLY = 39, - LEFT_PAREN = 40, - RIGHT_PAREN = 41, - SCRIPT = 42, - BLOCK = 43, - LABEL = 44, - FOR_IN = 45, - CALL = 46, - NEW_WITH_ARGS = 47, - INDEX = 48, - ARRAY_INIT = 49, - OBJECT_INIT = 50, - PROPERTY_INIT = 51, - GETTER = 52, - SETTER = 53, - GROUP = 54, - LIST = 55, - LET_BLOCK = 56, - ARRAY_COMP = 57, - GENERATOR = 58, - COMP_TAIL = 59, - IDENTIFIER = 60, - NUMBER = 61, - STRING = 62, - REGEXP = 63, - BREAK = 64, - CASE = 65, - CATCH = 66, - CONST = 67, - CONTINUE = 68, - DEBUGGER = 69, - DEFAULT = 70, - DELETE = 71, - DO = 72, - ELSE = 73, - EXPORT = 74, - FALSE = 75, - FINALLY = 76, - FOR = 77, - FUNCTION = 78, - IF = 79, - IMPORT = 80, - IN = 81, - INSTANCEOF = 82, - LET = 83, - MODULE = 84, - NEW = 85, - NULL = 86, - RETURN = 87, - SWITCH = 88, - THIS = 89, - THROW = 90, - TRUE = 91, - TRY = 92, - TYPEOF = 93, - VAR = 94, - VOID = 95, - YIELD = 96, - WHILE = 97, - WITH = 98; - - // Banned keywords by language version - const blackLists = { 160: {}, 185: {}, harmony: {} }; -/* blackLists[160][LET] = true; - blackLists[160][MODULE] = true; - blackLists[160][YIELD] = true; - blackLists[185][MODULE] = true; -*/ - // Build up a trie of operator tokens. - var opTokens = {}; - for (var op in definitions.opTypeNames) { - if (op === '\n' || op === '.') - continue; - - var node = opTokens; - for (var i = 0; i < op.length; i++) { - var ch = op[i]; - if (!(ch in node)) - node[ch] = {}; - node = node[ch]; - node.op = op; - } - } - - /* - * Since JavaScript provides no convenient way to determine if a - * character is in a particular Unicode category, we use - * metacircularity to accomplish this (oh yeaaaah!) - */ - function isValidIdentifierChar(ch, first) { - // check directly for ASCII - if (ch <= "\u007F") { - if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || ch === '$' || ch === '_' || - (!first && (ch >= '0' && ch <= '9'))) { - return true; - } - return false; - } - - // create an object to test this in - var x = {}; - x["x"+ch] = true; - x[ch] = true; - - // then use eval to determine if it's a valid character - var valid = false; - try { - valid = (Function("x", "return (x." + (first?"":"x") + ch + ");")(x) === true); - } catch (ex) {} - - return valid; - } - - function isIdentifier(str) { - if (typeof str !== "string") - return false; - - if (str.length === 0) - return false; - - if (!isValidIdentifierChar(str[0], true)) - return false; - - for (var i = 1; i < str.length; i++) { - if (!isValidIdentifierChar(str[i], false)) - return false; - } - - return true; - } - - /* - * Tokenizer :: (source, filename, line number) -> Tokenizer - */ - function Tokenizer(s, f, l) { - this.cursor = 0; - this.source = String(s); - this.tokens = []; - this.tokenIndex = 0; - this.lookahead = 0; - this.scanNewlines = false; - this.unexpectedEOF = false; - this.filename = f || ""; - this.lineno = l || 1; - this.blackList = blackLists[Narcissus.options.version]; - this.blockComments = null; - } - - Tokenizer.prototype = { - get done() { - // We need to set scanOperand to true here because the first thing - // might be a regexp. - return this.peek(true) === END; - }, - - get token() { - return this.tokens[this.tokenIndex]; - }, - - match: function (tt, scanOperand) { - return this.get(scanOperand) === tt || this.unget(); - }, - - mustMatch: function (tt) { - if (!this.match(tt)) { - throw this.newSyntaxError("Missing " + - definitions.tokens[tt].toLowerCase()); - } - return this.token; - }, - - peek: function (scanOperand) { - var tt, next; - if (this.lookahead) { - next = this.tokens[(this.tokenIndex + this.lookahead) & 3]; - tt = (this.scanNewlines && next.lineno !== this.lineno) - ? NEWLINE - : next.type; - } else { - tt = this.get(scanOperand); - this.unget(); - } - return tt; - }, - - peekOnSameLine: function (scanOperand) { - this.scanNewlines = true; - var tt = this.peek(scanOperand); - this.scanNewlines = false; - return tt; - }, - - lastBlockComment: function() { - var length = this.blockComments.length; - return length ? this.blockComments[length - 1] : null; - }, - - // Eat comments and whitespace. - skip: function () { - var input = this.source; - this.blockComments = []; - for (;;) { - var ch = input[this.cursor++]; - var next = input[this.cursor]; - // handle \r, \r\n and (always preferable) \n - if (ch === '\r') { - // if the next character is \n, we don't care about this at all - if (next === '\n') continue; - - // otherwise, we want to consider this as a newline - ch = '\n'; - } - - if (ch === '\n' && !this.scanNewlines) { - this.lineno++; - } else if (ch === '/' && next === '*') { - var commentStart = ++this.cursor; - for (;;) { - ch = input[this.cursor++]; - if (ch === undefined) - throw this.newSyntaxError("Unterminated comment"); - - if (ch === '*') { - next = input[this.cursor]; - if (next === '/') { - var commentEnd = this.cursor - 1; - this.cursor++; - break; - } - } else if (ch === '\n') { - this.lineno++; - } - } - this.blockComments.push(input.substring(commentStart, commentEnd)); - } - else if (ch === '-' && next === '-' && - input[this.cursor + 1] === '>') { - this.cursor += 2; - } - else if ((ch === '/' && next === '/') || - (ch === '<' && next === '!' && - input[this.cursor + 1] === '-' && - input[this.cursor + 2] === '-' && - (this.cursor += 2))) { - - // capture single line comments starts. - var commentStart = ++this.cursor; - for (;;) { - ch = input[this.cursor++]; - if (ch === undefined) { - //this.lineno++; - break; - //throw this.newSyntaxError("Unterminated comment"); - } - if (ch === '\r') { - // check for \r\n - if (next !== '\n') ch = '\n'; - var commentEnd = this.cursor - 1; - } - - if (ch === '\n') { - if (this.scanNewlines) { - this.cursor--; - } else { - this.lineno++; - } - var commentEnd = this.cursor - 1; - break; - } - } - this.blockComments.push(input.substring(commentStart, commentEnd)); - // capture single line comments ends. - } else if (!(ch in definitions.whitespace)) { - this.cursor--; - return; - } - } - }, - - // Lex the exponential part of a number, if present. Return true iff an - // exponential part was found. - lexExponent: function() { - var input = this.source; - var next = input[this.cursor]; - if (next === 'e' || next === 'E') { - this.cursor++; - ch = input[this.cursor++]; - if (ch === '+' || ch === '-') - ch = input[this.cursor++]; - - if (ch < '0' || ch > '9') - throw this.newSyntaxError("Missing exponent"); - - do { - ch = input[this.cursor++]; - } while (ch >= '0' && ch <= '9'); - this.cursor--; - - return true; - } - - return false; - }, - - lexZeroNumber: function (ch) { - var token = this.token, input = this.source; - token.type = NUMBER; - - ch = input[this.cursor++]; - if (ch === '.') { - do { - ch = input[this.cursor++]; - } while (ch >= '0' && ch <= '9'); - this.cursor--; - - this.lexExponent(); - token.value = parseFloat( - input.substring(token.start, this.cursor)); - } else if (ch === 'x' || ch === 'X') { - do { - ch = input[this.cursor++]; - } while ((ch >= '0' && ch <= '9') || (ch >= 'a' && ch <= 'f') || - (ch >= 'A' && ch <= 'F')); - this.cursor--; - - token.value = parseInt(input.substring(token.start, this.cursor)); - } else if (ch >= '0' && ch <= '7') { - do { - ch = input[this.cursor++]; - } while (ch >= '0' && ch <= '7'); - this.cursor--; - - token.value = parseInt(input.substring(token.start, this.cursor)); - } else { - this.cursor--; - this.lexExponent(); // 0E1, &c. - token.value = 0; - } - }, - - lexNumber: function (ch) { - var token = this.token, input = this.source; - token.type = NUMBER; - - var floating = false; - do { - ch = input[this.cursor++]; - if (ch === '.' && !floating) { - floating = true; - ch = input[this.cursor++]; - } - } while (ch >= '0' && ch <= '9'); - - this.cursor--; - - var exponent = this.lexExponent(); - floating = floating || exponent; - - var str = input.substring(token.start, this.cursor); - token.value = floating ? parseFloat(str) : parseInt(str); - }, - - lexDot: function (ch) { - var token = this.token, input = this.source; - var next = input[this.cursor]; - if (next >= '0' && next <= '9') { - do { - ch = input[this.cursor++]; - } while (ch >= '0' && ch <= '9'); - this.cursor--; - - this.lexExponent(); - - token.type = NUMBER; - token.value = parseFloat( - input.substring(token.start, this.cursor)); - } else { - token.type = DOT; - token.assignOp = null; - token.value = '.'; - } - }, - - lexString: function (ch) { - var token = this.token, input = this.source; - token.type = STRING; - - var hasEscapes = false; - var delim = ch; - if (input.length <= this.cursor) - throw this.newSyntaxError("Unterminated string literal"); - while ((ch = input[this.cursor++]) !== delim) { - if (this.cursor == input.length) - throw this.newSyntaxError("Unterminated string literal"); - if (ch === '\\') { - hasEscapes = true; - if (++this.cursor == input.length) - throw this.newSyntaxError("Unterminated string literal"); - } - } - - token.value = hasEscapes - ? eval(input.substring(token.start, this.cursor)) - : input.substring(token.start + 1, this.cursor - 1); - }, - - lexRegExp: function (ch) { - var token = this.token, input = this.source; - token.type = REGEXP; - - do { - ch = input[this.cursor++]; - if (ch === '\\') { - this.cursor++; - } else if (ch === '[') { - do { - if (ch === undefined) - throw this.newSyntaxError("Unterminated character class"); - - if (ch === '\\') - this.cursor++; - - ch = input[this.cursor++]; - } while (ch !== ']'); - } else if (ch === undefined) { - throw this.newSyntaxError("Unterminated regex"); - } - } while (ch !== '/'); - - do { - ch = input[this.cursor++]; - } while (ch >= 'a' && ch <= 'z'); - - this.cursor--; - - token.value = eval(input.substring(token.start, this.cursor)); - }, - - lexOp: function (ch) { - var token = this.token, input = this.source; - - // A bit ugly, but it seems wasteful to write a trie lookup routine - // for only 3 characters... - var node = opTokens[ch]; - var next = input[this.cursor]; - if (next in node) { - node = node[next]; - this.cursor++; - next = input[this.cursor]; - if (next in node) { - node = node[next]; - this.cursor++; - next = input[this.cursor]; - } - } - - var op = node.op; - if (definitions.assignOps[op] && input[this.cursor] === '=') { - this.cursor++; - token.type = ASSIGN; - token.assignOp = definitions.tokenIds[definitions.opTypeNames[op]]; - op += '='; - } else { - token.type = definitions.tokenIds[definitions.opTypeNames[op]]; - token.assignOp = null; - } - - token.value = op; - }, - - // FIXME: Unicode escape sequences - lexIdent: function (ch) { - var token = this.token; - var id = ch; - - while ((ch = this.getValidIdentifierChar(false)) !== null) { - id += ch; - } - - token.type = definitions.keywords[id] || IDENTIFIER; - if (token.type in this.blackList) { - // banned keyword, this is an identifier - token.type = IDENTIFIER; - } - token.value = id; - }, - - /* - * Tokenizer.get :: void -> token type - * - * Consume input *only* if there is no lookahead. - * Dispatch to the appropriate lexing function depending on the input. - */ - get: function (scanOperand) { - var token; - while (this.lookahead) { - --this.lookahead; - this.tokenIndex = (this.tokenIndex + 1) & 3; - token = this.tokens[this.tokenIndex]; - if (token.type !== NEWLINE || this.scanNewlines) - return token.type; - } - - this.skip(); - - this.tokenIndex = (this.tokenIndex + 1) & 3; - token = this.tokens[this.tokenIndex]; - if (!token) - this.tokens[this.tokenIndex] = token = {}; - - var input = this.source; - if (this.cursor >= input.length) - return token.type = END; - - token.start = this.cursor; - token.lineno = this.lineno; - - var ich = this.getValidIdentifierChar(true); - var ch = (ich === null) ? input[this.cursor++] : null; - if (ich !== null) { - this.lexIdent(ich); - } else if (scanOperand && ch === '/') { - this.lexRegExp(ch); - } else if (ch in opTokens) { - this.lexOp(ch); - } else if (ch === '.') { - this.lexDot(ch); - } else if (ch >= '1' && ch <= '9') { - this.lexNumber(ch); - } else if (ch === '0') { - this.lexZeroNumber(ch); - } else if (ch === '"' || ch === "'") { - this.lexString(ch); - } else if (this.scanNewlines && (ch === '\n' || ch === '\r')) { - // if this was a \r, look for \r\n - if (ch === '\r' && input[this.cursor] === '\n') this.cursor++; - token.type = NEWLINE; - token.value = '\n'; - this.lineno++; - } else { - throw this.newSyntaxError("Illegal token"); - } - - token.end = this.cursor; - return token.type; - }, - - /* - * Tokenizer.unget :: void -> undefined - * - * Match depends on unget returning undefined. - */ - unget: function () { - if (++this.lookahead === 4) throw "PANIC: too much lookahead!"; - this.tokenIndex = (this.tokenIndex - 1) & 3; - }, - - newSyntaxError: function (m) { - m = (this.filename ? this.filename + ":" : "") + this.lineno + ": " + m; - var e = new SyntaxError(m, this.filename, this.lineno); - e.source = this.source; - e.cursor = this.lookahead - ? this.tokens[(this.tokenIndex + this.lookahead) & 3].start - : this.cursor; - return e; - }, - - - /* Gets a single valid identifier char from the input stream, or null - * if there is none. - */ - getValidIdentifierChar: function(first) { - var input = this.source; - if (this.cursor >= input.length) return null; - var ch = input[this.cursor]; - - // first check for \u escapes - if (ch === '\\' && input[this.cursor+1] === 'u') { - // get the character value - try { - ch = String.fromCharCode(parseInt( - input.substring(this.cursor + 2, this.cursor + 6), - 16)); - } catch (ex) { - return null; - } - this.cursor += 5; - } - - var valid = isValidIdentifierChar(ch, first); - if (valid) this.cursor++; - return (valid ? ch : null); - }, - }; - - - return { - isIdentifier: isIdentifier, - Tokenizer: Tokenizer - }; - -}()); diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/chrome_worker/parser/jsparse.js b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/chrome_worker/parser/jsparse.js deleted file mode 100644 index b78078c..0000000 --- a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/chrome_worker/parser/jsparse.js +++ /dev/null @@ -1,2042 +0,0 @@ -/* -*- Mode: JS; tab-width: 4; indent-tabs-mode: nil; -*- - * vim: set sw=4 ts=4 et tw=78: - * ***** BEGIN LICENSE BLOCK ***** - * - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Narcissus JavaScript engine. - * - * The Initial Developer of the Original Code is - * Brendan Eich . - * Portions created by the Initial Developer are Copyright (C) 2004 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Tom Austin - * Brendan Eich - * Shu-Yu Guo - * Dave Herman - * Dimitris Vardoulakis - * Patrick Walton - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ -/** - * GNU LibreJS - A browser add-on to block nonfree nontrivial JavaScript. - * * - * Copyright (C) 2011, 2012, 2014 Loic J. Duros - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ -/* - * Narcissus - JS implemented in JS. - * - * Parser. - */ - -"use strict"; - -Narcissus.parser = (function() { - - var lexer = Narcissus.lexer; - var definitions = Narcissus.definitions; - - const StringMap = definitions.StringMap; - const Stack = definitions.Stack; - - var comment; - - // Set constants in the local scope. - //eval(definitions.consts); - const END = 0, - NEWLINE = 1, - SEMICOLON = 2, - COMMA = 3, - ASSIGN = 4, - HOOK = 5, - COLON = 6, - CONDITIONAL = 7, - OR = 8, - AND = 9, - BITWISE_OR = 10, - BITWISE_XOR = 11, - BITWISE_AND = 12, - EQ = 13, - NE = 14, - STRICT_EQ = 15, - STRICT_NE = 16, - LT = 17, - LE = 18, - GE = 19, - GT = 20, - LSH = 21, - RSH = 22, - URSH = 23, - PLUS = 24, - MINUS = 25, - MUL = 26, - DIV = 27, - MOD = 28, - NOT = 29, - BITWISE_NOT = 30, - UNARY_PLUS = 31, - UNARY_MINUS = 32, - INCREMENT = 33, - DECREMENT = 34, - DOT = 35, - LEFT_BRACKET = 36, - RIGHT_BRACKET = 37, - LEFT_CURLY = 38, - RIGHT_CURLY = 39, - LEFT_PAREN = 40, - RIGHT_PAREN = 41, - SCRIPT = 42, - BLOCK = 43, - LABEL = 44, - FOR_IN = 45, - CALL = 46, - NEW_WITH_ARGS = 47, - INDEX = 48, - ARRAY_INIT = 49, - OBJECT_INIT = 50, - PROPERTY_INIT = 51, - GETTER = 52, - SETTER = 53, - GROUP = 54, - LIST = 55, - LET_BLOCK = 56, - ARRAY_COMP = 57, - GENERATOR = 58, - COMP_TAIL = 59, - IDENTIFIER = 60, - NUMBER = 61, - STRING = 62, - REGEXP = 63, - BREAK = 64, - CASE = 65, - CATCH = 66, - CONST = 67, - CONTINUE = 68, - DEBUGGER = 69, - DEFAULT = 70, - DELETE = 71, - DO = 72, - ELSE = 73, - EXPORT = 74, - FALSE = 75, - FINALLY = 76, - FOR = 77, - FUNCTION = 78, - IF = 79, - IMPORT = 80, - IN = 81, - INSTANCEOF = 82, - LET = 83, - MODULE = 84, - NEW = 85, - NULL = 86, - RETURN = 87, - SWITCH = 88, - THIS = 89, - THROW = 90, - TRUE = 91, - TRY = 92, - TYPEOF = 93, - VAR = 94, - VOID = 95, - YIELD = 96, - WHILE = 97, - WITH = 98; - - // Banned statement types by language version. - const blackLists = { 160: {}, 185: {}, harmony: {} }; - /* blackLists[160][IMPORT] = true; - blackLists[160][EXPORT] = true; - blackLists[160][LET] = true; - blackLists[160][MODULE] = true; - blackLists[160][YIELD] = true; - blackLists[185][IMPORT] = true; - blackLists[185][EXPORT] = true; - blackLists[185][MODULE] = true; - blackLists.harmony[WITH] = true; -*/ - /* - * pushDestructuringVarDecls :: (node, hoisting node) -> void - * - * Recursively add all destructured declarations to varDecls. - */ - function pushDestructuringVarDecls(n, s) { - for (var i in n) { - var sub = n[i]; - if (sub.type === IDENTIFIER) { - s.varDecls.push(sub); - } else { - pushDestructuringVarDecls(sub, s); - } - } - } - - function StaticContext(parentScript, parentBlock, inModule, inFunction) { - this.parentScript = parentScript; - this.parentBlock = parentBlock || parentScript; - this.inModule = inModule || false; - this.inFunction = inFunction || false; - this.inForLoopInit = false; - this.topLevel = true; - this.allLabels = new Stack(); - this.currentLabels = new Stack(); - this.labeledTargets = new Stack(); - this.defaultLoopTarget = null; - this.defaultTarget = null; - this.blackList = blackLists[Narcissus.options.version]; - Narcissus.options.ecma3OnlyMode && (this.ecma3OnlyMode = true); - Narcissus.options.parenFreeMode && (this.parenFreeMode = true); - } - - StaticContext.prototype = { - ecma3OnlyMode: false, - parenFreeMode: false, - // non-destructive update via prototype extension - update: function(ext) { - var desc = {}; - for (var key in ext) { - desc[key] = { - value: ext[key], - writable: true, - enumerable: true, - configurable: true - } - } - return Object.create(this, desc); - }, - pushLabel: function(label) { - return this.update({ currentLabels: this.currentLabels.push(label), - allLabels: this.allLabels.push(label) }); - }, - pushTarget: function(target) { - var isDefaultLoopTarget = target.isLoop; - var isDefaultTarget = isDefaultLoopTarget || target.type === SWITCH; - - if (this.currentLabels.isEmpty()) { - if (isDefaultLoopTarget) this.update({ defaultLoopTarget: target }); - if (isDefaultTarget) this.update({ defaultTarget: target }); - return this; - } - - target.labels = new StringMap(); - this.currentLabels.forEach(function(label) { - target.labels.set(label, true); - }); - return this.update({ currentLabels: new Stack(), - labeledTargets: this.labeledTargets.push(target), - defaultLoopTarget: isDefaultLoopTarget - ? target - : this.defaultLoopTarget, - defaultTarget: isDefaultTarget - ? target - : this.defaultTarget }); - }, - nest: function() { - return this.topLevel ? this.update({ topLevel: false }) : this; - }, - allow: function(type) { - switch (type) { - case EXPORT: - if (!this.inModule || this.inFunction || !this.topLevel) - return false; - // FALL THROUGH - - case IMPORT: - return !this.inFunction && this.topLevel; - - case MODULE: - return !this.inFunction && this.topLevel; - - default: - return true; - } - } - }; - - /* - * Script :: (tokenizer, boolean, boolean) -> node - * - * Parses the toplevel and module/function bodies. - */ - function Script(t, inModule, inFunction) { - var n = new Node(t, scriptInit()); - Statements(t, new StaticContext(n, n, inModule, inFunction), n); - return n; - } - - // We extend Array slightly with a top-of-stack method. - definitions.defineProperty(Array.prototype, "top", - function() { - return this.length && this[this.length-1]; - }, false, false, true); - - /* - * Node :: (tokenizer, optional init object) -> node - */ - function Node(t, init) { - var token = t.token; - if (token) { - // If init.type exists it will override token.type. - this.type = token.type; - this.value = token.value; - this.lineno = token.lineno; - - // Start and end are file positions for error handling. - this.start = token.start; - this.end = token.end; - } else { - this.lineno = t.lineno; - } - - // Node uses a tokenizer for debugging (getSource, filename getter). - this.tokenizer = t; - this.children = []; - - for (var prop in init) - this[prop] = init[prop]; - } - - /* - * SyntheticNode :: (tokenizer, optional init object) -> node - */ - function SyntheticNode(t, init) { - // print("SYNTHETIC NODE"); - // if (init.type === COMMA) { - // print("SYNTHETIC COMMA"); - // print(init); - // } - this.tokenizer = t; - this.children = []; - for (var prop in init) - this[prop] = init[prop]; - this.synthetic = true; - } - - var Np = Node.prototype = SyntheticNode.prototype = {}; - Np.constructor = Node; - - const TO_SOURCE_SKIP = { - type: true, - value: true, - lineno: true, - start: true, - end: true, - tokenizer: true, - assignOp: true - }; - function unevalableConst(code) { - var token = definitions.tokens[code]; - var constName = definitions.opTypeNames.hasOwnProperty(token) - ? definitions.opTypeNames[token] - : token in definitions.keywords - ? token.toUpperCase() - : token; - return { toSource: function() { return constName } }; - } - Np.toSource = function toSource() { - var mock = {}; - var self = this; - mock.type = unevalableConst(this.type); - if ("value" in this) - mock.value = this.value; - if ("lineno" in this) - mock.lineno = this.lineno; - if ("start" in this) - mock.start = this.start; - if ("end" in this) - mock.end = this.end; - if (this.assignOp) - mock.assignOp = unevalableConst(this.assignOp); - for (var key in this) { - if (this.hasOwnProperty(key) && !(key in TO_SOURCE_SKIP)) - mock[key] = this[key]; - } - return mock.toSource(); - }; - - // Always use push to add operands to an expression, to update start and end. - Np.push = function (kid) { - // kid can be null e.g. [1, , 2]. - if (kid !== null) { - if (kid.start < this.start) - this.start = kid.start; - if (this.end < kid.end) - this.end = kid.end; - } - return this.children.push(kid); - } - - Node.indentLevel = 0; - - function tokenString(tt) { - var t = definitions.tokens[tt]; - return /^\W/.test(t) ? definitions.opTypeNames[t] : t.toUpperCase(); - } - - Np.toString = function () { - var a = []; - for (var i in this) { - if (this.hasOwnProperty(i) && i !== 'type' && i !== 'target') - a.push({id: i, value: this[i]}); - } - a.sort(function (a,b) { return (a.id < b.id) ? -1 : 1; }); - const INDENTATION = " "; - var n = ++Node.indentLevel; - var s = "{\n" + INDENTATION.repeat(n) + "type: " + tokenString(this.type); - for (i = 0; i < a.length; i++) - s += ",\n" + INDENTATION.repeat(n) + a[i].id + ": " + a[i].value; - n = --Node.indentLevel; - s += "\n" + INDENTATION.repeat(n) + "}"; - return s; - } - - Np.getSource = function () { - return this.tokenizer.source.slice(this.start, this.end); - }; - - /* - * Helper init objects for common nodes. - */ - - const LOOP_INIT = { isLoop: true }; - - function blockInit() { - return { type: BLOCK, varDecls: [] }; - } - - function scriptInit() { - return { type: SCRIPT, - funDecls: [], - varDecls: [], - modDefns: new StringMap(), - modAssns: new StringMap(), - modDecls: new StringMap(), - modLoads: new StringMap(), - impDecls: [], - expDecls: [], - exports: new StringMap(), - hasEmptyReturn: false, - hasReturnWithValue: false, - isGenerator: false }; - } - - definitions.defineGetter(Np, "filename", - function() { - return this.tokenizer.filename; - }); - - definitions.defineGetter(Np, "length", - function() { - throw new Error("Node.prototype.length is gone; " + - "use n.children.length instead"); - }); - - definitions.defineProperty(String.prototype, "repeat", - function(n) { - var s = "", t = this + s; - while (--n >= 0) - s += t; - return s; - }, false, false, true); - - function MaybeLeftParen(t, x) { - if (x.parenFreeMode) - return t.match(LEFT_PAREN) ? LEFT_PAREN : END; - return t.mustMatch(LEFT_PAREN).type; - } - - function MaybeRightParen(t, p) { - if (p === LEFT_PAREN) - t.mustMatch(RIGHT_PAREN); - } - - /* - * Statements :: (tokenizer, compiler context, node) -> void - * - * Parses a sequence of Statements. - */ - function Statements(t, x, n) { - try { - while (!t.done && t.peek(true) !== RIGHT_CURLY) - n.push(Statement(t, x)); - } catch (e) { - if (t.done) - t.unexpectedEOF = true; - throw e; - } - } - - function Block(t, x) { - t.mustMatch(LEFT_CURLY); - var n = new Node(t, blockInit()); - Statements(t, x.update({ parentBlock: n }).pushTarget(n), n); - t.mustMatch(RIGHT_CURLY); - return n; - } - - const DECLARED_FORM = 0, EXPRESSED_FORM = 1, STATEMENT_FORM = 2; - - /* - * Export :: (binding node, boolean) -> Export - * - * Static semantic representation of a module export. - */ - function Export(node, isDefinition) { - this.node = node; // the AST node declaring this individual export - this.isDefinition = isDefinition; // is the node an 'export'-annotated definition? - this.resolved = null; // resolved pointer to the target of this export - } - - /* - * registerExport :: (StringMap, EXPORT node) -> void - */ - function registerExport(exports, decl) { - function register(name, exp) { - if (exports.has(name)) - throw new SyntaxError("multiple exports of " + name); - exports.set(name, exp); - } - - switch (decl.type) { - case MODULE: - case FUNCTION: - register(decl.name, new Export(decl, true)); - break; - - case VAR: - for (var i = 0; i < decl.children.length; i++) - register(decl.children[i].name, new Export(decl.children[i], true)); - break; - - case LET: - case CONST: - throw new Error("NYI: " + definitions.tokens[decl.type]); - - case EXPORT: - for (var i = 0; i < decl.pathList.length; i++) { - var path = decl.pathList[i]; - switch (path.type) { - case OBJECT_INIT: - for (var j = 0; j < path.children.length; j++) { - // init :: IDENTIFIER | PROPERTY_INIT - var init = path.children[j]; - if (init.type === IDENTIFIER) - register(init.value, new Export(init, false)); - else - register(init.children[0].value, new Export(init.children[1], false)); - } - break; - - case DOT: - register(path.children[1].value, new Export(path, false)); - break; - - case IDENTIFIER: - register(path.value, new Export(path, false)); - break; - - default: - throw new Error("unexpected export path: " + definitions.tokens[path.type]); - } - } - break; - - default: - throw new Error("unexpected export decl: " + definitions.tokens[exp.type]); - } - } - - /* - * Module :: (node) -> Module - * - * Static semantic representation of a module. - */ - function Module(node) { - var exports = node.body.exports; - var modDefns = node.body.modDefns; - - var exportedModules = new StringMap(); - - exports.forEach(function(name, exp) { - var node = exp.node; - if (node.type === MODULE) { - exportedModules.set(name, node); - } else if (!exp.isDefinition && node.type === IDENTIFIER && modDefns.has(node.value)) { - var mod = modDefns.get(node.value); - exportedModules.set(name, mod); - } - }); - - this.node = node; - this.exports = exports; - this.exportedModules = exportedModules; - } - - /* - * Statement :: (tokenizer, compiler context) -> node - * - * Parses a Statement. - */ - function Statement(t, x) { - var i, label, n, n2, p, c, ss, tt = t.get(true), tt2, x2, x3; - - var comments = t.blockComments; - - if (x.blackList[tt]) - throw t.newSyntaxError(definitions.tokens[tt] + " statements only allowed in Harmony"); - if (!x.allow(tt)) - throw t.newSyntaxError(definitions.tokens[tt] + " statement in illegal context"); - - // Cases for statements ending in a right curly return early, avoiding the - // common semicolon insertion magic after this switch. - switch (tt) { - case IMPORT: - n = new Node(t); - n.pathList = ImportPathList(t, x); - x.parentScript.impDecls.push(n); - n.blockComments = comments; - break; - - case EXPORT: - switch (t.peek()) { - case MODULE: - case FUNCTION: - case LET: - case VAR: - case CONST: - n = Statement(t, x); - n.blockComments = comments; - n.exported = true; - x.parentScript.expDecls.push(n); - registerExport(x.parentScript.exports, n); - return n; - - default: - n = new Node(t); - n.blockComments = comments; - n.pathList = ExportPathList(t, x); - break; - } - x.parentScript.expDecls.push(n); - registerExport(x.parentScript.exports, n); - break; - - case MODULE: - n = new Node(t); - n.blockComments = comments; - t.mustMatch(IDENTIFIER); - label = t.token.value; - - if (t.match(LEFT_CURLY)) { - n.name = label; - n.body = Script(t, true, false); - n.module = new Module(n); - t.mustMatch(RIGHT_CURLY); - x.parentScript.modDefns.set(n.name, n); - return n; - } - - t.unget(); - ModuleVariables(t, x, n); - return n; - - case FUNCTION: - // DECLARED_FORM extends funDecls of x, STATEMENT_FORM doesn't. - return FunctionDefinition(t, x, true, x.topLevel ? DECLARED_FORM : STATEMENT_FORM, comments); - - case LEFT_CURLY: - n = new Node(t, blockInit()); - n.blockComments = comments; - Statements(t, x.update({ parentBlock: n }).pushTarget(n).nest(), n); - t.mustMatch(RIGHT_CURLY); - return n; - - case IF: - n = new Node(t); - n.blockComments = comments; - n.condition = HeadExpression(t, x); - x2 = x.pushTarget(n).nest(); - n.thenPart = Statement(t, x2); - n.elsePart = t.match(ELSE, true) ? Statement(t, x2) : null; - return n; - - case SWITCH: - // This allows CASEs after a DEFAULT, which is in the standard. - n = new Node(t, { cases: [], defaultIndex: -1 }); - n.blockComments = comments; - n.discriminant = HeadExpression(t, x); - x2 = x.pushTarget(n).nest(); - t.mustMatch(LEFT_CURLY); - while ((tt = t.get()) !== RIGHT_CURLY) { - switch (tt) { - case DEFAULT: - if (n.defaultIndex >= 0) - throw t.newSyntaxError("More than one switch default"); - // FALL THROUGH - case CASE: - n2 = new Node(t); - if (tt === DEFAULT) - n.defaultIndex = n.cases.length; - else - n2.caseLabel = Expression(t, x2, COLON); - break; - - default: - throw t.newSyntaxError("Invalid switch case"); - } - t.mustMatch(COLON); - n2.statements = new Node(t, blockInit()); - while ((tt=t.peek(true)) !== CASE && tt !== DEFAULT && - tt !== RIGHT_CURLY) - n2.statements.push(Statement(t, x2)); - n.cases.push(n2); - } - return n; - - case FOR: - n = new Node(t, LOOP_INIT); - n.blockComments = comments; - if (t.match(IDENTIFIER)) { - if (t.token.value === "each") - n.isEach = true; - else - t.unget(); - } - if (!x.parenFreeMode) - t.mustMatch(LEFT_PAREN); - x2 = x.pushTarget(n).nest(); - x3 = x.update({ inForLoopInit: true }); - n2 = null; - if ((tt = t.peek(true)) !== SEMICOLON) { - if (tt === VAR || tt === CONST) { - t.get(); - n2 = Variables(t, x3); - } else if (tt === LET) { - t.get(); - if (t.peek() === LEFT_PAREN) { - n2 = LetBlock(t, x3, false); - } else { - // Let in for head, we need to add an implicit block - // around the rest of the for. - x3.parentBlock = n; - n.varDecls = []; - n2 = Variables(t, x3); - } - } else { - n2 = Expression(t, x3); - } - } - if (n2 && t.match(IN)) { - n.type = FOR_IN; - n.object = Expression(t, x3); - if (n2.type === VAR || n2.type === LET) { - c = n2.children; - - // Destructuring turns one decl into multiples, so either - // there must be only one destructuring or only one - // decl. - if (c.length !== 1 && n2.destructurings.length !== 1) { - throw new SyntaxError("Invalid for..in left-hand side", - t.filename, n2.lineno); - } - if (n2.destructurings.length > 0) { - n.iterator = n2.destructurings[0]; - } else { - n.iterator = c[0]; - } - n.varDecl = n2; - } else { - if (n2.type === ARRAY_INIT || n2.type === OBJECT_INIT) { - n2.destructuredNames = checkDestructuring(t, x3, n2); - } - n.iterator = n2; - } - } else { - x3.inForLoopInit = false; - n.setup = n2; - t.mustMatch(SEMICOLON); - if (n.isEach) - throw t.newSyntaxError("Invalid for each..in loop"); - n.condition = (t.peek(true) === SEMICOLON) - ? null - : Expression(t, x3); - t.mustMatch(SEMICOLON); - tt2 = t.peek(true); - n.update = (x.parenFreeMode - ? tt2 === LEFT_CURLY || definitions.isStatementStartCode[tt2] - : tt2 === RIGHT_PAREN) - ? null - : Expression(t, x3); - } - if (!x.parenFreeMode) - t.mustMatch(RIGHT_PAREN); - n.body = Statement(t, x2); - return n; - - case WHILE: - n = new Node(t, { isLoop: true }); - n.blockComments = comments; - n.condition = HeadExpression(t, x); - n.body = Statement(t, x.pushTarget(n).nest()); - return n; - - case DO: - n = new Node(t, { isLoop: true }); - n.blockComments = comments; - n.body = Statement(t, x.pushTarget(n).nest()); - t.mustMatch(WHILE); - n.condition = HeadExpression(t, x); - if (!x.ecmaStrictMode) { - // - - - - - - - - - -
-
-
-
-
- -
-
- -
- - - - - - - - - - -
HashURLInfoActions
-
-
-
- -
-
-
-
- -
-
-
-

- Copyright © 2011 – 2015 Loic J. Duros -

-
- - diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/settings/js/form-row.js b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/settings/js/form-row.js deleted file mode 100644 index 0b9c0ed..0000000 --- a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/settings/js/form-row.js +++ /dev/null @@ -1,120 +0,0 @@ -/** - * GNU LibreJS - A browser add-on to block nonfree nontrivial JavaScript. - * * - * Copyright (C) 2011, 2012, 2014 Loic J. Duros - * Copyright (C) 2014, 2015 Nik Nyby - * - * This file is part of GNU LibreJS. - * - * GNU LibreJS is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GNU LibreJS is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU LibreJS. If not, see . - */ - -var GenerateForm = { - $trContainer: null, // will jQuery element for rules table tboby - le: 0, - init: function () { - var that = this; - $(document).ready(function (e) { - that.$trContainer = $("#whitelist").children('tbody'); - - // listen for when data is ready to populate form. - document.documentElement.addEventListener( - "populate-form", - function (event) { - that.populateForm(event.detail.data); - }, false); - that.$trContainer.on("click", ".delete", function (event) { - that.deleteRow($(this)); - }); - $('.librejs-whitelist-reset').click(function (e) { - that.deleteAll(); - }); - }); - }, - - deleteAll: function () { - var event = document.createEvent("CustomEvent"); - event.initCustomEvent( - "librejs-settings-change", true, true, { - event: 'rules-form-delete-all' - }); - document.documentElement.dispatchEvent(event); - location.reload(); - }, - - deleteRow: function ($button) { - var hash = $button.parents('tr').children('.hash').text(); - this.le--; - this.changeTitle(); - $button.parents('tr').remove(); - var event = document.createEvent("CustomEvent"); - event.initCustomEvent( - "librejs-settings-change", true, true, { - event: 'rules-form-delete', value: hash - }); - document.documentElement.dispatchEvent(event); - }, - - createRow: function (key, url, reason) { - - var $tr = $(""); - var $td = $('').addClass('hash').text(key); - var $delete, $button; - $tr.append($td); - $td = $('').append($('').attr({ - "href": url, - "target": "_blank" - }).text(url)); - $tr.append($td); - $td = $('').text(reason); - $tr.append($td); - - $delete = $(""); - $button = $('