@templmf/temp-solf-lmf 0.0.142 → 0.0.144
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/f2e-spec-main.zip +0 -0
- package/package.json +1 -1
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/AUTHORS +18 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/COPYING +674 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/_locales/cs/messages.json +1252 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/_locales/en/messages.json +1339 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/_locales/fa/messages.json +1219 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/_locales/ru/messages.json +1276 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/_locales/zh/messages.json +1279 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/_locales/zh_CN/messages.json +1279 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/_locales/zh_TW/messages.json +1267 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/_metadata/computed_hashes.json +1 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/_metadata/verified_contents.json +1 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/css/options.css +531 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/css/popup.css +197 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/img/icons/draw_omega.js +22 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/img/icons/omega-128.png +0 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/img/icons/omega-128.svg +1 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/img/icons/omega-48.png +0 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/img/icons/omega-64.png +0 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/img/icons/omega-action-16.png +0 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/img/icons/omega-action-19.png +0 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/img/icons/omega-action-24.png +0 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/img/icons/omega-action-32.png +0 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/img/icons/omega-action.svg +1 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/indexedDB.js +67 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/js/background.js +611 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/js/background_preload.js +92 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/js/log_error.js +17 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/js/omega.js +2190 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/js/omega_debug.js +90 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/js/omega_decoration.js +175 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/js/omega_pac.min.js +19199 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/js/omega_target.min.js +11491 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/js/omega_target_chromium_extension.min.js +5742 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/js/omega_target_popup.js +93 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/js/omega_target_web.js +295 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/js/omega_webext_proxy_script.min.js +19310 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/js/options.js +73 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/js/options_guide.js +67 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/js/popup.js +541 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/js/switch_profile_guide.js +104 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/FileSaver/FileSaver.min.js +2 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/angular/angular.min.js +352 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/angular-animate/angular-animate.min.js +59 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/angular-bootstrap/ui-bootstrap-tpls.min.js +10 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/angular-i18n/angular-locale_en-us.js +143 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/angular-i18n/angular-locale_zh-cn.js +125 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/angular-i18n/angular-locale_zh-hk.js +125 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/angular-i18n/angular-locale_zh-tw.js +125 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/angular-ladda/angular-ladda.min.js +2 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/angular-loader/angular-loader.min.js +10 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/angular-sanitize/angular-sanitize.min.js +18 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/angular-spectrum-colorpicker/angular-spectrum-colorpicker.min.js +2 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/angular-ui-router/angular-ui-router.min.js +8 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/angular-ui-sortable/sortable.min.js +8 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/angular-ui-utils/validate.min.js +7 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/blob/Blob.js +684 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/bootstrap/css/bootstrap.min.css +6 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/bootstrap/fonts/glyphicons-halflings-regular.svg +288 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/bootstrap/fonts/glyphicons-halflings-regular.woff2 +0 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/bootstrap/js/dropdown.js +165 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/jquery/jquery.min.js +2 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/jqueryui-touch-punch/jquery.ui.touch-punch.min.js +11 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/jsondiffpatch/jsondiffpatch.min.js +37 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/ladda/ladda-themeless.min.css +7 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/ladda/ladda.min.js +8 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/ngprogress/ngProgress.min.js +8 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/script.js/script.min.js +6 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/shepherd.js/shepherd-theme-arrows.css +210 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/shepherd.js/shepherd.min.js +2 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/spectrum/spectrum.css +507 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/spectrum/spectrum.js +2341 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/spin.js/spin.js +337 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/tether/tether.js +1443 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/base.css +437 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/default-auto.css +38 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/default-dark.css +18 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/default-light.css +18 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-3024.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-apathy.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-apprentice.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-atelier-cave-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-atelier-cave.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-atelier-dune-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-atelier-dune.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-atelier-estuary-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-atelier-estuary.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-atelier-forest-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-atelier-forest.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-atelier-heath-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-atelier-heath.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-atelier-lakeside-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-atelier-lakeside.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-atelier-plateau-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-atelier-plateau.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-atelier-savanna-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-atelier-savanna.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-atelier-seaside-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-atelier-seaside.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-atelier-sulphurpool-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-atelier-sulphurpool.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-atlas.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-bespin.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-brewer.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-bright.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-brush-trees-dark.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-brush-trees.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-chalk.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-china-danqing-dark.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-china-danqing-light.css +18 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-china-red-screen.css +23 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-china-traditional-light.css +19 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-china-traditional-night.css +19 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-circus.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-classic-dark.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-classic-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-colors.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-cupcake.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-cupertino.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-da-one-black.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-da-one-gray.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-da-one-ocean.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-da-one-paper.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-da-one-white.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-darcula.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-darkmoss.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-darktooth.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-decaf.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-default-dark.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-default-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-eighties.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-embers.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-equilibrium-dark.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-equilibrium-gray-dark.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-equilibrium-gray-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-equilibrium-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-espresso.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-eva-dim.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-eva.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-flat.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-framer.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-gigavolt.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-github.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-google-dark.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-google-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-grayscale-dark.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-grayscale-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-green-screen.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-gruvbox-dark-hard.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-gruvbox-dark-medium.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-gruvbox-dark-pale.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-gruvbox-dark-soft.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-gruvbox-light-hard.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-gruvbox-light-medium.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-gruvbox-light-soft.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-hardcore.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-harmonic16-dark.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-harmonic16-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-helios.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-hopscotch.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-horizon-dark.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-horizon-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-humanoid-dark.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-humanoid-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-icy-dark.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-ir-black.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-isotope.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-kimber.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-macintosh.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-marrakesh.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-materia.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-material-darker.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-material-lighter.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-material-palenight.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-material-vivid.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-material.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-mexico-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-mocha.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-monokai.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-nebula.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-nord.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-nova.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-ocean.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-oceanicnext.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-one-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-onedark.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-outrun-dark.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-paraiso.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-pasque.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-phd.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-pinky.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-pop.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-porple.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-primer-dark-colorblind.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-primer-dark-dimmed.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-primer-dark-high-contrast.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-primer-dark.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-primer-light-colorblind.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-primer-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-qualia.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-railscasts.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-rose-pine-dawn.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-rose-pine-moon.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-rose-pine.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-sagelight.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-sakura.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-sandcastle.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-shapeshifter.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-silk-dark.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-silk-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-snazzy.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-solar-flare-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-solar-flare.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-solarized-dark.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-solarized-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-spacemacs.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-summercamp.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-summerfruit-dark.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-summerfruit-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-synth-midnight-terminal-dark.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-synth-midnight-terminal-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-tender.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-tomorrow-night-blue.css +19 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-tomorrow-night-bright.css +19 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-tomorrow-night-eighties.css +19 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-tomorrow-night.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-tomorrow.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-twilight.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-unikitty-dark.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-unikitty-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-vulcan.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-windows-10-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-windows-10.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-windows-95-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-windows-95.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-windows-high-contrast-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-windows-high-contrast.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-windows-nt-light.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-windows-nt.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-woodland.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-xcode-dusk.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/others/base16-zenburn.css +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/themes.json +3617 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/themes/variable.css +33 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/bower.json +14 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/compare-versions/compare-versions.js +219 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/csso/csso.js +23 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/FDBCursor.js +471 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/FDBCursorWithValue.js +11 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/FDBDatabase.js +155 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/FDBFactory.js +256 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/FDBIndex.js +183 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/FDBKeyRange.js +71 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/FDBObjectStore.js +375 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/FDBOpenDBRequest.js +9 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/FDBRequest.js +33 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/FDBTransaction.js +213 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/FDBVersionChangeEvent.js +12 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/fakeIndexedDB.js +3 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/index.js +14 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/lib/Database.js +32 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/lib/FakeDOMStringList.js +72 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/lib/FakeEvent.js +38 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/lib/FakeEventTarget.js +104 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/lib/Index.js +157 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/lib/KeyGenerator.js +22 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/lib/ObjectStore.js +172 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/lib/RecordStore.js +133 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/lib/binarySearch.js +74 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/lib/canInjectKey.js +23 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/lib/cmp.js +77 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/lib/enforceRange.js +13 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/lib/errors.js +62 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/lib/extractKey.js +39 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/lib/scheduling.js +29 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/lib/types.js +1 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/lib/validateKeyPath.js +46 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/lib/valueToKey.js +55 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/fake-indexeddb/lib/valueToKeyRange.js +19 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/filesize/filesize.esm.js +228 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/idb-keyval/idb-keyval.js +274 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/iframeResizer/iframeResizer.contentWindow.min.js +1305 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/iframeResizer/iframeResizer.min.js +1466 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/jquery-ui/jquery-ui-1.10.4.custom.min.js +6 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/jszip/jszip.min.js +13 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/moment/moment-with-locales.js +18476 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/tabulator/tabulator.css +1368 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/tabulator/tabulator_esm.js +29258 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/toastify/toastify-es.js +467 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/lib/zero-dependencies/toastify/toastify.css +94 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/localstorage-polyfill.js +67 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/log.js +119 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/manifest.json +47 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/options.html +50 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/about.html +39 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/apply_options_confirm.html +13 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/builtin.html +16 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/cannot_delete_profile.html +17 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/delete_attached.html +14 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/delete_profile.html +13 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/fixed_auth_edit.html +29 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/general.html +36 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/input_group_clear.html +5 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/io.html +115 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/new_profile.html +54 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/omega_profile_select.html +9 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/options_welcome.html +15 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/profile.html +17 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/profile_fixed.html +55 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/profile_pac.html +68 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/profile_rule_list.html +34 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/profile_switch.html +185 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/profile_unsupported.html +3 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/profile_virtual.html +19 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/rename_profile.html +24 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/replace_profile.html +15 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/reset_options_confirm.html +12 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/rule_remove_confirm.html +14 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/rule_reset_confirm.html +13 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/theme.html +20 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/partials/ui.html +72 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/css/dialog.css +119 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/css/index.css +225 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/grant_permissions.html +51 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/img/AllowedIncognitoAccess.png +0 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/index.html +58 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/js/grant_permissions.js +32 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/js/i18n.js +10 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/js/index.js +56 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/js/keyboard.js +134 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/js/keyboard_help.js +32 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/js/loader.js +51 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/js/profiles.js +294 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/js/proxy_not_controllable.js +43 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/js/style.js +15 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/network/css/base.css +33 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/network/css/index.css +145 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/network/index.html +21 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/network/js/index.js +588 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/network/js/loader.js +24 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/network/js/tab.js +154 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/network/js/url.js +334 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/network/js/utils.js +88 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/proxy_not_controllable.html +23 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/temp_rules/css/base.css +34 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/temp_rules/css/index.css +15 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/temp_rules/index.html +21 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/temp_rules/js/index.js +168 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup/temp_rules/js/loader.js +27 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup-iframe.html +22 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup-iframe.js +14 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/popup.html +137 -0
- package/pfnededegaaopdmhkdmcofjmoldfiped/3.5.0_0/x-background.js +65 -0
|
@@ -0,0 +1,2190 @@
|
|
|
1
|
+
(function() {
|
|
2
|
+
var attachedPrefix, charCodeUnderscore, colors, profileColorPalette, profileColors;
|
|
3
|
+
|
|
4
|
+
angular.module('omega').constant('builtinProfiles', OmegaPac.Profiles.builtinProfiles);
|
|
5
|
+
|
|
6
|
+
profileColors = ['#9ce', '#9d9', '#fa8', '#fe9', '#d497ee', '#47b', '#5b5', '#d63', '#ca0'];
|
|
7
|
+
|
|
8
|
+
colors = [].concat(profileColors);
|
|
9
|
+
|
|
10
|
+
profileColorPalette = ((function() {
|
|
11
|
+
var _results;
|
|
12
|
+
_results = [];
|
|
13
|
+
while (colors.length) {
|
|
14
|
+
_results.push(colors.splice(0, 3));
|
|
15
|
+
}
|
|
16
|
+
return _results;
|
|
17
|
+
})());
|
|
18
|
+
|
|
19
|
+
angular.module('omega').constant('profileColors', profileColors);
|
|
20
|
+
|
|
21
|
+
angular.module('omega').constant('profileColorPalette', profileColorPalette);
|
|
22
|
+
|
|
23
|
+
attachedPrefix = '__ruleListOf_';
|
|
24
|
+
|
|
25
|
+
angular.module('omega').constant('getAttachedName', function(name) {
|
|
26
|
+
return attachedPrefix + name;
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
angular.module('omega').constant('getParentName', function(name) {
|
|
30
|
+
if (name.indexOf(attachedPrefix) === 0) {
|
|
31
|
+
return name.substr(attachedPrefix.length);
|
|
32
|
+
} else {
|
|
33
|
+
return void 0;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
charCodeUnderscore = '_'.charCodeAt(0);
|
|
38
|
+
|
|
39
|
+
angular.module('omega').constant('charCodeUnderscore', charCodeUnderscore);
|
|
40
|
+
|
|
41
|
+
angular.module('omega').constant('isProfileNameHidden', function(name) {
|
|
42
|
+
return name.charCodeAt(0) === charCodeUnderscore;
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
angular.module('omega').constant('isProfileNameReserved', function(name) {
|
|
46
|
+
return name.charCodeAt(0) === charCodeUnderscore && name.charCodeAt(1) === charCodeUnderscore;
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
angular.module('omega').config(function($stateProvider, $urlRouterProvider, $httpProvider, $animateProvider, $compileProvider) {
|
|
50
|
+
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|chrome-extension|moz-extension):/);
|
|
51
|
+
$compileProvider.imgSrcSanitizationWhitelist(/^\s*(https?|local|data|chrome-extension|moz-extension):/);
|
|
52
|
+
$animateProvider.classNameFilter(/angular-animate/);
|
|
53
|
+
$urlRouterProvider.otherwise('/about');
|
|
54
|
+
$urlRouterProvider.otherwise(function($injector, $location) {
|
|
55
|
+
if ($location.path() === '') {
|
|
56
|
+
return $injector.get('omegaTarget').lastUrl() || '/about';
|
|
57
|
+
} else {
|
|
58
|
+
return '/about';
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
return $stateProvider.state('ui', {
|
|
62
|
+
url: '/ui',
|
|
63
|
+
templateUrl: 'partials/ui.html'
|
|
64
|
+
}).state('general', {
|
|
65
|
+
url: '/general',
|
|
66
|
+
templateUrl: 'partials/general.html'
|
|
67
|
+
}).state('io', {
|
|
68
|
+
url: '/io',
|
|
69
|
+
templateUrl: 'partials/io.html',
|
|
70
|
+
controller: 'IoCtrl'
|
|
71
|
+
}).state('builtin', {
|
|
72
|
+
url: '/builtin',
|
|
73
|
+
templateUrl: 'partials/builtin.html',
|
|
74
|
+
controller: 'BuiltinCtrl'
|
|
75
|
+
}).state('theme', {
|
|
76
|
+
url: '/theme',
|
|
77
|
+
templateUrl: 'partials/theme.html'
|
|
78
|
+
}).state('profile', {
|
|
79
|
+
url: '/profile/*name',
|
|
80
|
+
templateUrl: 'partials/profile.html',
|
|
81
|
+
controller: 'ProfileCtrl'
|
|
82
|
+
}).state('about', {
|
|
83
|
+
url: '/about',
|
|
84
|
+
templateUrl: 'partials/about.html',
|
|
85
|
+
controller: 'AboutCtrl'
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
angular.module('omega').factory('$exceptionHandler', function($log) {
|
|
90
|
+
return function(exception, cause) {
|
|
91
|
+
if (exception.message === 'transition aborted') {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
if (exception.message === 'transition superseded') {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
if (exception.message === 'transition prevented') {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
if (exception.message === 'transition failed') {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
return $log.error(exception, cause);
|
|
104
|
+
};
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
angular.module('omega').factory('omegaDebug', function($window, $rootScope, $injector) {
|
|
108
|
+
var omegaDebug, _ref;
|
|
109
|
+
omegaDebug = (_ref = $window.OmegaDebug) != null ? _ref : {};
|
|
110
|
+
if (omegaDebug.downloadLog == null) {
|
|
111
|
+
omegaDebug.downloadLog = function() {
|
|
112
|
+
var blob, downloadFile, _ref1;
|
|
113
|
+
downloadFile = (_ref1 = $injector.get('downloadFile')) != null ? _ref1 : saveAs;
|
|
114
|
+
blob = new Blob([localStorage['log']], {
|
|
115
|
+
type: "text/plain;charset=utf-8"
|
|
116
|
+
});
|
|
117
|
+
return downloadFile(blob, "OmegaLog_" + (Date.now()) + ".txt");
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
if (omegaDebug.reportIssue == null) {
|
|
121
|
+
omegaDebug.reportIssue = function() {
|
|
122
|
+
$window.open('https://github.com/FelisCatus/SwitchyOmega/issues/new?title=&body=');
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
if (omegaDebug.resetOptions == null) {
|
|
126
|
+
omegaDebug.resetOptions = function() {
|
|
127
|
+
return $rootScope.resetOptions();
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
return omegaDebug;
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
angular.module('omega').factory('downloadFile', function() {
|
|
134
|
+
return function(blob, filename) {
|
|
135
|
+
var noAutoBom;
|
|
136
|
+
noAutoBom = true;
|
|
137
|
+
return saveAs(blob, filename, noAutoBom);
|
|
138
|
+
};
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
}).call(this);
|
|
142
|
+
|
|
143
|
+
(function() {
|
|
144
|
+
angular.module('omega').controller('AboutCtrl', function($scope, $rootScope, $modal, omegaDebug) {
|
|
145
|
+
var _;
|
|
146
|
+
$scope.downloadLog = function() {
|
|
147
|
+
$scope.logDownloading = true;
|
|
148
|
+
return Promise.resolve(omegaDebug.downloadLog()).then(function() {
|
|
149
|
+
return $scope.logDownloading = false;
|
|
150
|
+
});
|
|
151
|
+
};
|
|
152
|
+
$scope.reportIssue = function() {
|
|
153
|
+
$scope.issueReporting = true;
|
|
154
|
+
return omegaDebug.reportIssue().then(function() {
|
|
155
|
+
return $scope.issueReporting = false;
|
|
156
|
+
});
|
|
157
|
+
};
|
|
158
|
+
$scope.showResetOptionsModal = function() {
|
|
159
|
+
return $modal.open({
|
|
160
|
+
templateUrl: 'partials/reset_options_confirm.html'
|
|
161
|
+
}).result.then(function() {
|
|
162
|
+
$scope.optionsReseting = true;
|
|
163
|
+
return omegaDebug.resetOptions().then(function() {
|
|
164
|
+
return $scope.optionsReseting = false;
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
try {
|
|
169
|
+
return $scope.version = omegaDebug.getProjectVersion();
|
|
170
|
+
} catch (_error) {
|
|
171
|
+
_ = _error;
|
|
172
|
+
return $scope.version = '?.?.?';
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
}).call(this);
|
|
177
|
+
|
|
178
|
+
(function() {
|
|
179
|
+
angular.module('omega').controller('BuiltinCtrl', function($scope, $stateParams, $location, $rootScope, $timeout, $state, $modal, builtinProfiles, profileColorPalette, getAttachedName, getParentName, getVirtualTarget, omegaTarget) {
|
|
180
|
+
var customBuiltinProfiles, decorateBuiltinProfile;
|
|
181
|
+
customBuiltinProfiles = {};
|
|
182
|
+
decorateBuiltinProfile = function(newOptions) {
|
|
183
|
+
Object.assign(customBuiltinProfiles, builtinProfiles, newOptions != null ? newOptions['-builtinProfiles'] : void 0);
|
|
184
|
+
$scope.systemProfile = customBuiltinProfiles['+system'];
|
|
185
|
+
return $scope.directProfile = customBuiltinProfiles['+direct'];
|
|
186
|
+
};
|
|
187
|
+
omegaTarget.addOptionsChangeCallback(decorateBuiltinProfile);
|
|
188
|
+
decorateBuiltinProfile($rootScope.options);
|
|
189
|
+
$scope.moveColor = function(color, key) {
|
|
190
|
+
customBuiltinProfiles[key].color = color;
|
|
191
|
+
return $rootScope.options['-builtinProfiles'] = JSON.parse(JSON.stringify(customBuiltinProfiles));
|
|
192
|
+
};
|
|
193
|
+
$scope.changeColor = function(color) {
|
|
194
|
+
return console.log('change color::::', color);
|
|
195
|
+
};
|
|
196
|
+
return $scope.spectrumOptions = {
|
|
197
|
+
localStorageKey: 'spectrum.profileColor',
|
|
198
|
+
palette: profileColorPalette,
|
|
199
|
+
preferredFormat: 'hex',
|
|
200
|
+
showButtons: false,
|
|
201
|
+
showInitial: true,
|
|
202
|
+
showInput: true,
|
|
203
|
+
showPalette: true,
|
|
204
|
+
showAlpha: true,
|
|
205
|
+
showSelectionPalette: true,
|
|
206
|
+
maxSelectionSize: 5
|
|
207
|
+
};
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
}).call(this);
|
|
211
|
+
|
|
212
|
+
(function() {
|
|
213
|
+
angular.module('omega').controller('FixedProfileCtrl', function($scope, $modal, trFilter) {
|
|
214
|
+
var defaultLabel, defaultPort, onBypassListChange, onProxyChange, proxyProperties, scheme, socks5AuthSupported, _fn, _i, _j, _len, _len1, _ref, _ref1, _ref2;
|
|
215
|
+
$scope.urlSchemes = ['', 'http', 'https', 'ftp'];
|
|
216
|
+
$scope.urlSchemeDefault = 'fallbackProxy';
|
|
217
|
+
proxyProperties = {
|
|
218
|
+
'': 'fallbackProxy',
|
|
219
|
+
'http': 'proxyForHttp',
|
|
220
|
+
'https': 'proxyForHttps',
|
|
221
|
+
'ftp': 'proxyForFtp'
|
|
222
|
+
};
|
|
223
|
+
$scope.schemeDisp = {
|
|
224
|
+
'': null,
|
|
225
|
+
'http': 'http://',
|
|
226
|
+
'https': 'https://',
|
|
227
|
+
'ftp': 'ftp://'
|
|
228
|
+
};
|
|
229
|
+
defaultPort = {
|
|
230
|
+
'http': 80,
|
|
231
|
+
'https': 443,
|
|
232
|
+
'socks4': 1080,
|
|
233
|
+
'socks5': 1080
|
|
234
|
+
};
|
|
235
|
+
$scope.showAdvanced = false;
|
|
236
|
+
$scope.optionsForScheme = {};
|
|
237
|
+
_ref = $scope.urlSchemes;
|
|
238
|
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
|
239
|
+
scheme = _ref[_i];
|
|
240
|
+
defaultLabel = scheme ? trFilter('options_protocol_useDefault') : trFilter('options_protocol_direct');
|
|
241
|
+
$scope.optionsForScheme[scheme] = [
|
|
242
|
+
{
|
|
243
|
+
label: defaultLabel,
|
|
244
|
+
value: void 0
|
|
245
|
+
}, {
|
|
246
|
+
label: 'HTTP',
|
|
247
|
+
value: 'http'
|
|
248
|
+
}, {
|
|
249
|
+
label: 'HTTPS',
|
|
250
|
+
value: 'https'
|
|
251
|
+
}, {
|
|
252
|
+
label: 'SOCKS4',
|
|
253
|
+
value: 'socks4'
|
|
254
|
+
}, {
|
|
255
|
+
label: 'SOCKS5',
|
|
256
|
+
value: 'socks5'
|
|
257
|
+
}
|
|
258
|
+
];
|
|
259
|
+
}
|
|
260
|
+
$scope.proxyEditors = {};
|
|
261
|
+
socks5AuthSupported = ((typeof browser !== "undefined" && browser !== null ? (_ref1 = browser.proxy) != null ? _ref1.onRequest : void 0 : void 0) != null);
|
|
262
|
+
$scope.authSupported = {
|
|
263
|
+
"http": true,
|
|
264
|
+
"https": true,
|
|
265
|
+
"socks5": socks5AuthSupported
|
|
266
|
+
};
|
|
267
|
+
$scope.isProxyAuthActive = function(scheme) {
|
|
268
|
+
var _ref2;
|
|
269
|
+
return ((_ref2 = $scope.profile.auth) != null ? _ref2[proxyProperties[scheme]] : void 0) != null;
|
|
270
|
+
};
|
|
271
|
+
$scope.editProxyAuth = function(scheme) {
|
|
272
|
+
var auth, prop, proxy, scope, _ref2;
|
|
273
|
+
prop = proxyProperties[scheme];
|
|
274
|
+
proxy = $scope.profile[prop];
|
|
275
|
+
scope = $scope.$new('isolate');
|
|
276
|
+
scope.proxy = proxy;
|
|
277
|
+
auth = (_ref2 = $scope.profile.auth) != null ? _ref2[prop] : void 0;
|
|
278
|
+
scope.auth = auth && angular.copy(auth);
|
|
279
|
+
scope.authSupported = $scope.authSupported[proxy.scheme];
|
|
280
|
+
scope.protocolDisp = proxy.scheme;
|
|
281
|
+
return $modal.open({
|
|
282
|
+
templateUrl: 'partials/fixed_auth_edit.html',
|
|
283
|
+
scope: scope,
|
|
284
|
+
size: scope.authSupported ? 'sm' : 'lg'
|
|
285
|
+
}).result.then(function(auth) {
|
|
286
|
+
var _base;
|
|
287
|
+
if (!(auth != null ? auth.username : void 0)) {
|
|
288
|
+
if ($scope.profile.auth) {
|
|
289
|
+
return $scope.profile.auth[prop] = void 0;
|
|
290
|
+
}
|
|
291
|
+
} else {
|
|
292
|
+
if ((_base = $scope.profile).auth == null) {
|
|
293
|
+
_base.auth = {};
|
|
294
|
+
}
|
|
295
|
+
return $scope.profile.auth[prop] = auth;
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
};
|
|
299
|
+
onProxyChange = function(proxyEditors, oldProxyEditors) {
|
|
300
|
+
var proxy, _base, _j, _len1, _name, _ref2, _ref3, _results;
|
|
301
|
+
if (!proxyEditors) {
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
_ref2 = $scope.urlSchemes;
|
|
305
|
+
_results = [];
|
|
306
|
+
for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
|
|
307
|
+
scheme = _ref2[_j];
|
|
308
|
+
proxy = proxyEditors[scheme];
|
|
309
|
+
if (!proxy.scheme) {
|
|
310
|
+
if (!scheme) {
|
|
311
|
+
proxyEditors[scheme] = {};
|
|
312
|
+
}
|
|
313
|
+
delete $scope.profile[proxyProperties[scheme]];
|
|
314
|
+
continue;
|
|
315
|
+
} else if (!oldProxyEditors[scheme].scheme) {
|
|
316
|
+
if (proxy.scheme === proxyEditors[''].scheme) {
|
|
317
|
+
if (proxy.port == null) {
|
|
318
|
+
proxy.port = proxyEditors[''].port;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
if (proxy.port == null) {
|
|
322
|
+
proxy.port = defaultPort[proxy.scheme];
|
|
323
|
+
}
|
|
324
|
+
if (proxy.host == null) {
|
|
325
|
+
proxy.host = (_ref3 = proxyEditors[''].host) != null ? _ref3 : 'example.com';
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
_results.push((_base = $scope.profile)[_name = proxyProperties[scheme]] != null ? _base[_name] : _base[_name] = proxy);
|
|
329
|
+
}
|
|
330
|
+
return _results;
|
|
331
|
+
};
|
|
332
|
+
_ref2 = $scope.urlSchemes;
|
|
333
|
+
_fn = function(scheme) {
|
|
334
|
+
return $scope.$watch((function() {
|
|
335
|
+
return $scope.profile[proxyProperties[scheme]];
|
|
336
|
+
}), function(proxy) {
|
|
337
|
+
if (scheme && proxy) {
|
|
338
|
+
$scope.showAdvanced = true;
|
|
339
|
+
}
|
|
340
|
+
return $scope.proxyEditors[scheme] = proxy != null ? proxy : {};
|
|
341
|
+
});
|
|
342
|
+
};
|
|
343
|
+
for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
|
|
344
|
+
scheme = _ref2[_j];
|
|
345
|
+
_fn(scheme);
|
|
346
|
+
}
|
|
347
|
+
$scope.$watch('proxyEditors', onProxyChange, true);
|
|
348
|
+
onBypassListChange = function(list) {
|
|
349
|
+
var item;
|
|
350
|
+
return $scope.bypassList = ((function() {
|
|
351
|
+
var _k, _len2, _results;
|
|
352
|
+
_results = [];
|
|
353
|
+
for (_k = 0, _len2 = list.length; _k < _len2; _k++) {
|
|
354
|
+
item = list[_k];
|
|
355
|
+
_results.push(item.pattern);
|
|
356
|
+
}
|
|
357
|
+
return _results;
|
|
358
|
+
})()).join('\n');
|
|
359
|
+
};
|
|
360
|
+
$scope.$watch('profile.bypassList', onBypassListChange, true);
|
|
361
|
+
return $scope.$watch('bypassList', function(bypassList, oldList) {
|
|
362
|
+
var entry;
|
|
363
|
+
if ((bypassList == null) || bypassList === oldList) {
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
return $scope.profile.bypassList = (function() {
|
|
367
|
+
var _k, _len2, _ref3, _results;
|
|
368
|
+
_ref3 = bypassList.split(/\r?\n/);
|
|
369
|
+
_results = [];
|
|
370
|
+
for (_k = 0, _len2 = _ref3.length; _k < _len2; _k++) {
|
|
371
|
+
entry = _ref3[_k];
|
|
372
|
+
if (entry) {
|
|
373
|
+
_results.push({
|
|
374
|
+
conditionType: "BypassCondition",
|
|
375
|
+
pattern: entry
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
return _results;
|
|
380
|
+
})();
|
|
381
|
+
});
|
|
382
|
+
});
|
|
383
|
+
|
|
384
|
+
}).call(this);
|
|
385
|
+
|
|
386
|
+
(function() {
|
|
387
|
+
angular.module('omega').controller('IoCtrl', function($scope, $rootScope, $window, $http, omegaTarget, downloadFile) {
|
|
388
|
+
var detectBackendType, getGistId;
|
|
389
|
+
$scope.useBuiltInSync = true;
|
|
390
|
+
$scope.syncBackendType = 'gist';
|
|
391
|
+
$scope.syncBackendTypeManuallySet = false;
|
|
392
|
+
$scope.backendTypes = [
|
|
393
|
+
{
|
|
394
|
+
id: 'gist',
|
|
395
|
+
label: 'options_syncBackendGist'
|
|
396
|
+
}, {
|
|
397
|
+
id: 'webdav',
|
|
398
|
+
label: 'options_syncBackendWebdav'
|
|
399
|
+
}
|
|
400
|
+
];
|
|
401
|
+
getGistId = function(gistUrl) {
|
|
402
|
+
var gistId;
|
|
403
|
+
if (gistUrl == null) {
|
|
404
|
+
gistUrl = '';
|
|
405
|
+
}
|
|
406
|
+
gistId = gistUrl.replace(/\/+$/, '');
|
|
407
|
+
gistId = gistId.split('/');
|
|
408
|
+
gistId = gistId[gistId.length - 1];
|
|
409
|
+
return gistId;
|
|
410
|
+
};
|
|
411
|
+
detectBackendType = function(uri) {
|
|
412
|
+
if (uri && uri.indexOf('https://gist.github.com/') === 0) {
|
|
413
|
+
return 'gist';
|
|
414
|
+
}
|
|
415
|
+
if (uri && (uri.indexOf('http://') === 0 || uri.indexOf('https://') === 0)) {
|
|
416
|
+
return 'webdav';
|
|
417
|
+
}
|
|
418
|
+
return 'gist';
|
|
419
|
+
};
|
|
420
|
+
omegaTarget.state(['web.restoreOnlineUrl', 'gistId', 'gistToken', 'syncUsername', 'syncBackendType', 'lastGistSync', 'lastGistState']).then(function(_arg) {
|
|
421
|
+
var gistId, gistToken, lastGistState, lastGistSync, syncBackendType, syncUsername, url;
|
|
422
|
+
url = _arg[0], gistId = _arg[1], gistToken = _arg[2], syncUsername = _arg[3], syncBackendType = _arg[4], lastGistSync = _arg[5], lastGistState = _arg[6];
|
|
423
|
+
if (url) {
|
|
424
|
+
$scope.restoreOnlineUrl = url;
|
|
425
|
+
}
|
|
426
|
+
if (gistId) {
|
|
427
|
+
$scope.gistId = gistId;
|
|
428
|
+
if (gistId.indexOf('https://gist.github.com/') === 0) {
|
|
429
|
+
$scope.gistUrl = gistId;
|
|
430
|
+
} else if (gistId.indexOf('http') === 0) {
|
|
431
|
+
$scope.gistUrl = gistId;
|
|
432
|
+
} else {
|
|
433
|
+
$scope.gistUrl = "https://gist.github.com/" + getGistId(gistId);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
if (gistToken) {
|
|
437
|
+
$scope.gistToken = gistToken;
|
|
438
|
+
}
|
|
439
|
+
$scope.syncUsername = syncUsername || '';
|
|
440
|
+
$scope.syncBackendType = syncBackendType || detectBackendType(gistId || '');
|
|
441
|
+
$scope.lastGistSync = new Date(lastGistSync || Date.now());
|
|
442
|
+
$scope.lastGistState = lastGistState || '';
|
|
443
|
+
if (/fail\:/i.test(lastGistState)) {
|
|
444
|
+
return $scope.alertType = 'alert-danger';
|
|
445
|
+
} else {
|
|
446
|
+
return $scope.alertType = 'alert-success';
|
|
447
|
+
}
|
|
448
|
+
});
|
|
449
|
+
$scope.$watch('gistId', function(newVal, oldVal) {
|
|
450
|
+
if (newVal !== oldVal && !$scope.syncBackendTypeManuallySet) {
|
|
451
|
+
return $scope.syncBackendType = detectBackendType(newVal || '');
|
|
452
|
+
}
|
|
453
|
+
});
|
|
454
|
+
$scope.onBackendTypeManualChange = function() {
|
|
455
|
+
return $scope.syncBackendTypeManuallySet = true;
|
|
456
|
+
};
|
|
457
|
+
$scope.exportOptions = function() {
|
|
458
|
+
return $rootScope.applyOptionsConfirm().then(function() {
|
|
459
|
+
var blob, content, filename, plainOptions;
|
|
460
|
+
plainOptions = angular.fromJson(angular.toJson($rootScope.options));
|
|
461
|
+
content = JSON.stringify(plainOptions);
|
|
462
|
+
blob = new Blob([content], {
|
|
463
|
+
type: "text/plain;charset=utf-8"
|
|
464
|
+
});
|
|
465
|
+
filename = "ZeroOmegaOptions-" + (new Date().toISOString()) + ".bak";
|
|
466
|
+
return downloadFile(blob, filename);
|
|
467
|
+
});
|
|
468
|
+
};
|
|
469
|
+
$scope.importSuccess = function() {
|
|
470
|
+
return $rootScope.showAlert({
|
|
471
|
+
type: 'success',
|
|
472
|
+
i18n: 'options_importSuccess',
|
|
473
|
+
message: 'Options imported.'
|
|
474
|
+
});
|
|
475
|
+
};
|
|
476
|
+
$scope.restoreLocal = function(content) {
|
|
477
|
+
$scope.restoringLocal = true;
|
|
478
|
+
return $rootScope.resetOptions(content).then((function() {
|
|
479
|
+
return $scope.importSuccess();
|
|
480
|
+
}), function() {
|
|
481
|
+
return $scope.restoreLocalError();
|
|
482
|
+
})["finally"](function() {
|
|
483
|
+
return $scope.restoringLocal = false;
|
|
484
|
+
});
|
|
485
|
+
};
|
|
486
|
+
$scope.restoreLocalError = function() {
|
|
487
|
+
return $rootScope.showAlert({
|
|
488
|
+
type: 'error',
|
|
489
|
+
i18n: 'options_importFormatError',
|
|
490
|
+
message: 'Invalid backup file!'
|
|
491
|
+
});
|
|
492
|
+
};
|
|
493
|
+
$scope.downloadError = function() {
|
|
494
|
+
return $rootScope.showAlert({
|
|
495
|
+
type: 'error',
|
|
496
|
+
i18n: 'options_importDownloadError',
|
|
497
|
+
message: 'Error downloading backup file!'
|
|
498
|
+
});
|
|
499
|
+
};
|
|
500
|
+
$scope.triggerFileInput = function() {
|
|
501
|
+
angular.element('#restore-local-file').click();
|
|
502
|
+
};
|
|
503
|
+
$scope.restoreOnline = function() {
|
|
504
|
+
omegaTarget.state('web.restoreOnlineUrl', $scope.restoreOnlineUrl);
|
|
505
|
+
$scope.restoringOnline = true;
|
|
506
|
+
return $http({
|
|
507
|
+
method: 'GET',
|
|
508
|
+
url: $scope.restoreOnlineUrl,
|
|
509
|
+
cache: false,
|
|
510
|
+
timeout: 10000,
|
|
511
|
+
responseType: "text"
|
|
512
|
+
}).then((function(result) {
|
|
513
|
+
return $rootScope.resetOptions(result.data).then((function() {
|
|
514
|
+
return $scope.importSuccess();
|
|
515
|
+
}), function() {
|
|
516
|
+
return $scope.restoreLocalError();
|
|
517
|
+
});
|
|
518
|
+
}), $scope.downloadError)["finally"](function() {
|
|
519
|
+
return $scope.restoringOnline = false;
|
|
520
|
+
});
|
|
521
|
+
};
|
|
522
|
+
$scope.enableOptionsSync = function(args) {
|
|
523
|
+
var createNewGist, enable, _enable;
|
|
524
|
+
if (args == null) {
|
|
525
|
+
args = {};
|
|
526
|
+
}
|
|
527
|
+
createNewGist = function(gistToken) {
|
|
528
|
+
var content;
|
|
529
|
+
content = "ZeroOmega Gist Sync(" + (moment().format('YYYY-MM-DD HH:mm:ss')) + ")";
|
|
530
|
+
return fetch('https://api.github.com/gists', {
|
|
531
|
+
method: 'POST',
|
|
532
|
+
headers: {
|
|
533
|
+
'Authorization': "token " + gistToken,
|
|
534
|
+
'Content-Type': 'application/json'
|
|
535
|
+
},
|
|
536
|
+
body: JSON.stringify({
|
|
537
|
+
description: 'Init ZeroOmega Gist',
|
|
538
|
+
"public": false,
|
|
539
|
+
files: {
|
|
540
|
+
'readme.md': {
|
|
541
|
+
content: content
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
})
|
|
545
|
+
}).then(function(r) {
|
|
546
|
+
return r.json();
|
|
547
|
+
}).then(function(data) {
|
|
548
|
+
if (data.message) {
|
|
549
|
+
throw data.message;
|
|
550
|
+
} else {
|
|
551
|
+
return data.html_url;
|
|
552
|
+
}
|
|
553
|
+
});
|
|
554
|
+
};
|
|
555
|
+
enable = function() {
|
|
556
|
+
if ($scope.syncBackendType === 'gist' && !$scope.gistId && $scope.gistToken) {
|
|
557
|
+
$scope.enableOptionsSyncing = true;
|
|
558
|
+
return createNewGist($scope.gistToken).then(function(gistUrl) {
|
|
559
|
+
$scope.enableOptionsSyncing = false;
|
|
560
|
+
$scope.gistId = gistUrl;
|
|
561
|
+
return _enable();
|
|
562
|
+
})["catch"](function(e) {
|
|
563
|
+
$scope.enableOptionsSyncing = false;
|
|
564
|
+
return $rootScope.showAlert({
|
|
565
|
+
type: 'error',
|
|
566
|
+
message: e.message || e
|
|
567
|
+
});
|
|
568
|
+
});
|
|
569
|
+
} else {
|
|
570
|
+
return _enable();
|
|
571
|
+
}
|
|
572
|
+
};
|
|
573
|
+
_enable = function() {
|
|
574
|
+
if (!$scope.gistId) {
|
|
575
|
+
$rootScope.showAlert({
|
|
576
|
+
type: 'error',
|
|
577
|
+
message: 'Sync URI is required'
|
|
578
|
+
});
|
|
579
|
+
return;
|
|
580
|
+
}
|
|
581
|
+
if ($scope.syncBackendType === 'gist' && !$scope.gistToken) {
|
|
582
|
+
$rootScope.showAlert({
|
|
583
|
+
type: 'error',
|
|
584
|
+
message: 'Gist Token is required'
|
|
585
|
+
});
|
|
586
|
+
return;
|
|
587
|
+
}
|
|
588
|
+
args.gistId = $scope.gistId;
|
|
589
|
+
args.gistToken = $scope.gistToken;
|
|
590
|
+
args.username = $scope.syncUsername;
|
|
591
|
+
args.syncBackendType = $scope.syncBackendType;
|
|
592
|
+
args.useBuiltInSync = $scope.useBuiltInSync;
|
|
593
|
+
$scope.enableOptionsSyncing = true;
|
|
594
|
+
return omegaTarget.setOptionsSync(true, args).then(function() {
|
|
595
|
+
return $window.location.reload();
|
|
596
|
+
})["catch"](function(e) {
|
|
597
|
+
$scope.enableOptionsSyncing = false;
|
|
598
|
+
$rootScope.showAlert({
|
|
599
|
+
type: 'error',
|
|
600
|
+
message: e + ''
|
|
601
|
+
});
|
|
602
|
+
return console.log('error:::', e);
|
|
603
|
+
});
|
|
604
|
+
};
|
|
605
|
+
if (args != null ? args.force : void 0) {
|
|
606
|
+
return enable();
|
|
607
|
+
} else {
|
|
608
|
+
return $rootScope.applyOptionsConfirm().then(enable);
|
|
609
|
+
}
|
|
610
|
+
};
|
|
611
|
+
$scope.cleanInput = function(target) {
|
|
612
|
+
$scope[target] = '';
|
|
613
|
+
return omegaTarget.state(target, '');
|
|
614
|
+
};
|
|
615
|
+
$scope.checkOptionsSyncChange = function() {
|
|
616
|
+
$scope.enableOptionsSyncing = true;
|
|
617
|
+
return omegaTarget.checkOptionsSyncChange().then(function() {
|
|
618
|
+
return $window.location.reload();
|
|
619
|
+
});
|
|
620
|
+
};
|
|
621
|
+
$scope.disableOptionsSync = function() {
|
|
622
|
+
return omegaTarget.setOptionsSync(false).then(function() {
|
|
623
|
+
return $rootScope.applyOptionsConfirm().then(function() {
|
|
624
|
+
return $window.location.reload();
|
|
625
|
+
});
|
|
626
|
+
});
|
|
627
|
+
};
|
|
628
|
+
return $scope.resetOptionsSync = function() {
|
|
629
|
+
if (!$scope.gistId) {
|
|
630
|
+
$rootScope.showAlert({
|
|
631
|
+
type: 'error',
|
|
632
|
+
message: 'Sync URI is required'
|
|
633
|
+
});
|
|
634
|
+
return;
|
|
635
|
+
}
|
|
636
|
+
if ($scope.syncBackendType === 'gist' && !$scope.gistToken) {
|
|
637
|
+
$rootScope.showAlert({
|
|
638
|
+
type: 'error',
|
|
639
|
+
message: 'Gist Token is required'
|
|
640
|
+
});
|
|
641
|
+
return;
|
|
642
|
+
}
|
|
643
|
+
return omegaTarget.resetOptionsSync({
|
|
644
|
+
gistId: $scope.gistId,
|
|
645
|
+
gistToken: $scope.gistToken,
|
|
646
|
+
username: $scope.syncUsername,
|
|
647
|
+
syncBackendType: $scope.syncBackendType
|
|
648
|
+
}).then(function() {
|
|
649
|
+
return $rootScope.applyOptionsConfirm().then(function() {
|
|
650
|
+
return $window.location.reload();
|
|
651
|
+
});
|
|
652
|
+
})["catch"](function(e) {
|
|
653
|
+
$rootScope.showAlert({
|
|
654
|
+
type: 'error',
|
|
655
|
+
message: e + ''
|
|
656
|
+
});
|
|
657
|
+
return console.log('error:::', e);
|
|
658
|
+
});
|
|
659
|
+
};
|
|
660
|
+
});
|
|
661
|
+
|
|
662
|
+
}).call(this);
|
|
663
|
+
|
|
664
|
+
(function() {
|
|
665
|
+
var __hasProp = {}.hasOwnProperty;
|
|
666
|
+
|
|
667
|
+
angular.module('omega').controller('MasterCtrl', function($scope, $rootScope, $window, $q, $modal, $state, profileColors, profileIcons, omegaTarget, $timeout, $location, $filter, getAttachedName, isProfileNameReserved, isProfileNameHidden, dispNameFilter, downloadFile, themes) {
|
|
668
|
+
var changeTheme, checkFormValid, diff, key, onOptionChange, showFirstRun, showFirstRunOnce, themeItems, tr, type, val, _ref, _ref1, _ref2;
|
|
669
|
+
if (((typeof browser !== "undefined" && browser !== null ? (_ref = browser.proxy) != null ? _ref.register : void 0 : void 0) != null) || ((typeof browser !== "undefined" && browser !== null ? (_ref1 = browser.proxy) != null ? _ref1.registerProxyScript : void 0 : void 0) != null)) {
|
|
670
|
+
$scope.isExperimental = true;
|
|
671
|
+
$scope.pacProfilesUnsupported = true;
|
|
672
|
+
}
|
|
673
|
+
tr = $filter('tr');
|
|
674
|
+
$rootScope.options = null;
|
|
675
|
+
omegaTarget.state('customCss').then(function(customCss) {
|
|
676
|
+
if (customCss == null) {
|
|
677
|
+
customCss = '';
|
|
678
|
+
}
|
|
679
|
+
return $scope.customCss = customCss;
|
|
680
|
+
});
|
|
681
|
+
omegaTarget.addOptionsChangeCallback(function(newOptions) {
|
|
682
|
+
$rootScope.options = angular.copy(newOptions);
|
|
683
|
+
$rootScope.optionsOld = angular.copy(newOptions);
|
|
684
|
+
omegaTarget.state('syncOptions').then(function(syncOptions) {
|
|
685
|
+
return $scope.syncOptions = syncOptions;
|
|
686
|
+
});
|
|
687
|
+
return $timeout(function() {
|
|
688
|
+
$rootScope.optionsDirty = false;
|
|
689
|
+
return showFirstRun();
|
|
690
|
+
});
|
|
691
|
+
});
|
|
692
|
+
$rootScope.revertOptions = function() {
|
|
693
|
+
if ($rootScope.optionsDirty) {
|
|
694
|
+
return $window.location.reload();
|
|
695
|
+
}
|
|
696
|
+
};
|
|
697
|
+
$rootScope.exportScript = function(event, name) {
|
|
698
|
+
var getProfileName;
|
|
699
|
+
$window.FORCEFIXEXPORTSCRIPTFORSOCKS = !!event.shiftKey;
|
|
700
|
+
getProfileName = name ? $q.when(name) : omegaTarget.state('currentProfileName');
|
|
701
|
+
return getProfileName.then(function(profileName) {
|
|
702
|
+
var ast, blob, fileName, missingProfile, pac, profile, profileNotFound, _ref2;
|
|
703
|
+
if (!profileName) {
|
|
704
|
+
return;
|
|
705
|
+
}
|
|
706
|
+
profile = $rootScope.profileByName(profileName);
|
|
707
|
+
if ((_ref2 = profile.profileType) === 'DirectProfile' || _ref2 === 'SystemProfile') {
|
|
708
|
+
return;
|
|
709
|
+
}
|
|
710
|
+
missingProfile = null;
|
|
711
|
+
profileNotFound = function(name) {
|
|
712
|
+
missingProfile = name;
|
|
713
|
+
return 'dumb';
|
|
714
|
+
};
|
|
715
|
+
ast = OmegaPac.PacGenerator.script($rootScope.options, profileName, {
|
|
716
|
+
profileNotFound: profileNotFound
|
|
717
|
+
});
|
|
718
|
+
pac = ast.print_to_string({
|
|
719
|
+
beautify: true,
|
|
720
|
+
comments: true
|
|
721
|
+
});
|
|
722
|
+
pac = OmegaPac.PacGenerator.ascii(pac);
|
|
723
|
+
blob = new Blob([pac], {
|
|
724
|
+
type: "text/plain;charset=utf-8"
|
|
725
|
+
});
|
|
726
|
+
fileName = profileName.replace(/\W+/g, '_');
|
|
727
|
+
downloadFile(blob, "OmegaProfile_" + fileName + ".pac");
|
|
728
|
+
if (missingProfile) {
|
|
729
|
+
return $timeout(function() {
|
|
730
|
+
return $rootScope.showAlert({
|
|
731
|
+
type: 'error',
|
|
732
|
+
message: tr('options_profileNotFound', [missingProfile])
|
|
733
|
+
});
|
|
734
|
+
});
|
|
735
|
+
}
|
|
736
|
+
});
|
|
737
|
+
};
|
|
738
|
+
diff = jsondiffpatch.create({
|
|
739
|
+
objectHash: function(obj) {
|
|
740
|
+
return JSON.stringify(obj);
|
|
741
|
+
},
|
|
742
|
+
textDiff: {
|
|
743
|
+
minLength: 1 / 0
|
|
744
|
+
}
|
|
745
|
+
});
|
|
746
|
+
$rootScope.showAlert = function(alert) {
|
|
747
|
+
return $timeout(function() {
|
|
748
|
+
$scope.alert = alert;
|
|
749
|
+
$scope.alertShown = true;
|
|
750
|
+
$scope.alertShownAt = Date.now();
|
|
751
|
+
$timeout($rootScope.hideAlert, 3000);
|
|
752
|
+
});
|
|
753
|
+
};
|
|
754
|
+
$rootScope.hideAlert = function() {
|
|
755
|
+
return $timeout(function() {
|
|
756
|
+
if (Date.now() - $scope.alertShownAt >= 1000) {
|
|
757
|
+
return $scope.alertShown = false;
|
|
758
|
+
}
|
|
759
|
+
});
|
|
760
|
+
};
|
|
761
|
+
checkFormValid = function() {
|
|
762
|
+
var fields;
|
|
763
|
+
fields = angular.element('.ng-invalid');
|
|
764
|
+
if (fields.length > 0) {
|
|
765
|
+
fields[0].focus();
|
|
766
|
+
$rootScope.showAlert({
|
|
767
|
+
type: 'error',
|
|
768
|
+
i18n: 'options_formInvalid'
|
|
769
|
+
});
|
|
770
|
+
return false;
|
|
771
|
+
}
|
|
772
|
+
return true;
|
|
773
|
+
};
|
|
774
|
+
$rootScope.applyOptions = function() {
|
|
775
|
+
var patch, plainOptions;
|
|
776
|
+
if (!$rootScope.optionsDirty) {
|
|
777
|
+
return;
|
|
778
|
+
}
|
|
779
|
+
if (!checkFormValid()) {
|
|
780
|
+
return;
|
|
781
|
+
}
|
|
782
|
+
if ($rootScope.$broadcast('omegaApplyOptions').defaultPrevented) {
|
|
783
|
+
return;
|
|
784
|
+
}
|
|
785
|
+
plainOptions = angular.fromJson(angular.toJson($rootScope.options));
|
|
786
|
+
patch = diff.diff($rootScope.optionsOld, plainOptions);
|
|
787
|
+
return omegaTarget.optionsPatch(patch).then(function() {
|
|
788
|
+
return $rootScope.showAlert({
|
|
789
|
+
type: 'success',
|
|
790
|
+
i18n: 'options_saveSuccess'
|
|
791
|
+
});
|
|
792
|
+
});
|
|
793
|
+
};
|
|
794
|
+
$rootScope.resetOptions = function(options) {
|
|
795
|
+
return omegaTarget.resetOptions(options).then(function() {
|
|
796
|
+
return $rootScope.showAlert({
|
|
797
|
+
type: 'success',
|
|
798
|
+
i18n: 'options_resetSuccess'
|
|
799
|
+
});
|
|
800
|
+
})["catch"](function(err) {
|
|
801
|
+
$rootScope.showAlert({
|
|
802
|
+
type: 'error',
|
|
803
|
+
message: err
|
|
804
|
+
});
|
|
805
|
+
return $q.reject(err);
|
|
806
|
+
});
|
|
807
|
+
};
|
|
808
|
+
$rootScope.profileByName = function(name) {
|
|
809
|
+
return OmegaPac.Profiles.byName(name, $rootScope.options);
|
|
810
|
+
};
|
|
811
|
+
$rootScope.systemProfile = $rootScope.profileByName('system');
|
|
812
|
+
$rootScope.externalProfile = {
|
|
813
|
+
color: '#49afcd',
|
|
814
|
+
name: tr('popup_externalProfile'),
|
|
815
|
+
profileType: 'FixedProfile',
|
|
816
|
+
fallbackProxy: {
|
|
817
|
+
host: "127.0.0.1",
|
|
818
|
+
port: 42,
|
|
819
|
+
scheme: "http"
|
|
820
|
+
}
|
|
821
|
+
};
|
|
822
|
+
$rootScope.applyOptionsConfirm = function() {
|
|
823
|
+
if (!checkFormValid()) {
|
|
824
|
+
return $q.reject('form_invalid');
|
|
825
|
+
}
|
|
826
|
+
if (!$rootScope.optionsDirty) {
|
|
827
|
+
return $q.when(true);
|
|
828
|
+
}
|
|
829
|
+
return $modal.open({
|
|
830
|
+
templateUrl: 'partials/apply_options_confirm.html'
|
|
831
|
+
}).result.then(function() {
|
|
832
|
+
return $rootScope.applyOptions();
|
|
833
|
+
});
|
|
834
|
+
};
|
|
835
|
+
$rootScope.newProfile = function() {
|
|
836
|
+
var scope;
|
|
837
|
+
scope = $rootScope.$new('isolate');
|
|
838
|
+
scope.options = $rootScope.options;
|
|
839
|
+
scope.isProfileNameReserved = isProfileNameReserved;
|
|
840
|
+
scope.isProfileNameHidden = isProfileNameHidden;
|
|
841
|
+
scope.profileByName = $rootScope.profileByName;
|
|
842
|
+
scope.validateProfileName = {
|
|
843
|
+
conflict: '!$value || !profileByName($value)',
|
|
844
|
+
reserved: '!$value || !isProfileNameReserved($value)'
|
|
845
|
+
};
|
|
846
|
+
scope.profileIcons = profileIcons;
|
|
847
|
+
scope.dispNameFilter = dispNameFilter;
|
|
848
|
+
scope.options = $scope.options;
|
|
849
|
+
scope.pacProfilesUnsupported = $scope.pacProfilesUnsupported;
|
|
850
|
+
return $modal.open({
|
|
851
|
+
templateUrl: 'partials/new_profile.html',
|
|
852
|
+
scope: scope
|
|
853
|
+
}).result.then(function(profile) {
|
|
854
|
+
var choice;
|
|
855
|
+
profile = OmegaPac.Profiles.create(profile);
|
|
856
|
+
choice = Math.floor(Math.random() * profileColors.length);
|
|
857
|
+
if (profile.color == null) {
|
|
858
|
+
profile.color = profileColors[choice];
|
|
859
|
+
}
|
|
860
|
+
OmegaPac.Profiles.updateRevision(profile);
|
|
861
|
+
$rootScope.options[OmegaPac.Profiles.nameAsKey(profile)] = profile;
|
|
862
|
+
return $state.go('profile', {
|
|
863
|
+
name: profile.name
|
|
864
|
+
});
|
|
865
|
+
});
|
|
866
|
+
};
|
|
867
|
+
$rootScope.replaceProfile = function(fromName, toName) {
|
|
868
|
+
return $rootScope.applyOptionsConfirm().then(function() {
|
|
869
|
+
var scope;
|
|
870
|
+
scope = $rootScope.$new('isolate');
|
|
871
|
+
scope.options = $rootScope.options;
|
|
872
|
+
scope.fromName = fromName;
|
|
873
|
+
scope.toName = toName;
|
|
874
|
+
scope.profileByName = $rootScope.profileByName;
|
|
875
|
+
scope.dispNameFilter = dispNameFilter;
|
|
876
|
+
scope.options = $scope.options;
|
|
877
|
+
scope.profileSelect = function(model) {
|
|
878
|
+
return "<div omega-profile-select=\"options | profiles:profile\"\n ng-model=\"" + model + "\" options=\"options\"\n disp-name=\"dispNameFilter\" style=\"display: inline-block;\">\n</div>";
|
|
879
|
+
};
|
|
880
|
+
return $modal.open({
|
|
881
|
+
templateUrl: 'partials/replace_profile.html',
|
|
882
|
+
scope: scope
|
|
883
|
+
}).result.then(function(_arg) {
|
|
884
|
+
var fromName, toName;
|
|
885
|
+
fromName = _arg.fromName, toName = _arg.toName;
|
|
886
|
+
return omegaTarget.replaceRef(fromName, toName).then(function() {
|
|
887
|
+
return $rootScope.showAlert({
|
|
888
|
+
type: 'success',
|
|
889
|
+
i18n: 'options_replaceProfileSuccess'
|
|
890
|
+
});
|
|
891
|
+
})["catch"](function(err) {
|
|
892
|
+
return $rootScope.showAlert({
|
|
893
|
+
type: 'error',
|
|
894
|
+
message: err
|
|
895
|
+
});
|
|
896
|
+
});
|
|
897
|
+
});
|
|
898
|
+
});
|
|
899
|
+
};
|
|
900
|
+
$rootScope.renameProfile = function(fromName) {
|
|
901
|
+
return $rootScope.applyOptionsConfirm().then(function() {
|
|
902
|
+
var profile, scope;
|
|
903
|
+
profile = $rootScope.profileByName(fromName);
|
|
904
|
+
scope = $rootScope.$new('isolate');
|
|
905
|
+
scope.options = $rootScope.options;
|
|
906
|
+
scope.fromName = fromName;
|
|
907
|
+
scope.isProfileNameReserved = isProfileNameReserved;
|
|
908
|
+
scope.isProfileNameHidden = isProfileNameHidden;
|
|
909
|
+
scope.profileByName = $rootScope.profileByName;
|
|
910
|
+
scope.validateProfileName = {
|
|
911
|
+
conflict: '!$value || $value == fromName || !profileByName($value)',
|
|
912
|
+
reserved: '!$value || !isProfileNameReserved($value)'
|
|
913
|
+
};
|
|
914
|
+
scope.dispNameFilter = $scope.dispNameFilter;
|
|
915
|
+
scope.options = $scope.options;
|
|
916
|
+
return $modal.open({
|
|
917
|
+
templateUrl: 'partials/rename_profile.html',
|
|
918
|
+
scope: scope
|
|
919
|
+
}).result.then(function(toName) {
|
|
920
|
+
var attachedName, defaultProfileName, rename, toAttachedName;
|
|
921
|
+
if (toName !== fromName) {
|
|
922
|
+
rename = omegaTarget.renameProfile(fromName, toName);
|
|
923
|
+
attachedName = getAttachedName(fromName);
|
|
924
|
+
if ($rootScope.profileByName(attachedName)) {
|
|
925
|
+
toAttachedName = getAttachedName(toName);
|
|
926
|
+
defaultProfileName = void 0;
|
|
927
|
+
if ($rootScope.profileByName(toAttachedName)) {
|
|
928
|
+
defaultProfileName = profile.defaultProfileName;
|
|
929
|
+
rename = rename.then(function() {
|
|
930
|
+
var toAttachedKey;
|
|
931
|
+
toAttachedKey = OmegaPac.Profiles.nameAsKey(toAttachedName);
|
|
932
|
+
profile = $rootScope.profileByName(toName);
|
|
933
|
+
profile.defaultProfileName = 'direct';
|
|
934
|
+
OmegaPac.Profiles.updateRevision(profile);
|
|
935
|
+
delete $rootScope.options[toAttachedKey];
|
|
936
|
+
return $rootScope.applyOptions();
|
|
937
|
+
});
|
|
938
|
+
}
|
|
939
|
+
rename = rename.then(function() {
|
|
940
|
+
return omegaTarget.renameProfile(attachedName, toAttachedName);
|
|
941
|
+
});
|
|
942
|
+
if (defaultProfileName) {
|
|
943
|
+
rename = rename.then(function() {
|
|
944
|
+
profile = $rootScope.profileByName(toName);
|
|
945
|
+
profile.defaultProfileName = defaultProfileName;
|
|
946
|
+
return $rootScope.applyOptions();
|
|
947
|
+
});
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
return rename.then(function() {
|
|
951
|
+
return $state.go('profile', {
|
|
952
|
+
name: toName
|
|
953
|
+
});
|
|
954
|
+
})["catch"](function(err) {
|
|
955
|
+
return $rootScope.showAlert({
|
|
956
|
+
type: 'error',
|
|
957
|
+
message: err
|
|
958
|
+
});
|
|
959
|
+
});
|
|
960
|
+
}
|
|
961
|
+
});
|
|
962
|
+
});
|
|
963
|
+
};
|
|
964
|
+
$scope.updatingProfile = {};
|
|
965
|
+
$rootScope.updateProfile = function(name) {
|
|
966
|
+
return $rootScope.applyOptionsConfirm().then(function() {
|
|
967
|
+
if (name != null) {
|
|
968
|
+
$scope.updatingProfile[name] = true;
|
|
969
|
+
} else {
|
|
970
|
+
OmegaPac.Profiles.each($scope.options, function(key, profile) {
|
|
971
|
+
if (!profile.builtin) {
|
|
972
|
+
return $scope.updatingProfile[profile.name] = true;
|
|
973
|
+
}
|
|
974
|
+
});
|
|
975
|
+
}
|
|
976
|
+
return omegaTarget.updateProfile(name, 'bypass_cache').then(function(results) {
|
|
977
|
+
var error, profileName, result, singleErr, success;
|
|
978
|
+
success = 0;
|
|
979
|
+
error = 0;
|
|
980
|
+
for (profileName in results) {
|
|
981
|
+
if (!__hasProp.call(results, profileName)) continue;
|
|
982
|
+
result = results[profileName];
|
|
983
|
+
if (result instanceof Error) {
|
|
984
|
+
error++;
|
|
985
|
+
} else {
|
|
986
|
+
success++;
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
if (error === 0) {
|
|
990
|
+
return $rootScope.showAlert({
|
|
991
|
+
type: 'success',
|
|
992
|
+
i18n: 'options_profileDownloadSuccess'
|
|
993
|
+
});
|
|
994
|
+
} else {
|
|
995
|
+
if (error === 1) {
|
|
996
|
+
singleErr = results[OmegaPac.Profiles.nameAsKey(name)];
|
|
997
|
+
if (singleErr) {
|
|
998
|
+
return $q.reject(singleErr);
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
return $q.reject(results);
|
|
1002
|
+
}
|
|
1003
|
+
})["catch"](function(err) {
|
|
1004
|
+
var message, _ref2, _ref3, _ref4;
|
|
1005
|
+
message = tr('options_profileDownloadError_' + err.name, [(_ref2 = (_ref3 = err.statusCode) != null ? _ref3 : (_ref4 = err.original) != null ? _ref4.statusCode : void 0) != null ? _ref2 : '']);
|
|
1006
|
+
if (message) {
|
|
1007
|
+
return $rootScope.showAlert({
|
|
1008
|
+
type: 'error',
|
|
1009
|
+
message: message
|
|
1010
|
+
});
|
|
1011
|
+
} else {
|
|
1012
|
+
return $rootScope.showAlert({
|
|
1013
|
+
type: 'error',
|
|
1014
|
+
i18n: 'options_profileDownloadError'
|
|
1015
|
+
});
|
|
1016
|
+
}
|
|
1017
|
+
})["finally"](function() {
|
|
1018
|
+
if (name != null) {
|
|
1019
|
+
return $scope.updatingProfile[name] = false;
|
|
1020
|
+
} else {
|
|
1021
|
+
return $scope.updatingProfile = {};
|
|
1022
|
+
}
|
|
1023
|
+
});
|
|
1024
|
+
});
|
|
1025
|
+
};
|
|
1026
|
+
onOptionChange = function(options, oldOptions) {
|
|
1027
|
+
if (options === oldOptions || (oldOptions == null)) {
|
|
1028
|
+
return;
|
|
1029
|
+
}
|
|
1030
|
+
return $rootScope.optionsDirty = true;
|
|
1031
|
+
};
|
|
1032
|
+
$rootScope.$watch('options', onOptionChange, true);
|
|
1033
|
+
$rootScope.$on('$stateChangeStart', function(event, _, __, fromState) {
|
|
1034
|
+
if (!checkFormValid()) {
|
|
1035
|
+
return event.preventDefault();
|
|
1036
|
+
}
|
|
1037
|
+
});
|
|
1038
|
+
$rootScope.$on('$stateChangeSuccess', function() {
|
|
1039
|
+
return omegaTarget.lastUrl($location.url());
|
|
1040
|
+
});
|
|
1041
|
+
$window.onbeforeunload = function() {
|
|
1042
|
+
if ($rootScope.optionsDirty) {
|
|
1043
|
+
return tr('options_optionsNotSaved');
|
|
1044
|
+
} else {
|
|
1045
|
+
return null;
|
|
1046
|
+
}
|
|
1047
|
+
};
|
|
1048
|
+
document.addEventListener('click', (function() {
|
|
1049
|
+
return $rootScope.hideAlert();
|
|
1050
|
+
}), false);
|
|
1051
|
+
$scope.profileIcons = profileIcons;
|
|
1052
|
+
$scope.dispNameFilter = dispNameFilter;
|
|
1053
|
+
_ref2 = OmegaPac.Profiles.formatByType;
|
|
1054
|
+
for (type in _ref2) {
|
|
1055
|
+
if (!__hasProp.call(_ref2, type)) continue;
|
|
1056
|
+
$scope.profileIcons[type] = $scope.profileIcons['RuleListProfile'];
|
|
1057
|
+
}
|
|
1058
|
+
$scope.alertIcons = {
|
|
1059
|
+
'success': 'glyphicon-ok',
|
|
1060
|
+
'warning': 'glyphicon-warning-sign',
|
|
1061
|
+
'error': 'glyphicon-remove',
|
|
1062
|
+
'danger': 'glyphicon-danger'
|
|
1063
|
+
};
|
|
1064
|
+
$scope.alertClassForType = function(type) {
|
|
1065
|
+
if (!type) {
|
|
1066
|
+
return '';
|
|
1067
|
+
}
|
|
1068
|
+
if (type === 'error') {
|
|
1069
|
+
type = 'danger';
|
|
1070
|
+
}
|
|
1071
|
+
return 'alert-' + type;
|
|
1072
|
+
};
|
|
1073
|
+
$scope.downloadIntervals = [15, 60, 180, 360, 720, 1440, -1];
|
|
1074
|
+
$scope.downloadIntervalI18n = function(interval) {
|
|
1075
|
+
return "options_downloadInterval_" + (interval < 0 ? "never" : interval);
|
|
1076
|
+
};
|
|
1077
|
+
themeItems = [];
|
|
1078
|
+
for (key in themes) {
|
|
1079
|
+
val = themes[key];
|
|
1080
|
+
val.key = 'others/base16-' + key;
|
|
1081
|
+
val.displayName = '(' + (val.dark ? '🌚' : '🌞') + ') ' + key;
|
|
1082
|
+
themeItems.push(val);
|
|
1083
|
+
}
|
|
1084
|
+
$scope.themeItems = themeItems;
|
|
1085
|
+
$scope.selectedItem = {
|
|
1086
|
+
data: null
|
|
1087
|
+
};
|
|
1088
|
+
changeTheme = function(themeKey) {
|
|
1089
|
+
var baseCss, getText, getVariableCss, themeCss, variableCss;
|
|
1090
|
+
if (!themeKey) {
|
|
1091
|
+
$scope.customCss = '';
|
|
1092
|
+
$scope.options['-customCss'] = $scope.customCss;
|
|
1093
|
+
return;
|
|
1094
|
+
}
|
|
1095
|
+
getText = function(url) {
|
|
1096
|
+
return fetch(url).then(function(res) {
|
|
1097
|
+
return res.text();
|
|
1098
|
+
});
|
|
1099
|
+
};
|
|
1100
|
+
variableCss = '';
|
|
1101
|
+
baseCss = '';
|
|
1102
|
+
themeCss = '';
|
|
1103
|
+
return getVariableCss = getText('lib/themes/variable.css').then(function(result) {
|
|
1104
|
+
variableCss = result;
|
|
1105
|
+
return getText('lib/themes/' + themeKey + '.css');
|
|
1106
|
+
}).then(function(result) {
|
|
1107
|
+
themeCss = result;
|
|
1108
|
+
return getText('lib/themes/base.css');
|
|
1109
|
+
}).then(function(result) {
|
|
1110
|
+
return baseCss = result;
|
|
1111
|
+
}).then(function() {
|
|
1112
|
+
$scope.customCss = [variableCss, themeCss, baseCss].join('\n');
|
|
1113
|
+
$scope.options['-customCss'] = $scope.customCss;
|
|
1114
|
+
return $scope.$applyAsync();
|
|
1115
|
+
})["catch"](function() {
|
|
1116
|
+
$scope.customCss = '';
|
|
1117
|
+
$scope.options['-customCss'] = $scope.customCss;
|
|
1118
|
+
return $scope.$applyAsync();
|
|
1119
|
+
});
|
|
1120
|
+
};
|
|
1121
|
+
$scope.selectTheme = function() {
|
|
1122
|
+
var themeItem;
|
|
1123
|
+
themeItem = $scope.selectedItem || {
|
|
1124
|
+
data: {}
|
|
1125
|
+
};
|
|
1126
|
+
return changeTheme(themeItem.data.key);
|
|
1127
|
+
};
|
|
1128
|
+
$scope.changeTheme = changeTheme;
|
|
1129
|
+
$scope.openShortcutConfig = omegaTarget.openShortcutConfig.bind(omegaTarget);
|
|
1130
|
+
showFirstRunOnce = true;
|
|
1131
|
+
showFirstRun = function() {
|
|
1132
|
+
if (!showFirstRunOnce) {
|
|
1133
|
+
return;
|
|
1134
|
+
}
|
|
1135
|
+
showFirstRunOnce = false;
|
|
1136
|
+
return omegaTarget.state('firstRun').then(function(firstRun) {
|
|
1137
|
+
var profileName, scope;
|
|
1138
|
+
if (!firstRun) {
|
|
1139
|
+
return;
|
|
1140
|
+
}
|
|
1141
|
+
omegaTarget.state('firstRun', '');
|
|
1142
|
+
profileName = null;
|
|
1143
|
+
OmegaPac.Profiles.each($rootScope.options, function(key, profile) {
|
|
1144
|
+
if (!profileName && profile.profileType === 'FixedProfile') {
|
|
1145
|
+
return profileName = profile.name;
|
|
1146
|
+
}
|
|
1147
|
+
});
|
|
1148
|
+
if (!profileName) {
|
|
1149
|
+
return;
|
|
1150
|
+
}
|
|
1151
|
+
scope = $rootScope.$new('isolate');
|
|
1152
|
+
scope.upgrade = firstRun === 'upgrade';
|
|
1153
|
+
return $modal.open({
|
|
1154
|
+
templateUrl: 'partials/options_welcome.html',
|
|
1155
|
+
keyboard: false,
|
|
1156
|
+
scope: scope,
|
|
1157
|
+
backdrop: 'static',
|
|
1158
|
+
backdropClass: 'opacity-half'
|
|
1159
|
+
}).result.then(function(r) {
|
|
1160
|
+
switch (r) {
|
|
1161
|
+
case 'later':
|
|
1162
|
+
break;
|
|
1163
|
+
case 'show':
|
|
1164
|
+
return $state.go('profile', {
|
|
1165
|
+
name: profileName
|
|
1166
|
+
}).then(function() {
|
|
1167
|
+
return $script('js/options_guide.js');
|
|
1168
|
+
});
|
|
1169
|
+
}
|
|
1170
|
+
});
|
|
1171
|
+
});
|
|
1172
|
+
};
|
|
1173
|
+
return omegaTarget.refresh();
|
|
1174
|
+
});
|
|
1175
|
+
|
|
1176
|
+
}).call(this);
|
|
1177
|
+
|
|
1178
|
+
(function() {
|
|
1179
|
+
angular.module('omega').controller('PacProfileCtrl', function($scope, $modal) {
|
|
1180
|
+
var oldLastUpdate, oldPacScript, oldPacUrl, onProfileChange, set;
|
|
1181
|
+
$scope.urlRegex = /^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/;
|
|
1182
|
+
$scope.urlWithFile = /^(ftp|http|https|file):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/;
|
|
1183
|
+
$scope.isFileUrl = OmegaPac.Profiles.isFileUrl;
|
|
1184
|
+
$scope.pacUrlCtrl = {
|
|
1185
|
+
ctrl: null
|
|
1186
|
+
};
|
|
1187
|
+
set = OmegaPac.Profiles.referencedBySet($scope.profile, $scope.options);
|
|
1188
|
+
$scope.referenced = Object.keys(set).length > 0;
|
|
1189
|
+
oldPacUrl = null;
|
|
1190
|
+
oldLastUpdate = null;
|
|
1191
|
+
oldPacScript = null;
|
|
1192
|
+
onProfileChange = function(profile, oldProfile) {
|
|
1193
|
+
if (!(profile && oldProfile)) {
|
|
1194
|
+
return;
|
|
1195
|
+
}
|
|
1196
|
+
if (profile.pacUrl !== oldProfile.pacUrl) {
|
|
1197
|
+
if (profile.lastUpdate) {
|
|
1198
|
+
oldPacUrl = oldProfile.pacUrl;
|
|
1199
|
+
oldLastUpdate = profile.lastUpdate;
|
|
1200
|
+
oldPacScript = oldProfile.pacScript;
|
|
1201
|
+
profile.lastUpdate = null;
|
|
1202
|
+
} else if (oldPacUrl && profile.pacUrl === oldPacUrl) {
|
|
1203
|
+
profile.lastUpdate = oldLastUpdate;
|
|
1204
|
+
profile.pacScript = oldPacScript;
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
return $scope.pacUrlIsFile = $scope.isFileUrl(profile.pacUrl);
|
|
1208
|
+
};
|
|
1209
|
+
$scope.$watch('profile', onProfileChange, true);
|
|
1210
|
+
$scope.editProxyAuth = function(scheme) {
|
|
1211
|
+
var auth, prop, scope, _ref;
|
|
1212
|
+
prop = 'all';
|
|
1213
|
+
auth = (_ref = $scope.profile.auth) != null ? _ref[prop] : void 0;
|
|
1214
|
+
scope = $scope.$new('isolate');
|
|
1215
|
+
scope.auth = auth && angular.copy(auth);
|
|
1216
|
+
return $modal.open({
|
|
1217
|
+
templateUrl: 'partials/fixed_auth_edit.html',
|
|
1218
|
+
scope: scope,
|
|
1219
|
+
size: 'sm'
|
|
1220
|
+
}).result.then(function(auth) {
|
|
1221
|
+
var _base;
|
|
1222
|
+
if (!(auth != null ? auth.username : void 0)) {
|
|
1223
|
+
if ($scope.profile.auth) {
|
|
1224
|
+
return $scope.profile.auth[prop] = void 0;
|
|
1225
|
+
}
|
|
1226
|
+
} else {
|
|
1227
|
+
if ((_base = $scope.profile).auth == null) {
|
|
1228
|
+
_base.auth = {};
|
|
1229
|
+
}
|
|
1230
|
+
return $scope.profile.auth[prop] = auth;
|
|
1231
|
+
}
|
|
1232
|
+
});
|
|
1233
|
+
};
|
|
1234
|
+
$scope.addHeader = function() {
|
|
1235
|
+
var _base;
|
|
1236
|
+
if ((_base = $scope.profile).headers == null) {
|
|
1237
|
+
_base.headers = [];
|
|
1238
|
+
}
|
|
1239
|
+
return $scope.profile.headers.push({
|
|
1240
|
+
name: '',
|
|
1241
|
+
value: ''
|
|
1242
|
+
});
|
|
1243
|
+
};
|
|
1244
|
+
return $scope.removeHeader = function(index) {
|
|
1245
|
+
return $scope.profile.headers.splice(index, 1);
|
|
1246
|
+
};
|
|
1247
|
+
});
|
|
1248
|
+
|
|
1249
|
+
}).call(this);
|
|
1250
|
+
|
|
1251
|
+
(function() {
|
|
1252
|
+
var __hasProp = {}.hasOwnProperty;
|
|
1253
|
+
|
|
1254
|
+
angular.module('omega').controller('ProfileCtrl', function($scope, $stateParams, $location, $rootScope, $timeout, $state, $modal, profileColorPalette, getAttachedName, getParentName, getVirtualTarget) {
|
|
1255
|
+
var name, profileTemplates, unwatch;
|
|
1256
|
+
name = $stateParams.name;
|
|
1257
|
+
profileTemplates = {
|
|
1258
|
+
'FixedProfile': 'profile_fixed.html',
|
|
1259
|
+
'PacProfile': 'profile_pac.html',
|
|
1260
|
+
'VirtualProfile': 'profile_virtual.html',
|
|
1261
|
+
'SwitchProfile': 'profile_switch.html',
|
|
1262
|
+
'RuleListProfile': 'profile_rule_list.html'
|
|
1263
|
+
};
|
|
1264
|
+
$scope.spectrumOptions = {
|
|
1265
|
+
localStorageKey: 'spectrum.profileColor',
|
|
1266
|
+
palette: profileColorPalette,
|
|
1267
|
+
preferredFormat: 'hex',
|
|
1268
|
+
showButtons: false,
|
|
1269
|
+
showInitial: true,
|
|
1270
|
+
showInput: true,
|
|
1271
|
+
showPalette: true,
|
|
1272
|
+
showAlpha: true,
|
|
1273
|
+
showSelectionPalette: true,
|
|
1274
|
+
maxSelectionSize: 5
|
|
1275
|
+
};
|
|
1276
|
+
$scope.getProfileColor = function() {
|
|
1277
|
+
var color, profile;
|
|
1278
|
+
color = void 0;
|
|
1279
|
+
profile = $scope.profile;
|
|
1280
|
+
while (profile) {
|
|
1281
|
+
color = profile.color;
|
|
1282
|
+
profile = getVirtualTarget(profile, $scope.options);
|
|
1283
|
+
}
|
|
1284
|
+
return color;
|
|
1285
|
+
};
|
|
1286
|
+
$scope.deleteProfile = function() {
|
|
1287
|
+
var key, parent, pname, profileName, refProfiles, refSet, refs, scope;
|
|
1288
|
+
profileName = $scope.profile.name;
|
|
1289
|
+
refs = OmegaPac.Profiles.referencedBySet(profileName, $rootScope.options);
|
|
1290
|
+
scope = $rootScope.$new('isolate');
|
|
1291
|
+
scope.profile = $scope.profile;
|
|
1292
|
+
scope.dispNameFilter = $scope.dispNameFilter;
|
|
1293
|
+
scope.options = $scope.options;
|
|
1294
|
+
if (Object.keys(refs).length > 0) {
|
|
1295
|
+
refSet = {};
|
|
1296
|
+
for (key in refs) {
|
|
1297
|
+
if (!__hasProp.call(refs, key)) continue;
|
|
1298
|
+
pname = refs[key];
|
|
1299
|
+
parent = getParentName(pname);
|
|
1300
|
+
if (parent) {
|
|
1301
|
+
key = OmegaPac.Profiles.nameAsKey(parent);
|
|
1302
|
+
pname = parent;
|
|
1303
|
+
}
|
|
1304
|
+
refSet[key] = pname;
|
|
1305
|
+
}
|
|
1306
|
+
refProfiles = [];
|
|
1307
|
+
for (key in refSet) {
|
|
1308
|
+
if (!__hasProp.call(refSet, key)) continue;
|
|
1309
|
+
refProfiles.push(OmegaPac.Profiles.byKey(key, $rootScope.options));
|
|
1310
|
+
}
|
|
1311
|
+
scope.refs = refProfiles;
|
|
1312
|
+
$modal.open({
|
|
1313
|
+
templateUrl: 'partials/cannot_delete_profile.html',
|
|
1314
|
+
scope: scope
|
|
1315
|
+
});
|
|
1316
|
+
} else {
|
|
1317
|
+
return $modal.open({
|
|
1318
|
+
templateUrl: 'partials/delete_profile.html',
|
|
1319
|
+
scope: scope
|
|
1320
|
+
}).result.then(function() {
|
|
1321
|
+
var attachedName, i, quickSwitch, _i, _ref;
|
|
1322
|
+
attachedName = getAttachedName(profileName);
|
|
1323
|
+
delete $rootScope.options[OmegaPac.Profiles.nameAsKey(attachedName)];
|
|
1324
|
+
delete $rootScope.options[OmegaPac.Profiles.nameAsKey(profileName)];
|
|
1325
|
+
if ($rootScope.options['-startupProfileName'] === profileName) {
|
|
1326
|
+
$rootScope.options['-startupProfileName'] = "";
|
|
1327
|
+
}
|
|
1328
|
+
quickSwitch = $rootScope.options['-quickSwitchProfiles'];
|
|
1329
|
+
for (i = _i = 0, _ref = quickSwitch.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
|
|
1330
|
+
if (profileName === quickSwitch[i]) {
|
|
1331
|
+
quickSwitch.splice(i, 1);
|
|
1332
|
+
break;
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
return $state.go('ui');
|
|
1336
|
+
});
|
|
1337
|
+
}
|
|
1338
|
+
};
|
|
1339
|
+
$scope.watchAndUpdateRevision = function(expression) {
|
|
1340
|
+
var onChange, revisionChanged;
|
|
1341
|
+
revisionChanged = false;
|
|
1342
|
+
onChange = function(profile, oldProfile) {
|
|
1343
|
+
if (profile === oldProfile || !profile || !oldProfile) {
|
|
1344
|
+
return profile;
|
|
1345
|
+
}
|
|
1346
|
+
if (revisionChanged && profile.revision !== oldProfile.revision) {
|
|
1347
|
+
return revisionChanged = false;
|
|
1348
|
+
} else {
|
|
1349
|
+
OmegaPac.Profiles.updateRevision(profile);
|
|
1350
|
+
return revisionChanged = true;
|
|
1351
|
+
}
|
|
1352
|
+
};
|
|
1353
|
+
return this.$watch(expression, onChange, true);
|
|
1354
|
+
};
|
|
1355
|
+
$scope.exportRuleList = null;
|
|
1356
|
+
$scope.exportRuleListOptions = null;
|
|
1357
|
+
$scope.setExportRuleListHandler = function(exportRuleList, options) {
|
|
1358
|
+
$scope.exportRuleList = exportRuleList;
|
|
1359
|
+
return $scope.exportRuleListOptions = options;
|
|
1360
|
+
};
|
|
1361
|
+
return unwatch = $scope.$watch((function() {
|
|
1362
|
+
var _ref;
|
|
1363
|
+
return (_ref = $scope.options) != null ? _ref['+' + name] : void 0;
|
|
1364
|
+
}), function(profile) {
|
|
1365
|
+
var templ, type, unwatch2, _ref;
|
|
1366
|
+
if (!profile) {
|
|
1367
|
+
if ($scope.options) {
|
|
1368
|
+
unwatch();
|
|
1369
|
+
$location.path('/');
|
|
1370
|
+
} else {
|
|
1371
|
+
unwatch2 = $scope.$watch('options', function() {
|
|
1372
|
+
if ($scope.options) {
|
|
1373
|
+
unwatch2();
|
|
1374
|
+
if (!$scope.options['+' + name]) {
|
|
1375
|
+
unwatch();
|
|
1376
|
+
return $location.path('/');
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
});
|
|
1380
|
+
}
|
|
1381
|
+
return;
|
|
1382
|
+
}
|
|
1383
|
+
if (OmegaPac.Profiles.formatByType[profile.profileType]) {
|
|
1384
|
+
profile.format = OmegaPac.Profiles.formatByType[profile.profileType];
|
|
1385
|
+
profile.profileType = 'RuleListProfile';
|
|
1386
|
+
}
|
|
1387
|
+
$scope.profile = profile;
|
|
1388
|
+
type = $scope.profile.profileType;
|
|
1389
|
+
templ = (_ref = profileTemplates[type]) != null ? _ref : 'profile_unsupported.html';
|
|
1390
|
+
$scope.profileTemplate = 'partials/' + templ;
|
|
1391
|
+
$scope.scriptable = true;
|
|
1392
|
+
return $scope.watchAndUpdateRevision('profile');
|
|
1393
|
+
});
|
|
1394
|
+
});
|
|
1395
|
+
|
|
1396
|
+
}).call(this);
|
|
1397
|
+
|
|
1398
|
+
(function() {
|
|
1399
|
+
angular.module('omega').controller('QuickSwitchCtrl', function($scope, $filter) {
|
|
1400
|
+
$scope.sortableOptions = {
|
|
1401
|
+
tolerance: 'pointer',
|
|
1402
|
+
axis: 'y',
|
|
1403
|
+
forceHelperSize: true,
|
|
1404
|
+
forcePlaceholderSize: true,
|
|
1405
|
+
connectWith: '.cycle-profile-container',
|
|
1406
|
+
containment: '#quick-switch-settings'
|
|
1407
|
+
};
|
|
1408
|
+
return $scope.$watchCollection('options', function(options) {
|
|
1409
|
+
var profile;
|
|
1410
|
+
if (options == null) {
|
|
1411
|
+
return;
|
|
1412
|
+
}
|
|
1413
|
+
return $scope.notCycledProfiles = (function() {
|
|
1414
|
+
var _i, _len, _ref, _results;
|
|
1415
|
+
_ref = $filter('profiles')(options, 'all');
|
|
1416
|
+
_results = [];
|
|
1417
|
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
|
1418
|
+
profile = _ref[_i];
|
|
1419
|
+
if (options["-quickSwitchProfiles"].indexOf(profile.name) < 0) {
|
|
1420
|
+
_results.push(profile.name);
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
return _results;
|
|
1424
|
+
})();
|
|
1425
|
+
});
|
|
1426
|
+
});
|
|
1427
|
+
|
|
1428
|
+
}).call(this);
|
|
1429
|
+
|
|
1430
|
+
(function() {
|
|
1431
|
+
angular.module('omega').controller('RuleListProfileCtrl', function($scope) {
|
|
1432
|
+
return $scope.ruleListFormats = OmegaPac.Profiles.ruleListFormats;
|
|
1433
|
+
});
|
|
1434
|
+
|
|
1435
|
+
}).call(this);
|
|
1436
|
+
|
|
1437
|
+
(function() {
|
|
1438
|
+
var __hasProp = {}.hasOwnProperty;
|
|
1439
|
+
|
|
1440
|
+
angular.module('omega').controller('SwitchProfileCtrl', function($scope, $rootScope, $location, $timeout, $q, $modal, profileIcons, getAttachedName, omegaTarget, trFilter, downloadFile) {
|
|
1441
|
+
var advancedConditionTypesExpanded, attachedReady, attachedReadyDefer, basicConditionTypeSet, basicConditionTypesExpanded, expandGroups, exportLegacyRuleList, exportRuleList, oldLastUpdate, oldRuleList, oldSourceUrl, onAttachedChange, parseOmegaRules, parseSource, rulesReady, rulesReadyDefer, stateEditorKey, stopWatchingForRules, type, unwatchRules, unwatchRulesShowNote, updateHasConditionTypes, _i, _len;
|
|
1442
|
+
$scope.ruleListFormats = OmegaPac.Profiles.ruleListFormats;
|
|
1443
|
+
exportRuleList = function() {
|
|
1444
|
+
var blob, eol, fileName, info, text;
|
|
1445
|
+
text = OmegaPac.RuleList.Switchy.compose({
|
|
1446
|
+
rules: $scope.profile.rules,
|
|
1447
|
+
defaultProfileName: $scope.attachedOptions.defaultProfileName
|
|
1448
|
+
});
|
|
1449
|
+
eol = '\r\n';
|
|
1450
|
+
info = '\n';
|
|
1451
|
+
info += '; Require: ZeroOmega >= 2.3.2' + eol;
|
|
1452
|
+
info += ("; Date: " + (new Date().toLocaleDateString())) + eol;
|
|
1453
|
+
info += ("; Usage: " + (trFilter('ruleList_usageUrl'))) + eol;
|
|
1454
|
+
text = text.replace('\n', info);
|
|
1455
|
+
blob = new Blob([text], {
|
|
1456
|
+
type: "text/plain;charset=utf-8"
|
|
1457
|
+
});
|
|
1458
|
+
fileName = $scope.profile.name.replace(/\W+/g, '_');
|
|
1459
|
+
return downloadFile(blob, "OmegaRules_" + fileName + ".sorl");
|
|
1460
|
+
};
|
|
1461
|
+
exportLegacyRuleList = function() {
|
|
1462
|
+
var blob, fileName, i, regexpRules, rule, text, wildcardRules, _i, _len, _ref;
|
|
1463
|
+
wildcardRules = '';
|
|
1464
|
+
regexpRules = '';
|
|
1465
|
+
_ref = $scope.profile.rules;
|
|
1466
|
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
|
1467
|
+
rule = _ref[_i];
|
|
1468
|
+
i = '';
|
|
1469
|
+
if (rule.profileName === $scope.attachedOptions.defaultProfileName) {
|
|
1470
|
+
i = '!';
|
|
1471
|
+
}
|
|
1472
|
+
switch (rule.condition.conditionType) {
|
|
1473
|
+
case 'HostWildcardCondition':
|
|
1474
|
+
wildcardRules += i + '@*://' + rule.condition.pattern + '/*' + '\r\n';
|
|
1475
|
+
break;
|
|
1476
|
+
case 'UrlWildcardCondition':
|
|
1477
|
+
wildcardRules += i + '@' + rule.condition.pattern + '\r\n';
|
|
1478
|
+
break;
|
|
1479
|
+
case 'UrlRegexCondition':
|
|
1480
|
+
regexpRules += i + rule.condition.pattern + '\r\n';
|
|
1481
|
+
}
|
|
1482
|
+
}
|
|
1483
|
+
text = "; Summary: Proxy Switchy! Exported Rule List\n; Date: " + (new Date().toLocaleDateString()) + "\n; Website: " + (trFilter('ruleList_usageUrl')) + "\n\n#BEGIN\n\n[wildcard]\n" + wildcardRules + "\n[regexp]\n" + regexpRules + "\n#END";
|
|
1484
|
+
blob = new Blob([text], {
|
|
1485
|
+
type: "text/plain;charset=utf-8"
|
|
1486
|
+
});
|
|
1487
|
+
fileName = $scope.profile.name.replace(/\W+/g, '_');
|
|
1488
|
+
return downloadFile(blob, "SwitchyRules_" + fileName + ".ssrl");
|
|
1489
|
+
};
|
|
1490
|
+
$scope.conditionHelp = {
|
|
1491
|
+
show: $location.search().help === 'condition'
|
|
1492
|
+
};
|
|
1493
|
+
$scope.basicConditionTypes = [
|
|
1494
|
+
{
|
|
1495
|
+
group: 'default',
|
|
1496
|
+
types: ['HostWildcardCondition', 'UrlWildcardCondition', 'UrlRegexCondition', 'FalseCondition']
|
|
1497
|
+
}
|
|
1498
|
+
];
|
|
1499
|
+
$scope.advancedConditionTypes = [
|
|
1500
|
+
{
|
|
1501
|
+
group: 'host',
|
|
1502
|
+
types: ['HostWildcardCondition', 'HostRegexCondition', 'HostLevelsCondition', 'IpCondition']
|
|
1503
|
+
}, {
|
|
1504
|
+
group: 'url',
|
|
1505
|
+
types: ['UrlWildcardCondition', 'UrlRegexCondition', 'KeywordCondition']
|
|
1506
|
+
}, {
|
|
1507
|
+
group: 'special',
|
|
1508
|
+
types: ['WeekdayCondition', 'TimeCondition', 'FalseCondition']
|
|
1509
|
+
}
|
|
1510
|
+
];
|
|
1511
|
+
expandGroups = function(groups) {
|
|
1512
|
+
var group, result, type, _i, _j, _len, _len1, _ref;
|
|
1513
|
+
result = [];
|
|
1514
|
+
for (_i = 0, _len = groups.length; _i < _len; _i++) {
|
|
1515
|
+
group = groups[_i];
|
|
1516
|
+
_ref = group.types;
|
|
1517
|
+
for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {
|
|
1518
|
+
type = _ref[_j];
|
|
1519
|
+
result.push({
|
|
1520
|
+
type: type,
|
|
1521
|
+
group: 'condition_group_' + group.group
|
|
1522
|
+
});
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
return result;
|
|
1526
|
+
};
|
|
1527
|
+
basicConditionTypesExpanded = expandGroups($scope.basicConditionTypes);
|
|
1528
|
+
advancedConditionTypesExpanded = expandGroups($scope.advancedConditionTypes);
|
|
1529
|
+
basicConditionTypeSet = {};
|
|
1530
|
+
for (_i = 0, _len = basicConditionTypesExpanded.length; _i < _len; _i++) {
|
|
1531
|
+
type = basicConditionTypesExpanded[_i];
|
|
1532
|
+
basicConditionTypeSet[type.type] = type.type;
|
|
1533
|
+
}
|
|
1534
|
+
$scope.conditionTypes = basicConditionTypesExpanded;
|
|
1535
|
+
$scope.showConditionTypes = 0;
|
|
1536
|
+
$scope.hasConditionTypes = 0;
|
|
1537
|
+
$scope.hasUrlConditions = false;
|
|
1538
|
+
$scope.isUrlConditionType = {
|
|
1539
|
+
'UrlWildcardCondition': true,
|
|
1540
|
+
'UrlRegexCondition': true
|
|
1541
|
+
};
|
|
1542
|
+
updateHasConditionTypes = function() {
|
|
1543
|
+
var rule, _j, _k, _len1, _len2, _ref, _ref1, _ref2, _results;
|
|
1544
|
+
if (((_ref = $scope.profile) != null ? _ref.rules : void 0) == null) {
|
|
1545
|
+
return;
|
|
1546
|
+
}
|
|
1547
|
+
$scope.hasUrlConditions = false;
|
|
1548
|
+
_ref1 = $scope.profile.rules;
|
|
1549
|
+
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
|
1550
|
+
rule = _ref1[_j];
|
|
1551
|
+
if ($scope.isUrlConditionType[rule.condition.conditionType]) {
|
|
1552
|
+
$scope.hasUrlConditions = true;
|
|
1553
|
+
break;
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
if ($scope.hasConditionTypes !== 0) {
|
|
1557
|
+
return;
|
|
1558
|
+
}
|
|
1559
|
+
_ref2 = $scope.profile.rules;
|
|
1560
|
+
_results = [];
|
|
1561
|
+
for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
|
|
1562
|
+
rule = _ref2[_k];
|
|
1563
|
+
if (rule.condition.conditionType === 'TrueCondition') {
|
|
1564
|
+
rule.condition = {
|
|
1565
|
+
conditionType: 'HostWildcardCondition',
|
|
1566
|
+
pattern: '*'
|
|
1567
|
+
};
|
|
1568
|
+
}
|
|
1569
|
+
if (!basicConditionTypeSet[rule.condition.conditionType]) {
|
|
1570
|
+
$scope.hasConditionTypes = 1;
|
|
1571
|
+
$scope.showConditionTypes = 1;
|
|
1572
|
+
break;
|
|
1573
|
+
} else {
|
|
1574
|
+
_results.push(void 0);
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
return _results;
|
|
1578
|
+
};
|
|
1579
|
+
$scope.$watch('options["-showConditionTypes"]', function(show) {
|
|
1580
|
+
show || (show = 0);
|
|
1581
|
+
if (show > 0) {
|
|
1582
|
+
$scope.showConditionTypes = show;
|
|
1583
|
+
} else {
|
|
1584
|
+
updateHasConditionTypes();
|
|
1585
|
+
$scope.showConditionTypes = $scope.hasConditionTypes;
|
|
1586
|
+
}
|
|
1587
|
+
if ($scope.options['-exportLegacyRuleList']) {
|
|
1588
|
+
if ($scope.showConditionTypes > 0) {
|
|
1589
|
+
$scope.setExportRuleListHandler(exportRuleList, {
|
|
1590
|
+
warning: true
|
|
1591
|
+
});
|
|
1592
|
+
} else {
|
|
1593
|
+
$scope.setExportRuleListHandler(exportLegacyRuleList);
|
|
1594
|
+
}
|
|
1595
|
+
} else {
|
|
1596
|
+
$scope.setExportRuleListHandler(exportRuleList);
|
|
1597
|
+
}
|
|
1598
|
+
if ($scope.showConditionTypes === 0) {
|
|
1599
|
+
$scope.conditionTypes = basicConditionTypesExpanded;
|
|
1600
|
+
if ($scope.options['-exportLegacyRuleList']) {
|
|
1601
|
+
return $scope.setExportRuleListHandler(exportLegacyRuleList);
|
|
1602
|
+
}
|
|
1603
|
+
} else {
|
|
1604
|
+
$scope.conditionTypes = advancedConditionTypesExpanded;
|
|
1605
|
+
if ($scope.options["-showConditionTypes"] == null) {
|
|
1606
|
+
$scope.options["-showConditionTypes"] = $scope.showConditionTypes;
|
|
1607
|
+
}
|
|
1608
|
+
return typeof unwatchRules === "function" ? unwatchRules() : void 0;
|
|
1609
|
+
}
|
|
1610
|
+
});
|
|
1611
|
+
if ($scope.hasConditionTypes === 0) {
|
|
1612
|
+
unwatchRules = $scope.$watch('profile.rules', updateHasConditionTypes, true);
|
|
1613
|
+
}
|
|
1614
|
+
rulesReadyDefer = $q.defer();
|
|
1615
|
+
rulesReady = rulesReadyDefer.promise;
|
|
1616
|
+
stopWatchingForRules = $scope.$watch('profile.rules', function(rules) {
|
|
1617
|
+
if (!rules) {
|
|
1618
|
+
return;
|
|
1619
|
+
}
|
|
1620
|
+
stopWatchingForRules();
|
|
1621
|
+
return rulesReadyDefer.resolve(rules);
|
|
1622
|
+
});
|
|
1623
|
+
$scope.addRule = function() {
|
|
1624
|
+
var rule, templ, _ref;
|
|
1625
|
+
rule = $scope.profile.rules.length > 0 ? ((_ref = $scope.profile.rules, templ = _ref[_ref.length - 1], _ref), angular.copy(templ)) : {
|
|
1626
|
+
condition: {
|
|
1627
|
+
conditionType: 'HostWildcardCondition',
|
|
1628
|
+
pattern: ''
|
|
1629
|
+
},
|
|
1630
|
+
profileName: $scope.attachedOptions.defaultProfileName
|
|
1631
|
+
};
|
|
1632
|
+
if (rule.condition.pattern) {
|
|
1633
|
+
rule.condition.pattern = '';
|
|
1634
|
+
}
|
|
1635
|
+
return $scope.profile.rules.push(rule);
|
|
1636
|
+
};
|
|
1637
|
+
$scope.validateCondition = function(condition, pattern) {
|
|
1638
|
+
var _;
|
|
1639
|
+
if (condition.conditionType.indexOf('Regex') >= 0) {
|
|
1640
|
+
try {
|
|
1641
|
+
new RegExp(pattern);
|
|
1642
|
+
} catch (_error) {
|
|
1643
|
+
_ = _error;
|
|
1644
|
+
return false;
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
return true;
|
|
1648
|
+
};
|
|
1649
|
+
$scope.conditionHasWarning = function(condition) {
|
|
1650
|
+
var pattern;
|
|
1651
|
+
if (condition.conditionType === 'HostWildcardCondition') {
|
|
1652
|
+
pattern = condition.pattern;
|
|
1653
|
+
return pattern.indexOf(':') >= 0 || pattern.indexOf('/') >= 0;
|
|
1654
|
+
}
|
|
1655
|
+
return false;
|
|
1656
|
+
};
|
|
1657
|
+
$scope.validateIpCondition = function(condition, input) {
|
|
1658
|
+
var ip;
|
|
1659
|
+
if (!input) {
|
|
1660
|
+
return false;
|
|
1661
|
+
}
|
|
1662
|
+
ip = OmegaPac.Conditions.parseIp(input);
|
|
1663
|
+
return ip != null;
|
|
1664
|
+
};
|
|
1665
|
+
$scope.getWeekdayList = OmegaPac.Conditions.getWeekdayList;
|
|
1666
|
+
$scope.updateDay = function(condition, i, selected) {
|
|
1667
|
+
var char;
|
|
1668
|
+
condition.days || (condition.days = '-------');
|
|
1669
|
+
char = selected ? 'SMTWtFs'[i] : '-';
|
|
1670
|
+
condition.days = condition.days.substr(0, i) + char + condition.days.substr(i + 1);
|
|
1671
|
+
delete condition.startDay;
|
|
1672
|
+
return delete condition.endDay;
|
|
1673
|
+
};
|
|
1674
|
+
$scope.removeRule = function(index) {
|
|
1675
|
+
var removeForReal, scope;
|
|
1676
|
+
removeForReal = function() {
|
|
1677
|
+
return $scope.profile.rules.splice(index, 1);
|
|
1678
|
+
};
|
|
1679
|
+
if ($scope.options['-confirmDeletion']) {
|
|
1680
|
+
scope = $scope.$new('isolate');
|
|
1681
|
+
scope.rule = $scope.profile.rules[index];
|
|
1682
|
+
scope.ruleProfile = $scope.profileByName(scope.rule.profileName);
|
|
1683
|
+
scope.dispNameFilter = $scope.dispNameFilter;
|
|
1684
|
+
scope.options = $scope.options;
|
|
1685
|
+
return $modal.open({
|
|
1686
|
+
templateUrl: 'partials/rule_remove_confirm.html',
|
|
1687
|
+
scope: scope
|
|
1688
|
+
}).result.then(removeForReal);
|
|
1689
|
+
} else {
|
|
1690
|
+
return removeForReal();
|
|
1691
|
+
}
|
|
1692
|
+
};
|
|
1693
|
+
$scope.cloneRule = function(index) {
|
|
1694
|
+
var rule;
|
|
1695
|
+
rule = angular.copy($scope.profile.rules[index]);
|
|
1696
|
+
$scope.profile.rules.splice(index + 1, 0, rule);
|
|
1697
|
+
return $timeout(function() {
|
|
1698
|
+
var input, _ref, _ref1;
|
|
1699
|
+
input = angular.element(".switch-rule-row:nth-child(" + (index + 2) + ") input");
|
|
1700
|
+
if ((_ref = input[0]) != null) {
|
|
1701
|
+
_ref.focus();
|
|
1702
|
+
}
|
|
1703
|
+
return (_ref1 = input[0]) != null ? _ref1.select() : void 0;
|
|
1704
|
+
});
|
|
1705
|
+
};
|
|
1706
|
+
$scope.showNotes = false;
|
|
1707
|
+
$scope.addNote = function(index) {
|
|
1708
|
+
$scope.showNotes = true;
|
|
1709
|
+
return unwatchRulesShowNote();
|
|
1710
|
+
};
|
|
1711
|
+
unwatchRulesShowNote = $scope.$watch('profile.rules', (function(rules) {
|
|
1712
|
+
if (rules && rules.some(function(rule) {
|
|
1713
|
+
return !!rule.note;
|
|
1714
|
+
})) {
|
|
1715
|
+
$scope.showNotes = true;
|
|
1716
|
+
return unwatchRulesShowNote();
|
|
1717
|
+
}
|
|
1718
|
+
}), true);
|
|
1719
|
+
$scope.resetRules = function() {
|
|
1720
|
+
var scope;
|
|
1721
|
+
scope = $scope.$new('isolate');
|
|
1722
|
+
scope.ruleProfile = $scope.profileByName($scope.attachedOptions.defaultProfileName);
|
|
1723
|
+
scope.dispNameFilter = $scope.dispNameFilter;
|
|
1724
|
+
scope.options = $scope.options;
|
|
1725
|
+
return $modal.open({
|
|
1726
|
+
templateUrl: 'partials/rule_reset_confirm.html',
|
|
1727
|
+
scope: scope
|
|
1728
|
+
}).result.then(function() {
|
|
1729
|
+
var rule, _j, _len1, _ref, _results;
|
|
1730
|
+
_ref = $scope.profile.rules;
|
|
1731
|
+
_results = [];
|
|
1732
|
+
for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {
|
|
1733
|
+
rule = _ref[_j];
|
|
1734
|
+
_results.push(rule.profileName = $scope.attachedOptions.defaultProfileName);
|
|
1735
|
+
}
|
|
1736
|
+
return _results;
|
|
1737
|
+
});
|
|
1738
|
+
};
|
|
1739
|
+
$scope.sortableOptions = {
|
|
1740
|
+
handle: '.sort-bar',
|
|
1741
|
+
tolerance: 'pointer',
|
|
1742
|
+
axis: 'y',
|
|
1743
|
+
forceHelperSize: true,
|
|
1744
|
+
forcePlaceholderSize: true,
|
|
1745
|
+
containment: 'parent'
|
|
1746
|
+
};
|
|
1747
|
+
attachedReadyDefer = $q.defer();
|
|
1748
|
+
attachedReady = attachedReadyDefer.promise;
|
|
1749
|
+
$scope.$watch('profile.name', function(name) {
|
|
1750
|
+
$scope.attachedName = getAttachedName(name);
|
|
1751
|
+
return $scope.attachedKey = OmegaPac.Profiles.nameAsKey($scope.attachedName);
|
|
1752
|
+
});
|
|
1753
|
+
$scope.$watch('options[attachedKey]', function(attached) {
|
|
1754
|
+
return $scope.attached = attached;
|
|
1755
|
+
});
|
|
1756
|
+
$scope.watchAndUpdateRevision('options[attachedKey]');
|
|
1757
|
+
oldSourceUrl = null;
|
|
1758
|
+
oldLastUpdate = null;
|
|
1759
|
+
oldRuleList = null;
|
|
1760
|
+
onAttachedChange = function(attached, oldAttached) {
|
|
1761
|
+
if (!(attached && oldAttached)) {
|
|
1762
|
+
return;
|
|
1763
|
+
}
|
|
1764
|
+
if (attached.sourceUrl !== oldAttached.sourceUrl) {
|
|
1765
|
+
if (attached.lastUpdate) {
|
|
1766
|
+
oldSourceUrl = oldAttached.sourceUrl;
|
|
1767
|
+
oldLastUpdate = attached.lastUpdate;
|
|
1768
|
+
oldRuleList = oldAttached.ruleList;
|
|
1769
|
+
return attached.lastUpdate = null;
|
|
1770
|
+
} else if (oldSourceUrl && attached.sourceUrl === oldSourceUrl) {
|
|
1771
|
+
attached.lastUpdate = oldLastUpdate;
|
|
1772
|
+
return attached.ruleList = oldRuleList;
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
};
|
|
1776
|
+
$scope.$watch('options[attachedKey]', onAttachedChange, true);
|
|
1777
|
+
$scope.attachedOptions = {
|
|
1778
|
+
enabled: false
|
|
1779
|
+
};
|
|
1780
|
+
$scope.$watch('profile.defaultProfileName', function(name) {
|
|
1781
|
+
$scope.attachedOptions.enabled = name === $scope.attachedName;
|
|
1782
|
+
if (!$scope.attached || !$scope.attachedOptions.enabled) {
|
|
1783
|
+
return $scope.attachedOptions.defaultProfileName = name;
|
|
1784
|
+
}
|
|
1785
|
+
});
|
|
1786
|
+
$scope.$watch('attachedOptions.enabled', function(enabled, oldValue) {
|
|
1787
|
+
if (enabled === oldValue) {
|
|
1788
|
+
return;
|
|
1789
|
+
}
|
|
1790
|
+
if (enabled) {
|
|
1791
|
+
if ($scope.profile.defaultProfileName !== $scope.attachedName) {
|
|
1792
|
+
return $scope.profile.defaultProfileName = $scope.attachedName;
|
|
1793
|
+
}
|
|
1794
|
+
} else {
|
|
1795
|
+
if ($scope.profile.defaultProfileName === $scope.attachedName) {
|
|
1796
|
+
if ($scope.attached) {
|
|
1797
|
+
$scope.profile.defaultProfileName = $scope.attached.defaultProfileName;
|
|
1798
|
+
return $scope.attachedOptions.defaultProfileName = $scope.attached.defaultProfileName;
|
|
1799
|
+
} else {
|
|
1800
|
+
$scope.profile.defaultProfileName = 'direct';
|
|
1801
|
+
return $scope.attachedOptions.defaultProfileName = 'direct';
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
}
|
|
1805
|
+
});
|
|
1806
|
+
$scope.$watch('attached.defaultProfileName', function(name) {
|
|
1807
|
+
if (name && $scope.attachedOptions.enabled) {
|
|
1808
|
+
return $scope.attachedOptions.defaultProfileName = name;
|
|
1809
|
+
}
|
|
1810
|
+
});
|
|
1811
|
+
$scope.$watch('attachedOptions.defaultProfileName', function(name) {
|
|
1812
|
+
attachedReadyDefer.resolve();
|
|
1813
|
+
if ($scope.attached && $scope.attachedOptions.enabled) {
|
|
1814
|
+
return $scope.attached.defaultProfileName = name;
|
|
1815
|
+
} else {
|
|
1816
|
+
return $scope.profile.defaultProfileName = name;
|
|
1817
|
+
}
|
|
1818
|
+
});
|
|
1819
|
+
$scope.attachNew = function() {
|
|
1820
|
+
$scope.attached = OmegaPac.Profiles.create({
|
|
1821
|
+
name: $scope.attachedName,
|
|
1822
|
+
defaultProfileName: $scope.profile.defaultProfileName,
|
|
1823
|
+
profileType: 'RuleListProfile',
|
|
1824
|
+
color: $scope.profile.color
|
|
1825
|
+
});
|
|
1826
|
+
OmegaPac.Profiles.updateRevision($scope.attached);
|
|
1827
|
+
$scope.options[$scope.attachedKey] = $scope.attached;
|
|
1828
|
+
$scope.attachedOptions.enabled = true;
|
|
1829
|
+
return $scope.profile.defaultProfileName = $scope.attachedName;
|
|
1830
|
+
};
|
|
1831
|
+
$scope.removeAttached = function() {
|
|
1832
|
+
var scope;
|
|
1833
|
+
if (!$scope.attached) {
|
|
1834
|
+
return;
|
|
1835
|
+
}
|
|
1836
|
+
scope = $scope.$new('isolate');
|
|
1837
|
+
scope.attached = $scope.attached;
|
|
1838
|
+
scope.dispNameFilter = $scope.dispNameFilter;
|
|
1839
|
+
scope.options = $scope.options;
|
|
1840
|
+
return $modal.open({
|
|
1841
|
+
templateUrl: 'partials/delete_attached.html',
|
|
1842
|
+
scope: scope
|
|
1843
|
+
}).result.then(function() {
|
|
1844
|
+
$scope.profile.defaultProfileName = $scope.attached.defaultProfileName;
|
|
1845
|
+
return delete $scope.options[$scope.attachedKey];
|
|
1846
|
+
});
|
|
1847
|
+
};
|
|
1848
|
+
stateEditorKey = 'web._profileEditor.' + $scope.profile.name;
|
|
1849
|
+
$scope.loadRules = false;
|
|
1850
|
+
$scope.editSource = false;
|
|
1851
|
+
parseOmegaRules = function(code, _arg) {
|
|
1852
|
+
var detect, err, key, name, refs, requireResult, setError, _ref;
|
|
1853
|
+
_ref = _arg != null ? _arg : {}, detect = _ref.detect, requireResult = _ref.requireResult;
|
|
1854
|
+
setError = function(error) {
|
|
1855
|
+
var args, message, _ref1;
|
|
1856
|
+
if (error.reason) {
|
|
1857
|
+
args = (_ref1 = error.args) != null ? _ref1 : [error.sourceLineNo, error.source];
|
|
1858
|
+
message = trFilter('ruleList_error_' + error.reason, args);
|
|
1859
|
+
if (message) {
|
|
1860
|
+
error.message = message;
|
|
1861
|
+
}
|
|
1862
|
+
}
|
|
1863
|
+
return {
|
|
1864
|
+
error: error
|
|
1865
|
+
};
|
|
1866
|
+
};
|
|
1867
|
+
if (detect && !OmegaPac.RuleList.Switchy.detect(code)) {
|
|
1868
|
+
return {
|
|
1869
|
+
error: {
|
|
1870
|
+
reason: 'notSwitchy'
|
|
1871
|
+
}
|
|
1872
|
+
};
|
|
1873
|
+
}
|
|
1874
|
+
refs = OmegaPac.RuleList.Switchy.directReferenceSet({
|
|
1875
|
+
ruleList: code
|
|
1876
|
+
});
|
|
1877
|
+
if (requireResult && !refs) {
|
|
1878
|
+
return setError({
|
|
1879
|
+
reason: 'resultNotEnabled'
|
|
1880
|
+
});
|
|
1881
|
+
}
|
|
1882
|
+
for (key in refs) {
|
|
1883
|
+
if (!__hasProp.call(refs, key)) continue;
|
|
1884
|
+
name = refs[key];
|
|
1885
|
+
if (!OmegaPac.Profiles.byKey(key, $scope.options)) {
|
|
1886
|
+
return setError({
|
|
1887
|
+
reason: 'unknownProfile',
|
|
1888
|
+
args: [name]
|
|
1889
|
+
});
|
|
1890
|
+
}
|
|
1891
|
+
}
|
|
1892
|
+
try {
|
|
1893
|
+
return {
|
|
1894
|
+
rules: OmegaPac.RuleList.Switchy.parseOmega(code, null, null, {
|
|
1895
|
+
strict: true,
|
|
1896
|
+
source: false
|
|
1897
|
+
})
|
|
1898
|
+
};
|
|
1899
|
+
} catch (_error) {
|
|
1900
|
+
err = _error;
|
|
1901
|
+
return setError(err);
|
|
1902
|
+
}
|
|
1903
|
+
};
|
|
1904
|
+
parseSource = function() {
|
|
1905
|
+
var diff, error, oldRules, patch, rules, _ref;
|
|
1906
|
+
if (!$scope.source) {
|
|
1907
|
+
return true;
|
|
1908
|
+
}
|
|
1909
|
+
_ref = parseOmegaRules($scope.source.code.trim(), {
|
|
1910
|
+
requireResult: true
|
|
1911
|
+
}), rules = _ref.rules, error = _ref.error;
|
|
1912
|
+
if (error) {
|
|
1913
|
+
$scope.source.error = error;
|
|
1914
|
+
$scope.editSource = true;
|
|
1915
|
+
return false;
|
|
1916
|
+
} else {
|
|
1917
|
+
$scope.source.error = void 0;
|
|
1918
|
+
}
|
|
1919
|
+
$scope.attachedOptions.defaultProfileName = rules.pop().profileName;
|
|
1920
|
+
diff = jsondiffpatch.create({
|
|
1921
|
+
objectHash: function(obj) {
|
|
1922
|
+
return JSON.stringify(obj);
|
|
1923
|
+
},
|
|
1924
|
+
textDiff: {
|
|
1925
|
+
minLength: 1 / 0
|
|
1926
|
+
}
|
|
1927
|
+
});
|
|
1928
|
+
oldRules = angular.fromJson(angular.toJson($scope.profile.rules));
|
|
1929
|
+
patch = diff.diff(oldRules, rules);
|
|
1930
|
+
jsondiffpatch.patch($scope.profile.rules, patch);
|
|
1931
|
+
return true;
|
|
1932
|
+
};
|
|
1933
|
+
$scope.toggleSource = function() {
|
|
1934
|
+
return $q.all([attachedReady, rulesReady]).then(function() {
|
|
1935
|
+
var args, code;
|
|
1936
|
+
$scope.editSource = !$scope.editSource;
|
|
1937
|
+
if ($scope.editSource) {
|
|
1938
|
+
args = {
|
|
1939
|
+
rules: $scope.profile.rules,
|
|
1940
|
+
defaultProfileName: $scope.attachedOptions.defaultProfileName
|
|
1941
|
+
};
|
|
1942
|
+
code = OmegaPac.RuleList.Switchy.compose(args, {
|
|
1943
|
+
withResult: true
|
|
1944
|
+
});
|
|
1945
|
+
$scope.source = {
|
|
1946
|
+
code: code
|
|
1947
|
+
};
|
|
1948
|
+
} else {
|
|
1949
|
+
if (!parseSource()) {
|
|
1950
|
+
return;
|
|
1951
|
+
}
|
|
1952
|
+
$scope.source = null;
|
|
1953
|
+
$scope.loadRules = true;
|
|
1954
|
+
}
|
|
1955
|
+
return omegaTarget.state(stateEditorKey, {
|
|
1956
|
+
editSource: $scope.editSource
|
|
1957
|
+
});
|
|
1958
|
+
});
|
|
1959
|
+
};
|
|
1960
|
+
$rootScope.$on('$stateChangeStart', function(event, _, __, fromState) {
|
|
1961
|
+
var sourceValid;
|
|
1962
|
+
if ($scope.editSource && $scope.source.touched) {
|
|
1963
|
+
sourceValid = parseSource();
|
|
1964
|
+
if (!sourceValid) {
|
|
1965
|
+
return event.preventDefault();
|
|
1966
|
+
}
|
|
1967
|
+
}
|
|
1968
|
+
});
|
|
1969
|
+
$scope.$on('omegaApplyOptions', function(event) {
|
|
1970
|
+
var error, _ref;
|
|
1971
|
+
if (((_ref = $scope.attached) != null ? _ref.ruleList : void 0) && !$scope.attached.sourceUrl) {
|
|
1972
|
+
$scope.attachedRuleListError = void 0;
|
|
1973
|
+
error = parseOmegaRules($scope.attached.ruleList.trim(), {
|
|
1974
|
+
detect: true
|
|
1975
|
+
}).error;
|
|
1976
|
+
if (error) {
|
|
1977
|
+
if (error.reason !== 'resultNotEnabled' && error.reason !== 'notSwitchy') {
|
|
1978
|
+
$scope.attachedRuleListError = error;
|
|
1979
|
+
event.preventDefault();
|
|
1980
|
+
angular.element('#attached-rulelist')[0].focus();
|
|
1981
|
+
}
|
|
1982
|
+
} else {
|
|
1983
|
+
$scope.attached.format = 'Switchy';
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
if ($scope.editSource && $scope.source.touched) {
|
|
1987
|
+
event.preventDefault();
|
|
1988
|
+
if (parseSource()) {
|
|
1989
|
+
$scope.source.touched = false;
|
|
1990
|
+
return $timeout(function() {
|
|
1991
|
+
return $rootScope.applyOptions();
|
|
1992
|
+
});
|
|
1993
|
+
}
|
|
1994
|
+
}
|
|
1995
|
+
});
|
|
1996
|
+
omegaTarget.state(stateEditorKey).then(function(opts) {
|
|
1997
|
+
var getState;
|
|
1998
|
+
if (opts != null ? opts.editSource : void 0) {
|
|
1999
|
+
return $scope.toggleSource();
|
|
2000
|
+
} else {
|
|
2001
|
+
$scope.loadRules = true;
|
|
2002
|
+
getState = omegaTarget.state(['web.switchGuide', 'firstRun']);
|
|
2003
|
+
return $q.all([rulesReady, getState]).then(function(_arg) {
|
|
2004
|
+
var firstRun, switchGuide, _, _ref;
|
|
2005
|
+
_ = _arg[0], (_ref = _arg[1], switchGuide = _ref[0], firstRun = _ref[1]);
|
|
2006
|
+
if (firstRun || switchGuide === 'shown') {
|
|
2007
|
+
return;
|
|
2008
|
+
}
|
|
2009
|
+
omegaTarget.state('web.switchGuide', 'shown');
|
|
2010
|
+
if ($scope.profile.rules.length === 0) {
|
|
2011
|
+
return;
|
|
2012
|
+
}
|
|
2013
|
+
return $script('js/switch_profile_guide.js');
|
|
2014
|
+
});
|
|
2015
|
+
}
|
|
2016
|
+
});
|
|
2017
|
+
$scope.addHeader = function() {
|
|
2018
|
+
var _base;
|
|
2019
|
+
if ((_base = $scope.attached).headers == null) {
|
|
2020
|
+
_base.headers = [];
|
|
2021
|
+
}
|
|
2022
|
+
return $scope.attached.headers.push({
|
|
2023
|
+
name: '',
|
|
2024
|
+
value: ''
|
|
2025
|
+
});
|
|
2026
|
+
};
|
|
2027
|
+
return $scope.removeHeader = function(index) {
|
|
2028
|
+
return $scope.attached.headers.splice(index, 1);
|
|
2029
|
+
};
|
|
2030
|
+
});
|
|
2031
|
+
|
|
2032
|
+
}).call(this);
|
|
2033
|
+
|
|
2034
|
+
(function() {
|
|
2035
|
+
angular.module('omega').directive('inputGroupClear', function($timeout) {
|
|
2036
|
+
return {
|
|
2037
|
+
restrict: 'A',
|
|
2038
|
+
templateUrl: 'partials/input_group_clear.html',
|
|
2039
|
+
scope: {
|
|
2040
|
+
'model': '=model',
|
|
2041
|
+
'type': '@type',
|
|
2042
|
+
'ngPattern': '=?ngPattern',
|
|
2043
|
+
'placeholder': '@placeholder',
|
|
2044
|
+
'controller': '=?controller'
|
|
2045
|
+
},
|
|
2046
|
+
link: function(scope, element, attrs) {
|
|
2047
|
+
scope.catchAll = new RegExp('');
|
|
2048
|
+
$timeout(function() {
|
|
2049
|
+
return scope.controller = element.find('input').controller('ngModel');
|
|
2050
|
+
});
|
|
2051
|
+
scope.oldModel = '';
|
|
2052
|
+
scope.controller = scope.input;
|
|
2053
|
+
scope.modelChange = function() {
|
|
2054
|
+
if (scope.model) {
|
|
2055
|
+
return scope.oldModel = '';
|
|
2056
|
+
}
|
|
2057
|
+
};
|
|
2058
|
+
return scope.toggleClear = function() {
|
|
2059
|
+
var _ref;
|
|
2060
|
+
return _ref = [scope.oldModel, scope.model], scope.model = _ref[0], scope.oldModel = _ref[1], _ref;
|
|
2061
|
+
};
|
|
2062
|
+
}
|
|
2063
|
+
};
|
|
2064
|
+
});
|
|
2065
|
+
|
|
2066
|
+
angular.module('omega').directive('omegaUpload', function() {
|
|
2067
|
+
return {
|
|
2068
|
+
restrict: 'A',
|
|
2069
|
+
scope: {
|
|
2070
|
+
success: '&omegaUpload',
|
|
2071
|
+
error: '&omegaError'
|
|
2072
|
+
},
|
|
2073
|
+
link: function(scope, element, attrs) {
|
|
2074
|
+
var input;
|
|
2075
|
+
input = element[0];
|
|
2076
|
+
return element.on('change', function() {
|
|
2077
|
+
var reader;
|
|
2078
|
+
if (input.files.length > 0 && input.files[0].name.length > 0) {
|
|
2079
|
+
reader = new FileReader();
|
|
2080
|
+
reader.addEventListener('load', function(e) {
|
|
2081
|
+
return scope.$apply(function() {
|
|
2082
|
+
return scope.success({
|
|
2083
|
+
'$content': e.target.result
|
|
2084
|
+
});
|
|
2085
|
+
});
|
|
2086
|
+
});
|
|
2087
|
+
reader.addEventListener('error', function(e) {
|
|
2088
|
+
return scope.$apply(function() {
|
|
2089
|
+
return scope.error({
|
|
2090
|
+
'$error': e.target.error
|
|
2091
|
+
});
|
|
2092
|
+
});
|
|
2093
|
+
});
|
|
2094
|
+
reader.readAsText(input.files[0]);
|
|
2095
|
+
return input.value = '';
|
|
2096
|
+
}
|
|
2097
|
+
});
|
|
2098
|
+
}
|
|
2099
|
+
};
|
|
2100
|
+
});
|
|
2101
|
+
|
|
2102
|
+
angular.module('omega').directive('omegaIp2str', function() {
|
|
2103
|
+
return {
|
|
2104
|
+
restrict: 'A',
|
|
2105
|
+
priority: 2,
|
|
2106
|
+
require: 'ngModel',
|
|
2107
|
+
link: function(scope, element, attr, ngModel) {
|
|
2108
|
+
ngModel.$parsers.push(function(value) {
|
|
2109
|
+
if (value) {
|
|
2110
|
+
return OmegaPac.Conditions.fromStr('Ip: ' + value);
|
|
2111
|
+
} else {
|
|
2112
|
+
return {
|
|
2113
|
+
conditionType: 'IpCondition',
|
|
2114
|
+
ip: '0.0.0.0',
|
|
2115
|
+
prefixLength: 0
|
|
2116
|
+
};
|
|
2117
|
+
}
|
|
2118
|
+
});
|
|
2119
|
+
return ngModel.$formatters.push(function(value) {
|
|
2120
|
+
if (value != null ? value.ip : void 0) {
|
|
2121
|
+
return OmegaPac.Conditions.str(value).split(' ', 2)[1];
|
|
2122
|
+
} else {
|
|
2123
|
+
return '';
|
|
2124
|
+
}
|
|
2125
|
+
});
|
|
2126
|
+
}
|
|
2127
|
+
};
|
|
2128
|
+
});
|
|
2129
|
+
|
|
2130
|
+
}).call(this);
|
|
2131
|
+
|
|
2132
|
+
(function() {
|
|
2133
|
+
angular.module('omega').filter('profiles', function(builtinProfiles, profileOrder, isProfileNameHidden, isProfileNameReserved) {
|
|
2134
|
+
var builtinProfileList, charCodePlus, profile, _;
|
|
2135
|
+
charCodePlus = '+'.charCodeAt(0);
|
|
2136
|
+
builtinProfileList = (function() {
|
|
2137
|
+
var _results;
|
|
2138
|
+
_results = [];
|
|
2139
|
+
for (_ in builtinProfiles) {
|
|
2140
|
+
profile = builtinProfiles[_];
|
|
2141
|
+
_results.push(profile);
|
|
2142
|
+
}
|
|
2143
|
+
return _results;
|
|
2144
|
+
})();
|
|
2145
|
+
return function(options, filter) {
|
|
2146
|
+
var name, result, value;
|
|
2147
|
+
result = [];
|
|
2148
|
+
for (name in options) {
|
|
2149
|
+
value = options[name];
|
|
2150
|
+
if (name.charCodeAt(0) === charCodePlus) {
|
|
2151
|
+
result.push(value);
|
|
2152
|
+
}
|
|
2153
|
+
}
|
|
2154
|
+
if (typeof filter === 'object' || (typeof filter === 'string' && filter.charCodeAt(0) === charCodePlus)) {
|
|
2155
|
+
if (typeof filter === 'string') {
|
|
2156
|
+
filter = filter.substr(1);
|
|
2157
|
+
}
|
|
2158
|
+
result = OmegaPac.Profiles.validResultProfilesFor(filter, options);
|
|
2159
|
+
}
|
|
2160
|
+
if (filter === 'all') {
|
|
2161
|
+
result = result.filter(function(profile) {
|
|
2162
|
+
return !isProfileNameHidden(profile.name);
|
|
2163
|
+
});
|
|
2164
|
+
result = result.concat(builtinProfileList);
|
|
2165
|
+
} else {
|
|
2166
|
+
result = result.filter(function(profile) {
|
|
2167
|
+
return !isProfileNameReserved(profile.name);
|
|
2168
|
+
});
|
|
2169
|
+
}
|
|
2170
|
+
if (filter === 'sorted') {
|
|
2171
|
+
result.sort(profileOrder);
|
|
2172
|
+
}
|
|
2173
|
+
return result;
|
|
2174
|
+
};
|
|
2175
|
+
});
|
|
2176
|
+
|
|
2177
|
+
angular.module('omega').filter('tr', function(omegaTarget) {
|
|
2178
|
+
return omegaTarget.getMessage;
|
|
2179
|
+
});
|
|
2180
|
+
|
|
2181
|
+
angular.module('omega').filter('dispName', function(omegaTarget) {
|
|
2182
|
+
return function(name) {
|
|
2183
|
+
if (typeof name === 'object') {
|
|
2184
|
+
name = name.name;
|
|
2185
|
+
}
|
|
2186
|
+
return omegaTarget.getMessage('profile_' + name) || name;
|
|
2187
|
+
};
|
|
2188
|
+
});
|
|
2189
|
+
|
|
2190
|
+
}).call(this);
|