diff options
Diffstat (limited to 'data/extensions/tprb.addon@searxes.danwin1210.me')
37 files changed, 7910 insertions, 0 deletions
diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/LICENSE.txt b/data/extensions/tprb.addon@searxes.danwin1210.me/LICENSE.txt new file mode 100644 index 0000000..e4cfdf1 --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/LICENSE.txt @@ -0,0 +1,549 @@ +Forked from original add-on. +Do not contact to original author about this add-on. + + +The MIT License + +Copyright (c) 2018 Searxes <searxes.danwin1210.me> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +MIT License + +Copyright (c) Sw + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- +> "Context menu icons" by Mark James (http://www.famfamfam.com/lab/icons/silk/) + License: https://creativecommons.org/licenses/by/2.5/ + +> CSS Toggle Switch (modified) (file "style_tgl.css") + +The MIT License (MIT) + +Copyright (c) 2018 Sw +Copyright (c) 2015 Ionut Colceriu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/META-INF/manifest.mf b/data/extensions/tprb.addon@searxes.danwin1210.me/META-INF/manifest.mf new file mode 100644 index 0000000..9972ea8 --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/META-INF/manifest.mf @@ -0,0 +1,206 @@ +Manifest-Version: 1.0 + +Name: LICENSE.txt +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: xqONmufwmwk4jhcBguGNoQ== +SHA1-Digest: GCnEjnBA3v67hg2sscBDXC9JBzc= +SHA256-Digest: PvVOYhduUsfSOvO1V9PFcmLlqAL3VhKSnaPnuIsPySw= + +Name: manifest.json +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: /9RVyq993YtGo0V66IXvKg== +SHA1-Digest: ffRgmcyvWSdO45VGq3Dpcmk1qOg= +SHA256-Digest: lQcB0j96eOhiW6YnEzRRU40YVKTAgz3+H5b1mHa5IG4= + +Name: style.css +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: LGxLFfLHmizrsH+oecJYrg== +SHA1-Digest: wjEwBByzB8QnDeVNMpCVeOIOIgg= +SHA256-Digest: g2fcR2i1bRfuEIk4V8ZluHYftAOJmQ7CFzjznU1QamA= + +Name: style_tgl.css +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: HtoySzwGmfukSMYb+H/9gQ== +SHA1-Digest: 97TS4810nl6zt7ff4zi2FPaUCLE= +SHA256-Digest: kOJ9U7nEhMXufu13ovL4gLyfj9o8dlzwOyk75FOzFp0= + +Name: tprb_cfg.html +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: jwPzCvGrqyBU8gmzgmDqVA== +SHA1-Digest: xvWXgM8VsYM/Nr6isz9vkQkzt/Y= +SHA256-Digest: EEOnafAh8wALuF1kVXzOeRjkiflcAlS3/yrHNCJ2Vrc= + +Name: tprb_cfg.js +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: ghycvlh7IAgpQrlFb1fEPQ== +SHA1-Digest: 4jfivl4NFbj2C00RaFxq+jZcj+4= +SHA256-Digest: 7sMAKWsfIWRFdKdGzz7s868toxIf0Y8QQYp+wMwbIfA= + +Name: tprb_core.js +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: X554izhoy0miFW5sxf9qVQ== +SHA1-Digest: nEoMPboM9JGg7oTNG1ibKQcW0lY= +SHA256-Digest: OJPeoLtayMhQUbMZXRQLCN76nySkgzspKBCjNdDAenc= + +Name: tprb_cs.js +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: +tsf9gwDApuN0k9bkigIuQ== +SHA1-Digest: 4nW+hkrn9463rwY0cx3itmoQErE= +SHA256-Digest: L/fqfe/MbRFYYuRLSJst1ZBdecHVr9VvZbnw1kVvji4= + +Name: tprb_dlg.html +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: msFLngiu9xzJUhULx9HB1g== +SHA1-Digest: 6HLitUXUIdls/lh/ET9Qd9bl8Po= +SHA256-Digest: dS4ODY+ZvGzR6wL8yeurVdbyFRIRqB9VKC30Vr43hX4= + +Name: tprb_dlg.js +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: S690zNQME8O5mbWITiC1JQ== +SHA1-Digest: altVoqItJ6wx6YdpFHzfX2txzjM= +SHA256-Digest: QBOYe8urOaPA00m1UnRMazAxysjafsSTSV/ThzrVnPk= + +Name: icons/i_red.png +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: Y94uOFA3QobcMAhjOsDWxw== +SHA1-Digest: lJxWWgOQ93T4SJ4o3G4DFlBF4IA= +SHA256-Digest: NwrapRA7Q8pcRp+tYD8h/HlmpljF7lv2Q/zVDCZpoIA= + +Name: icons/i_ylw.png +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: qpOkBsqmNwWqaiehmgV3bg== +SHA1-Digest: Kj0qicaG2mjWlcG6qbgwKPNH4iU= +SHA256-Digest: S25FDEx9ELxhrs9biCRCFXul3ABiVaSuBn0T0G465Ys= + +Name: icons/icon-16.png +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: rSlZIiy7vKHyxOIUPp+fCA== +SHA1-Digest: XuIm1mJsHmhBzQIVCBteEGJaSJY= +SHA256-Digest: qYRqqbL92Y9YuLGcM45Rzgb3hMYxO7HlciKQaocMRTA= + +Name: icons/icon-32.png +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: b0AfNTaA4FncIxh7OJjLiw== +SHA1-Digest: fl5tuymW/gSp2NJfqZ6C2lQuxpM= +SHA256-Digest: 1+NATr/QbwxePECXzjwTxzPo2djhbsRNNLPktyYGbEI= + +Name: icons/icon-48.png +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: S8KT5mdis+tTTx3WSpQUTQ== +SHA1-Digest: MLxD1D42eosb9+VOw7NgzQWRdtg= +SHA256-Digest: PKG9ldP7wmCLyaJ9wPuCzAwgcgdoeF1kvy+uVCbgyko= + +Name: icons/icon-64.png +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: +E227XoSbia5OhVxDclurg== +SHA1-Digest: KcOR9IJtSQNjd2tLrM0FA/trTR8= +SHA256-Digest: BLmHHZSo3GSlu86oRqEne+gwSityvlnpLlnZz9X0mC0= + +Name: icons/c/cdb_16.png +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: 0YEw+c3ExjM+Sea2HFh5/A== +SHA1-Digest: 6zr2r2ijGpfrfRdLldid3dTbPhs= +SHA256-Digest: GQOMo+EY448skHUTB7XUS4i7vG6iXtE5SvpyjO11QAM= + +Name: icons/c/go_16.png +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: cylhHBV8OVuy5aIej0go3A== +SHA1-Digest: mLuODFhyBFkE/jgiS6PMboiGzPM= +SHA256-Digest: BPEq6D/KNckbKR3w0ifKcKOSHQVHbRIlvGxR9ES/bn0= + +Name: icons/c/mitm_16.png +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: R86z2J5rzbHvRPfn7TntKw== +SHA1-Digest: fRHF4/w8RULUaYXepfKl7nPCgaI= +SHA256-Digest: n1bqDF86Fq6rzqGE/86Z4hRVUgvF+9Vt6RDWvIpbp/4= + +Name: icons/c/wpc_16.png +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: zn5+nF02kiNE80eHIRlqFg== +SHA1-Digest: zR7iK+zv6LQBfxlrrNnUE/QnwR0= +SHA256-Digest: tk82u0WN/N4rAYARQPeirUopGXjNLhrMQHoeL3FVqGM= + +Name: icons/s/j_red.png +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: giKI2RkEvo61BX5vbLtYjw== +SHA1-Digest: Sp7h/edUMVqC9iQbmYJ4+bEuyno= +SHA256-Digest: NCjqPE+Sc4IjJFUMbwOGT6Ko6QPMBKKHy1sJbm11YXw= + +Name: icons/s/j_wht.png +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: w4dMxFrGmYy0IgBKVhb3hA== +SHA1-Digest: Tg1H9dharsSn05YUxnK/lTbB0uw= +SHA256-Digest: Lkg1gwmEClfi3OJ0PQCFnH55SlcyzNjG+1Rtn6IZiug= + +Name: icons/s/j_ylw.png +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: tqjHmBdfULyNtYo3wTz1OQ== +SHA1-Digest: m0rhmRU6uLmYWPVLHaVw8CgKGrk= +SHA256-Digest: Es5LNxadtnashlN8JhonOipmkejMNRKoHGlxRX77g2E= + +Name: icons/s/ob_grn.png +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: FgB8/eGaN/nwTxHzAa7jPg== +SHA1-Digest: Q9O56iJjbAhWORePAKYrkAD+t20= +SHA256-Digest: T5EA3txs/0XPMsMXDsgtQtcbu4UQZUOy0OPv6QsrmCU= + +Name: icons/s/ob_red.png +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: wVW/q/3LsdlEVUl12tBM7Q== +SHA1-Digest: 3dTDVg2Vxz2m1ptQU0zFs4B1EYU= +SHA256-Digest: S+PH8CutkWeqAYwfXQlHI1H88TD4TWHkEdbvn2fga1I= + +Name: icons/s/ob_ylw.png +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: UA7vUmxAVMA5AuTznPDMQw== +SHA1-Digest: JSsVc3vHAYLeAOId4/5wN4/Bl1Y= +SHA256-Digest: wCTsVa7X6T/81kzO1jFKLxu5+cF3oVMgfEnnOHJey/s= + +Name: icons/u/0.gif +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: oyS7fQwKpgizVVzLkMI/Aw== +SHA1-Digest: pFWW+y+lK6gLDAvjb473a0XE0zo= +SHA256-Digest: vP5f2V0KQQaDGwWP8rWI/MGkrwF98P2un0KIdYjPcLU= + +Name: icons/u/1.gif +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: jAGXVxC7mhkFBzii37IM+w== +SHA1-Digest: 8Tygmiwcj8X0EFdkZNT+1T66Jfw= +SHA256-Digest: LimxyolrB/b5wpHKRzt9TboC7x0gjgWGE2FwVi9Fhfg= + +Name: icons/u/2.gif +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: y4+7jKDfmbIahy9b4r8Dgw== +SHA1-Digest: OTXCxVjnMCi6GblJgoTjzCXFaN0= +SHA256-Digest: aEi9A2gXaAqmK1Vl8sXwpmOGPH323WeAi7WAyb1032w= + +Name: icons/u/3.gif +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: i1p7sgjBcX0VTJVTFkyL5A== +SHA1-Digest: nunarqd4vudUGlzfVS/4HPuryiM= +SHA256-Digest: 8MOEMiX4ZuMtLgBXwAYi3RUVhPOeFSnNFr47ITHRIBs= + +Name: icons/u/4.gif +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: z+lx2l51PDVuUkxpcmlOWg== +SHA1-Digest: XcqrRP1+mjw821IXUvULXhPrdtg= +SHA256-Digest: 4xyg0V+Yb12jNWzhiLvHTGLTavygpEfB1JmcJyJGYAI= + +Name: icons/u/5.gif +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: U0f4xQcDA5nF4btQCLFBHA== +SHA1-Digest: Tuy5yctVfo22S7XYLjbd8yFZpQg= +SHA256-Digest: X59fuHpMMsCkfaEViwgE7OGFGxaYHy1PCDbppiWlePc= + +Name: icons/u/6.gif +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: cugrv/30CtZPZXuQXps8Mw== +SHA1-Digest: BGd5Qv7uu5Fak6uNc1h77Wxo8cg= +SHA256-Digest: 09bb+XSOMJCB4TSayXWhAIKAhcL/HsOgcDYexnvy7XY= + +Name: icons/u/7.gif +Digest-Algorithms: MD5 SHA1 SHA256 +MD5-Digest: YwVXthp6zQxYsWnn34SE9g== +SHA1-Digest: E3CxrsKILy9dbbPA4hwfNGIl1Y0= +SHA256-Digest: V2Y5n5SqGuqkr8y6mYmwcSIu7wr1PY6tXe74Y61aJdI= + diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/META-INF/mozilla.rsa b/data/extensions/tprb.addon@searxes.danwin1210.me/META-INF/mozilla.rsa Binary files differnew file mode 100644 index 0000000..492a0df --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/META-INF/mozilla.rsa diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/META-INF/mozilla.sf b/data/extensions/tprb.addon@searxes.danwin1210.me/META-INF/mozilla.sf new file mode 100644 index 0000000..0e5e887 --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/META-INF/mozilla.sf @@ -0,0 +1,5 @@ +Signature-Version: 1.0 +MD5-Digest-Manifest: Tu1797ZUyEUVDsaMAc064Q== +SHA1-Digest-Manifest: W2u/zTrqvLmathIjSoBDZfpbC3I= +SHA256-Digest-Manifest: sd0jt2JFyWuj3iQ3i0/XP0wJCArWM4PTocYUTK2zKtU= + diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/icons/c/cdb_16.png b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/c/cdb_16.png Binary files differnew file mode 100644 index 0000000..4bc307d --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/c/cdb_16.png diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/icons/c/go_16.png b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/c/go_16.png Binary files differnew file mode 100644 index 0000000..842eaf9 --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/c/go_16.png diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/icons/c/mitm_16.png b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/c/mitm_16.png Binary files differnew file mode 100644 index 0000000..3eea3cb --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/c/mitm_16.png diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/icons/c/wpc_16.png b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/c/wpc_16.png Binary files differnew file mode 100644 index 0000000..e24baeb --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/c/wpc_16.png diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/icons/i_red.png b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/i_red.png Binary files differnew file mode 100644 index 0000000..50a98b4 --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/i_red.png diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/icons/i_ylw.png b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/i_ylw.png Binary files differnew file mode 100644 index 0000000..4c37691 --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/i_ylw.png diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/icons/icon-16.png b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/icon-16.png Binary files differnew file mode 100644 index 0000000..f926347 --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/icon-16.png diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/icons/icon-32.png b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/icon-32.png Binary files differnew file mode 100644 index 0000000..e9e0e4f --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/icon-32.png diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/icons/icon-48.png b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/icon-48.png Binary files differnew file mode 100644 index 0000000..5813755 --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/icon-48.png diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/icons/icon-64.png b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/icon-64.png Binary files differnew file mode 100644 index 0000000..9297f3e --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/icon-64.png diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/icons/s/j_red.png b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/s/j_red.png Binary files differnew file mode 100644 index 0000000..5170cad --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/s/j_red.png diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/icons/s/j_wht.png b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/s/j_wht.png Binary files differnew file mode 100644 index 0000000..4a68caf --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/s/j_wht.png diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/icons/s/j_ylw.png b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/s/j_ylw.png Binary files differnew file mode 100644 index 0000000..939ee98 --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/s/j_ylw.png diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/icons/s/ob_grn.png b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/s/ob_grn.png Binary files differnew file mode 100644 index 0000000..0c70742 --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/s/ob_grn.png diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/icons/s/ob_red.png b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/s/ob_red.png Binary files differnew file mode 100644 index 0000000..b362fa0 --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/s/ob_red.png diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/icons/s/ob_ylw.png b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/s/ob_ylw.png Binary files differnew file mode 100644 index 0000000..d4d6c6e --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/s/ob_ylw.png diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/icons/u/0.gif b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/u/0.gif Binary files differnew file mode 100644 index 0000000..556e506 --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/u/0.gif diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/icons/u/1.gif b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/u/1.gif Binary files differnew file mode 100644 index 0000000..20e0cfe --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/u/1.gif diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/icons/u/2.gif b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/u/2.gif Binary files differnew file mode 100644 index 0000000..acbecb4 --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/u/2.gif diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/icons/u/3.gif b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/u/3.gif Binary files differnew file mode 100644 index 0000000..8160380 --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/u/3.gif diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/icons/u/4.gif b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/u/4.gif Binary files differnew file mode 100644 index 0000000..a20170a --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/u/4.gif diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/icons/u/5.gif b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/u/5.gif Binary files differnew file mode 100644 index 0000000..d7f7ceb --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/u/5.gif diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/icons/u/6.gif b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/u/6.gif Binary files differnew file mode 100644 index 0000000..15ea501 --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/u/6.gif diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/icons/u/7.gif b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/u/7.gif Binary files differnew file mode 100644 index 0000000..1006f11 --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/icons/u/7.gif diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/manifest.json b/data/extensions/tprb.addon@searxes.danwin1210.me/manifest.json new file mode 100644 index 0000000..6c14133 --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/manifest.json @@ -0,0 +1,72 @@ +{ + "manifest_version":2, + "name":"Searxes' Third-party Request Blocker", + "description":"\"Prevent your browser from connecting to third-party resource without user consent.\"", + "version":"1.0.14", + "author":"Searxes", + "homepage_url":"https://searxes.danwin1210.me/", + "permissions":[ + "webRequest", + "webRequestBlocking", + "<all_urls>", + "storage", + "unlimitedStorage", + "activeTab", + "tabs", + "webNavigation", + "contextMenus", + "privacy", + "browserSettings", + "browsingData", + "downloads" + ], + "browser_action":{ + "browser_style":false, + "default_icon":{ + "16":"icons/icon-16.png", + "32":"icons/icon-32.png" + }, + "default_title":"TPRB", + "default_popup":"tprb_dlg.html" + }, + "options_ui":{ + "page":"tprb_cfg.html", + "browser_style":false + }, + "commands":{ + "tprb-key-action":{ + "suggested_key":{ + "default":"Alt+3" + } + } + }, + "icons":{ + "32":"icons/icon-32.png", + "48":"icons/icon-48.png", + "64":"icons/icon-64.png" + }, + "background":{ + "scripts":[ + "tprb_core.js" + ] + }, + "content_scripts":[ + { + "matches":[ + "http://*/*", + "https://*/*" + ], + "js":[ + "tprb_cs.js" + ], + "run_at":"document_end", + "all_frames":true + } + ], + "applications":{ + "gecko":{ + "id":"tprb.addon@searxes.danwin1210.me", + "strict_min_version":"60.0" + } + } +}
\ No newline at end of file diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/style.css b/data/extensions/tprb.addon@searxes.danwin1210.me/style.css new file mode 100644 index 0000000..99607a7 --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/style.css @@ -0,0 +1,407 @@ +.minortxt { + color: #7e7e7e +} + +.prmbtn { + background: #fff; + border: 0; + font-family: Verdana; + font-size: 12px +} + +.iglass { + background-color: transparent; + background-repeat: no-repeat; + border: 0; + overflow: hidden; + outline: none; + outline-style: none +} + +.iglassCFG { + background-color: transparent; + background-repeat: no-repeat; + border: 0; + overflow: hidden; + outline: none; + outline-style: none; + margin: 6px 0 +} + +.iglassCFG:disabled { + font-weight: bold; + text-decoration: underline; + margin: 6px 0 +} + +body { + font: 13px Verdana; + overflow-x: hidden +} + +*:focus { + outline: none; + outline-style: none +} + +*::-moz-focus-inner { + border: 0 +} + +form { + min-width: 310px +} + +div { + -webkit-user-select: none; + -moz-user-select: none; + cursor: default +} + +hr { + color: #dcdcdc; + height: 0; + background: #dcdcdc +} + +input[class='lgr'] { + -webkit-transform: scale(1.25); + transform: scale(1.25) +} + +input[type=checkbox]+label:not(.ignr) { + color: #7e7e7e; + font-style: italic +} + +input[type=checkbox]:checked+label:not(.ignr) { + color: #000000; + font-style: normal +} + +input[type=radio]+label:not(.ignr) { + color: #7e7e7e; + font-style: italic +} + +input[type=radio]:checked+label:not(.ignr) { + color: #000000; + font-style: normal +} + +input[type=color] { + height: 16px +} + +label { + -webkit-user-select: none; + -moz-user-select: none +} + +table { + border-color: #fff; + border-style: solid; + width: 100% +} + +td { + font: 13px Verdana; + overflow: hidden; + white-space: nowrap; + max-width: 393px +} + +textarea { + white-space: pre; + overflow-wrap: normal; + overflow-x: scroll +} + +u { + border-bottom: 1px dotted #000; + text-decoration: none +} + +#ysp { + height: 7px +} + +#pfoot { + position: fixed; + bottom: 0; + width: 100%; + z-index: 100; + white-space: nowrap +} + +#xmenus { + overflow-x: auto; + overflow-y: hidden; + margin: 0 auto; + white-space: nowrap +} + +#cfg button { + display: inline-block; + height: 27px +} + +#cfg input[type=file] { + display: inline-block; + height: 27px +} + +#cfg table { + width: auto; + min-width: 0; + display: table; + border-color: #fff; + border-style: solid +} + +#cfgdr { + font: 20px Verdana; + max-width: device-width; + line-height: 1.8 +} + +#cfgdr table { + border-spacing: 3px; + max-width: device-width; + width: 98% +} + +#cfgdr td { + max-width: 40%; + font-size: 18px +} + +#cfgdr button { + display: inline-block; + height: 34px; + font-size: 20px +} + +#cfgdr textarea { + font-size: 16px; + max-width: device-width; + width: 98% +} + +#cfgdr input[type=text] { + font-size: 18px +} + +#cfgdr input[type=password] { + font-size: 18px +} + +#cfgdr input[type=file] { + display: inline-block; + height: 32px +} + +#cfgdr input[type=checkbox] { + -webkit-transform: scale(1.8); + transform: scale(1.8) +} + +#cfgdr input[type=radio] { + -webkit-transform: scale(1.8); + transform: scale(1.8) +} + +#black .minortxt { + color: #b4b4b4 +} + +#black .prmbtn { + background: #323234; + color: #fff +} + +#black { + background-color: #323234; + color: #fff +} + +#black hr { + color: #232323; + background: #232323 +} + +#black input[type=checkbox]+label:not(.ignr) { + color: #b4b4b4 +} + +#black input[type=checkbox]:checked+label:not(.ignr) { + color: #fff +} + +#black input[type=radio]+label:not(.ignr) { + color: #b4b4b4 +} + +#black input[type=radio]:checked+label:not(.ignr) { + color: #fff +} + +#black u { + border-bottom: 1px dotted #fff +} + +#tlarger { + font-size: 20px; + background-color: #f9fafb +} + +#tlarger .prmbtn { + font-size: 20px; + background: #f9fafb +} + +#tlarger table { + border-spacing: 2px +} + +#tlarger td { + font-size: 20px; + overflow: hidden; + white-space: nowrap +} + +#tlarger input[class='lgr'] { + -webkit-transform: scale(1.7); + transform: scale(1.7) +} + +#tlarger input[type=checkbox] { + width: 22px; + height: 20px +} + +#tlarger input[type=radio] { + width: 22px; + height: 20px +} + +#droid { + width: 100%; + font-size: 22px; + margin: 7px auto +} + +#droid .prmbtn { + font-size: 22px +} + +#droid table { + border-spacing: 5px +} + +#droid td { + font-size: 22px; + overflow: hidden; + white-space: nowrap; + max-width: device-width +} + +#droid input[type=checkbox] { + width: 34px; + height: 22px; + -webkit-transform: scale(1.5); + transform: scale(1.5) +} + +#droid input[type=radio] { + width: 34px; + height: 20px; + -webkit-transform: scale(1.4); + transform: scale(1.4) +} + +#droid input[id=tglckAll] { + float: left; + margin: 5px 6px +} + +#droid button[id=apply] { + margin: 0 auto +} + +#broid .minortxt { + color: #b4b4b4 +} + +#broid { + width: 100%; + font-size: 22px; + margin: 7px auto; + background-color: #323234; + color: #fff +} + +#broid .prmbtn { + font-size: 22px; + background: #323234; + color: #fff +} + +#broid hr { + color: #232323; + background: #232323 +} + +#broid table { + border-spacing: 5px +} + +#broid td { + font-size: 22px; + overflow: hidden; + white-space: nowrap; + max-width: device-width +} + +#broid input[type=checkbox]+label:not(.ignr) { + color: #b4b4b4 +} + +#broid input[type=checkbox]:checked+label:not(.ignr) { + color: #fff +} + +#broid input[type=radio]+label:not(.ignr) { + color: #b4b4b4 +} + +#broid input[type=radio]:checked+label:not(.ignr) { + color: #fff +} + +#broid input[type=checkbox] { + width: 34px; + height: 22px; + -webkit-transform: scale(1.5); + transform: scale(1.5) +} + +#broid input[type=radio] { + width: 34px; + height: 20px; + -webkit-transform: scale(1.4); + transform: scale(1.4) +} + +#broid input[id=tglckAll] { + float: left; + margin: 5px 6px +} + +#broid button[id=apply] { + margin: 0 auto +} + +#broid u { + border-bottom: 1px dotted #fff +}
\ No newline at end of file diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/style_tgl.css b/data/extensions/tprb.addon@searxes.danwin1210.me/style_tgl.css new file mode 100644 index 0000000..058e035 --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/style_tgl.css @@ -0,0 +1,103 @@ +.switch-1 { + width: 18px +} + +.switch-3 { + width: 63px +} + +.switch-toggle { + height: 18px; + position: relative; + display: inline; + padding: 0!important; + cursor: normal; + -moz-user-select: none +} + +.switch-toggle *, +.switch-toggle *:before, +.switch-toggle *:after { + box-sizing: border-box +} + +.switch-toggle input { + position: absolute; + left: 0; + opacity: 0 +} + +.switch-toggle input+label { + position: relative; + z-index: 2; + display: inline; + margin: 0 +} + +.switch-toggle a { + display: inline; + transition: all .1s ease-out; + position: absolute; + top: 0; + left: 0; + padding: 0; + z-index: 1; + width: 10px; + height: 100% +} + +.switch-toggle.switch-1 label:nth-child(2), +.switch-toggle.switch-1 label:nth-child(2)~a { + width: 100% +} + +.switch-toggle.switch-3 label, +.switch-toggle.switch-3 a { + width: 33.33% +} + +.switch-toggle.switch-3 label~input:checked:nth-child(3)+label~a { + left: 33.33% +} + +.switch-toggle.switch-3 label~input:checked:nth-child(5)+label~a { + left: 66.66% +} + +.switch-toggle.switch-candy { + background-color: transparent; + border-radius: 3px; + box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.2) +} + +.switch-toggle.switch-candy.switch-1 label { + color: transparent; + font-size: 16px; + text-shadow: 1px 1px 1px transparent +} + +.switch-toggle.switch-candy.switch-3 label { + color: transparent; + font-size: 17px; + text-shadow: 1px 1px 1px transparent +} + +.switch-candy a { + border: 1px solid #333; + border-radius: 3px; + background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), transparent) +} + +.switch-toggle.switch-1 input:nth-child(1):not(:checked)~a, +.switch-toggle.switch-3 input:nth-child(1):checked~a { + background-color: #ff6347 +} + +.switch-toggle.switch-3 input:nth-child(3):checked~a { + background-color: #f3f338 +} + +.switch-toggle.switch-1 input:nth-child(1):checked~a, +.switch-toggle.switch-3 input:nth-child(5):checked~a { + background-color: #98fb98 +}
\ No newline at end of file diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/tprb_cfg.html b/data/extensions/tprb.addon@searxes.danwin1210.me/tprb_cfg.html new file mode 100644 index 0000000..1ae8464 --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/tprb_cfg.html @@ -0,0 +1,426 @@ +<html> + <head> + <meta charset="utf-8"> + <title>TPRB:[Config]</title> + <meta name="viewport" content="width=device-width,initial-scale=1"> + <link rel="stylesheet" href="style.css"> + </head> + <body id="cfg" style="display:none"> + <form autocomplete="off"> + <div id="open_init" style="display:none">⇨ <button type="button" id="opendroid"> ⚙ </button> ⇦</div> + <div id="reset_page" style="display:none"> + <br> + <div align="center"> + <table border="0" cellspacing="2" cellpadding="2"> + <tr> + <td><label><input type="checkbox" id="aon_dnt_rst_wlst" checked> <span data-what="aon_resettxt_1"></span></label></td> + </tr> + </table> + </div> + <br> + <div align="center"><button type="button" id="aonbtn_bset0">⎋ <span data-what="cancelnow"></span></button> <button type="button" id="aonbtn_bset1">➤ <span data-what="aon_resetme"></span></button></div> + </div> + <div id="mainmenu" style="display:none"> + <div id="xmenus"><button type="button" id="chgsubmenu_1" class="iglassCFG" disabled>[<span data-what="sub_txt_1"></span>]</button><button type="button" id="chgsubmenu_8" class="iglassCFG">[<span data-what="sub_txt_8"></span>]</button><button type="button" id="chgsubmenu_2" class="iglassCFG">[<span data-what="sub_txt_2"></span>]</button><button type="button" id="chgsubmenu_7" class="iglassCFG">[<span data-what="sub_txt_7"></span>]</button><button type="button" id="chgsubmenu_6" class="iglassCFG">[<span data-what="sub_txt_6"></span>]</button><button type="button" id="chgsubmenu_3" class="iglassCFG">[<span data-what="sub_txt_3"></span>]</button><button type="button" id="chgsubmenu_9" class="iglassCFG">[<span data-what="sub_txt_9"></span>]</button><button type="button" id="chgsubmenu_4" class="iglassCFG">[<span data-what="sub_txt_4"></span>]</button><button type="button" id="chgsubmenu_5" class="iglassCFG">[<span data-what="sub_txt_5"></span>]</button></div> + <hr> + <br> + <div id="sub_menu1"> + <label><input type="checkbox" id="myset_rqblsettemp"> <span data-what="advanced_settemp"></span></label><br> + <label><input type="checkbox" id="myset_rqblfmtdsturl"> <span data-what="advanced_fmtsrcurl"></span></label><span data-pconly> <small>(ℹ <a href="%NFOBASE%tprb_dsturl.txt" target="_blank"><span data-what="moreinfo"></span></a>)</small></span><br> + <label><input type="checkbox" id="myset_rqblfmtdstrxp"> <span data-what="advanced_fmtsrcrxp"></span></label><span data-pconly> <small>(ℹ <a href="%NFOBASE%tprb_dstrxp.txt" target="_blank"><span data-what="moreinfo"></span></a>)</small></span><br> + <br> + <span data-what="adv_alwaysokay"></span>:<br> + <label><input type="checkbox" id="myset_rqblcsslover"> <span data-what="advanced_css"></span></label><br> + <label><input type="checkbox" id="myset_rqblaok_ytb"> <span data-what="advanced_aok_ytb"></span></label><br> + <label><input type="checkbox" id="myset_rqblsubdomok"> <span data-what="advanced_subdom"></span></label><br> + <label><input type="checkbox" id="myset_rqblallok_wuz"> <span data-what="advanced_aok_wuz"></span></label> <small>(<i><u>assets</u>.example.com</i>)</small><br> + <label><input type="checkbox" id="myset_rqblaok_cdnf"> <span data-what="advanced_aok_cdnf"></span></label> <small>(<i>ajax.googleapis.com</i>)</small><br> + <label><input type="checkbox" id="myset_rqblaok_cdnd"> <span data-what="advanced_aok_cdnd"></span></label> <small>(<i>custom.<u>cloudfront.net</u></i>)</small><br> + <br> + <span data-what="yourwhitelist_format"></span><span data-pconly> <small>(ℹ <a href="%NFOBASE%tprb_wlst.txt" target="_blank"><span data-what="moreinfo"></span></a>)</small></span><br> + <small><span data-what="yourwhitelist_format2"></span></small><br> + <small><span data-what="yourwhitelist_format3"></span></small><br> + <span id="showdsturlfmt" style="display:none"><small><span data-what="yourwhitelist_format4"></span></small><br></span> + <span id="showdstrxpfmt" style="display:none"><small><span data-what="yourwhitelist_format5"></span></small><br></span> + <textarea cols="50" rows="20" id="myset_rqblwhitelist" wrap="off"></textarea> + <br><br> + <button type="button" id="udsd_menu_1">↕ <span data-what="udsd_impexpupldwn"></span></button> + <span id="udsd_menu_1_real" style="display:none"> + <span data-what="whiteimpexp"></span>:<br> + <table border="0" cellspacing="2" cellpadding="2"> + <tr> + <td> </td> + <td align="center" valign="middle"><span data-what="whiteimpexp_impt"></span></td> + <td> </td> + <td><input type="file" id="myset_importtxt_wl"><br><small><span data-what="whiteimpexp_impttip"></span></small><br><label><input type="checkbox" id="importMerge_wl"> <span data-what="whiteimpexp_impt2"></span></label></td> + </tr> + <tr> + <td> </td> + <td align="center" valign="middle"><span data-what="whiteimpexp_expt"></span></td> + <td> </td> + <td><button type="button" id="myset_exporttxt_wl">✂ <span data-what="whiteimpexp_expt"></span></button></td> + </tr> + </table> + <br> + <span data-what="listsync"></span>:<span data-pconly> <small>(ℹ <a href="%NFOBASE%tprb_udf.txt" target="_blank"><span data-what="moreinfo"></span></a>)</small></span><br> + <table border="0" cellspacing="2" cellpadding="2"> + <tr> + <td align="center" valign="middle">API URL</td> + <td valign="middle"><input type="text" id="listsync_apiurl" size="40" value=""></td> + </tr> + <tr> + <td align="center" valign="middle"><span data-what="listsync_transid"></span></td> + <td valign="middle"><input type="text" id="listsync_transid" size="22" maxlength="19" value=""></td> + </tr> + <tr> + <td align="center" valign="middle"><span data-what="listsync_sysmsg"></span></td> + <td valign="middle"><input type="text" id="listsync_sysmsg" size="40" class="iglass" style="pointer-events:none" readonly></td> + </tr> + </table> + <br> + <table border="0" cellspacing="2" cellpadding="2"> + <tr> + <td><button type="button" id="listsync_btnup">↑ <span data-what="listsync_upload"></span></button></td> + <td><button type="button" id="listsync_btnds">↺ <span data-what="listsync_destroy"></span></button></td> + </tr> + <tr> + <td><button type="button" id="listsync_btndlo">↓ <span data-what="listsync_downloado"></span></button></td> + <td><button type="button" id="listsync_btndlm">↓ <span data-what="listsync_downloadm"></span></button></td> + </tr> + </table> + <small><span data-what="whiteimpexp_impttip"></span></small> + </span> + </div> + <div id="sub_menu8" style="display:none"> + <label><input type="checkbox" id="myset_rqbl_bldstrxp"> <span data-what="advanced_fmtsrcrxp2"></span></label><span data-pconly> <small>(ℹ <a href="%NFOBASE%tprb_dstrxp2.txt" target="_blank"><span data-what="moreinfo"></span></a>)</small></span><br> + <br> + <span data-what="adv_igwblthem"></span>:<br> + <label><input type="checkbox" id="myset_rqblnopuny"> <span data-what="adv_igwblthem_puny"></span></label><br> + <br> + <span data-what="yourblacklist_format"></span><br> + <small><span data-what="yourblacklist_format2"></span></small><br> + <span id="showbdrxpfmt" style="display:none"><small><span data-what="yourblacklist_format3"></span></small><br></span> + <textarea cols="50" rows="20" id="myset_rqblblacklist" wrap="off"></textarea> + <br><br> + <button type="button" id="udsd_menu_8">↕ <span data-what="udsd_impexp"></span></button> + <span id="udsd_menu_8_real" style="display:none"> + <span data-what="whiteimpexp3"></span>:<br> + <table border="0" cellspacing="2" cellpadding="2"> + <tr> + <td> </td> + <td align="center" valign="middle"><span data-what="whiteimpexp_impt"></span></td> + <td> </td> + <td><input type="file" id="myset_importtxt_bl"><br><small><span data-what="whiteimpexp_impttip"></span></small><br><label><input type="checkbox" id="importMerge_bl"> <span data-what="whiteimpexp_impt2"></span></label></td> + </tr> + <tr> + <td> </td> + <td align="center" valign="middle"><span data-what="whiteimpexp_expt"></span></td> + <td> </td> + <td><button type="button" id="myset_exporttxt_bl">✂ <span data-what="whiteimpexp_expt"></span></button></td> + </tr> + </table> + </span> + </div> + <div id="sub_menu2" style="display:none"> + <label><input type="checkbox" id="myset_rqblcleardark"> <span data-what="advanced_separatecd"></span></label><br> + <br> + <span data-what="adv_igwblthem"></span>:<br> + <label><input type="checkbox" id="myset_rqblyestls"> <span data-what="adv_igwblthem_unenc"></span></label> <small>(<i>http:// ws://</i>)</small><br> + <label><input type="checkbox" id="myset_rqbljustgp"> <span data-what="adv_igwblthem_abnrml"></span></label> <small>(<i><span data-what="adv_igwblthem_abnrml2"></span></i>)</small><br> + <label><input type="checkbox" id="myset_rqblbyesok"> <span data-what="adv_igwblthem_wsoks"></span></label> <small>(<i><span data-what="adv_igwblthem_wsoks2"></span></i>)</small><br> + <br> + <span data-what="adv_igwblrest"></span>:<br> + <label><input type="checkbox" id="myset_rqblblockfnt"> <span data-what="adv_igwblrest_fnt"></span></label><br> + <label><input type="checkbox" id="myset_rqblblockobj"> <span data-what="adv_igwblrest_obj"></span></label><br> + <label><input type="checkbox" id="myset_rqblblockmid"> <span data-what="adv_igwblrest_med"></span></label> <small>(<i><span data-what="adv_igwblrest_med2"></span></i>)</small><br> + <label><input type="checkbox" id="myset_rqblblockimg"> <span data-what="adv_igwblrest_img"></span></label><br> + <br> + <span data-what="adv_igwblmime"></span>:<br> + <label><input type="checkbox" id="myset_rqblmimeav"> <span data-what="adv_igwblmime_av"></span></label> <small>(<i>video/* audio/*</i>)</small><br> + <label><input type="checkbox" id="myset_rqblmimepdf"> <span data-what="adv_igwblmime_pdf"></span></label> <small>(<i>application/pdf</i>)</small><br> + <label><input type="checkbox" id="myset_rqblmimexls"> <span data-what="adv_igwblmime_off"></span></label> <small>(<i><span data-what="adv_igwblmime_off2"></span></i>)</small><br> + <br> + <span data-what="adv_blkhidedst"></span>:<br> + <label><input type="checkbox" id="myset_rqblusemybl"> <span data-what="adv_blkhidedst_knwn"></span></label> <small>(<i><span data-what="adv_blkhidedst_knwn2"></span></i>)</small><br> + <label><input type="checkbox" id="myset_rqblbyesocial"> <span data-what="adv_blkhidedst_socl"></span></label> <small>(<i><span data-what="adv_blkhidedst_socl2"></span></i>)</small><br> + </div> + <div id="sub_menu7" style="display:none"> + <span data-what="adv_contentfilter"></span>:<br> + <label><input type="checkbox" id="myset_rqbldieframe"> <span data-what="advanced_noiframe"></span></label><br> + <label><input type="checkbox" id="myset_rqblcftagcanvas"> <span data-what="advanced_nocanvas"></span></label><br> + <label><input type="checkbox" id="myset_rqbl_csmadqs"> <span data-what="advanced_csmyaqs"></span></label><span data-pconly> <small>(ℹ <a href="%NFOBASE%tprb_cssqsl.txt" target="_blank"><span data-what="moreinfo"></span></a>)</small></span><br> + <span id="showusrcssqslr" style="display:none"><br><small><span data-what="advanced_csmyaqs2"></span></small><br><textarea cols="50" rows="12" id="myset_rqblcqsrlist" wrap="off"></textarea><br></span> + <br> + <span data-what="adv_dearevilpage"></span>:<br> + <label><input type="checkbox" id="myset_rqbl_ah_rclk"> <span data-what="acf_ah_rclk"></span></label><br> + <label><input type="checkbox" id="myset_rqbl_ah_keys"> <span data-what="acf_ah_keys"></span></label><br> + <label><input type="checkbox" id="myset_rqbl_ah_scrl"> <span data-what="acf_ah_scrl"></span></label><br> + <label><input type="checkbox" id="myset_rqbl_ah_mmove"> <span data-what="acf_ah_mmove"></span></label><br> + <label><input type="checkbox" id="myset_rqbl_ah_touch"> <span data-what="acf_ah_touch"></span></label><br> + <label><input type="checkbox" id="myset_rqbl_ah_0wchr"> <span data-what="acf_ah_zerowc"></span></label><span data-pconly> <small>(ℹ <a href="https://medium.com/@umpox/be-careful-what-you-copy-invisibly-inserting-usernames-into-text-with-zero-width-characters-18b4e6f17b66" target="_blank"><span data-what="moreinfo"></span></a>)</small></span><br> + <br> + <span data-what="adv_dnrcfonpage"></span><br><small><span data-what="fqdnordomain"></span></small><br> + <textarea cols="50" rows="12" id="myset_rqblcftrwhite" wrap="off"></textarea> + <br><br> + <button type="button" id="udsd_menu_7">↕ <span data-what="udsd_impexp"></span></button> + <span id="udsd_menu_7_real" style="display:none"> + <span data-what="whiteimpexp4"></span>:<br> + <table border="0" cellspacing="2" cellpadding="2"> + <tr> + <td> </td> + <td align="center" valign="middle"><span data-what="whiteimpexp_impt"></span></td> + <td> </td> + <td><input type="file" id="myset_importtxt_cf"><br><small><span data-what="whiteimpexp_impttip"></span></small><br><label><input type="checkbox" id="importMerge_cf"> <span data-what="whiteimpexp_impt2"></span></label></td> + </tr> + <tr> + <td> </td> + <td align="center" valign="middle"><span data-what="whiteimpexp_expt"></span></td> + <td> </td> + <td><button type="button" id="myset_exporttxt_cf">✂ <span data-what="whiteimpexp_expt"></span></button></td> + </tr> + </table> + </span> + </div> + <div id="sub_menu6" style="display:none"> + <label><input type="checkbox" id="myset_rqblrdr_clnsrch"> <span data-what="redr_cleansrch"></span></label> <small>(<i>blog?<u>utm_source=feed</u>&... → blog</i>)</small><br> + <label><input type="checkbox" id="myset_rqblrdr_justhtps"> <span data-what="redr_justhtps"></span></label> <small>(<i><span data-what="redr_justhtps2"></span></i>)</small><br> + <br> + <span data-what="misc_autoredir_what"></span>:<br> + <label><input type="radio" id="myset_rqblaured_0" name="surs"> <span data-what="misc_autoredir_lv0"></span></label><br> + <label><input type="radio" id="myset_rqblaured_1" name="surs"> <span data-what="misc_autoredir_lv1"></span></label><span data-pconly> <small>(ℹ <a href="%NFOBASE%tprb_redirwatch.html" target="_blank"><span data-what="moreinfo"></span></a>)</small></span><br> + <label><input type="radio" id="myset_rqblaured_2" name="surs"> <span data-what="misc_autoredir_lv2"></span></label><br> + <label><input type="checkbox" id="myset_rqblardr_usealrt"> <span data-what="misc_autoredir_ualert"></span></label><br> + <br> + <span data-what="misc_autoredir_ignr"></span>:<br> + <label><input type="radio" id="myset_rqblrdrign_0" name="ardir"> <span data-what="misc_autoredir_lv0"></span></label><br> + <label><input type="radio" id="myset_rqblrdrign_3" name="ardir"> <span data-what="advanced_rdirno_3"></span></label> <small>(<i><u>mozilla.org</u>/about.html → <u>discord.mozilla.org</u>/login</i>)</small><br> + <label><input type="radio" id="myset_rqblrdrign_4" name="ardir"> <span data-what="advanced_rdirno_4"></span></label> <small>(<i>www.<u>nsakey</u>.com/ → www.<u>nsakey</u>.co.uk/</i>)</small><br> + <br> + <span data-what="redr_nomitm"></span>:<span data-pconly> <small>(ℹ <a href="https://trac.torproject.org/projects/tor/ticket/24351" target="_blank"><span data-what="moreinfo"></span></a>)</small></span><br> + <label><input type="radio" name="fmit" id="myset_rqblrdr_mitm_0"> <span data-what="redr_nomitm_lv0"></span></label><br> + <label><input type="radio" name="fmit" id="myset_rqblrdr_mitm_1"> <span data-what="redr_nomitm_lv1"></span></label><br> + <label><input type="radio" name="fmit" id="myset_rqblrdr_mitm_2"> <span data-what="redr_nomitm_lv2"></span> <small>*</small></label><br> + <label><input type="checkbox" id="myset_rqblrdr_mitm_t2oi"><small>*</small> <span data-what="redr_nomitm_lv2if"></span></label> <small>(<i>HTTP 403 Forbidden</i>)</small><br> + <label><input type="checkbox" id="myset_rqbl_mitmxmark"><small>*</small> <span data-what="redr_mitmmark"></span></label><br> + <br> + <span data-what="redr_nomitm_also"></span>:<br> + <label><input type="checkbox" id="myset_rqblrdr_mitm_inc"> Incapsula MITM</label><br> + <label><input type="checkbox" id="myset_rqblrdr_mitm_ggl"> Google Project Shield MITM</label><br> + <label><input type="checkbox" id="myset_rqblrdr_mitm_scu"> Sucuri MITM</label><br> + <br> + <span data-what="redr_nomitm_giveup"></span><br> + <small><span data-what="fqdnordomain"></span></small><br> + <textarea cols="50" rows="12" id="myset_rqblmitmoklist" wrap="off"></textarea> + <br><br> + <button type="button" id="udsd_menu_6">↕ <span data-what="udsd_impexp"></span></button> + <span id="udsd_menu_6_real" style="display:none"> + <span data-what="whiteimpexp5b"></span>:<br> + <table border="0" cellspacing="2" cellpadding="2"> + <tr> + <td> </td> + <td align="center" valign="middle"><span data-what="whiteimpexp_impt"></span></td> + <td> </td> + <td><input type="file" id="myset_importtxt_rr"><br><small><span data-what="whiteimpexp_impttip"></span></small><br><label><input type="checkbox" id="importMerge_rr"> <span data-what="whiteimpexp_impt2"></span></label></td> + </tr> + <tr> + <td> </td> + <td align="center" valign="middle"><span data-what="whiteimpexp_expt"></span></td> + <td> </td> + <td><button type="button" id="myset_exporttxt_rr">✂ <span data-what="whiteimpexp_expt"></span></button></td> + </tr> + </table> + <br> + <span data-what="whiteimpexp5"></span>:<br> + <table border="0" cellspacing="2" cellpadding="2"> + <tr> + <td> </td> + <td align="center" valign="middle"><span data-what="whiteimpexp_impt"></span></td> + <td> </td> + <td><input type="file" id="myset_importtxt_mm"><br><small><span data-what="whiteimpexp_impttip"></span></small><br><label><input type="checkbox" id="importMerge_mm"> <span data-what="whiteimpexp_impt2"></span></label></td> + </tr> + <tr> + <td> </td> + <td align="center" valign="middle"><span data-what="whiteimpexp_expt"></span></td> + <td> </td> + <td><button type="button" id="myset_exporttxt_mm">✂ <span data-what="whiteimpexp_expt"></span></button></td> + </tr> + </table> + </span> + </div> + <div id="sub_menu3" style="display:none"> + <label><input type="checkbox" id="myset_rqblnoscript"> <span data-what="advanced_letsblkjs"></span></label><br> + <label><input type="checkbox" id="myset_rqblxssblock"> <span data-what="advanced_jsxss"></span></label><br> + <label><input type="checkbox" id="myset_rqblnoworker"> <span data-what="advanced_noworker"></span></label><br> + <label><input type="checkbox" id="myset_rqblluvinline"> <span data-what="advanced_jsinline"></span></label><br> + <br> + <span data-what="adv_noscrtag"></span>:<br> + <label><input type="radio" id="myset_rqblnstag_0" name="slnoscr"> <span data-what="misc_autoredir_lv0"></span></label><br> + <label><input type="radio" id="myset_rqblnstag_1" name="slnoscr"> <span data-what="advanced_noscra_1"></span></label><br> + <label><input type="radio" id="myset_rqblnstag_2" name="slnoscr"> <span data-what="advanced_noscra_2"></span></label><br> + <br> + <span data-what="adv_alwaysokay"></span>:<br> + <label><input type="checkbox" id="myset_rqbljsak_wuz"> <span data-what="advanced_aok_wuz"></span></label> <small>(<i><u>js</u>.example.com</i>)</small> <small>*</small><br> + <label><input type="checkbox" id="myset_rqbljsak_cdnf"> <span data-what="advanced_aok_cdnf"></span></label> <small>(<i>ajax.googleapis.com</i>)</small> <small>*</small><br> + <label><input type="checkbox" id="myset_rqbljsak_cdnd"> <span data-what="advanced_aok_cdnd"></span></label> <small>(<i>custom.<u>cloudfront.net</u></i>)</small> <small>*</small><br> + <label><input type="checkbox" id="myset_rqbljsakreqhs"><small>*</small> <span data-what="advanced_aok_htps"></span></label><br> + <br> + <span data-what="advanced_letsblkjs2"></span><br><small><span data-what="advanced_letsblkjs3"></span></small><br> + <textarea cols="50" rows="12" id="myset_rqbljsoklist" wrap="off"></textarea> + <br><br> + <button type="button" id="udsd_menu_2">↕ <span data-what="udsd_impexp"></span></button> + <span id="udsd_menu_2_real" style="display:none"> + <span data-what="whiteimpexp2"></span>:<br> + <table border="0" cellspacing="2" cellpadding="2"> + <tr> + <td> </td> + <td align="center" valign="middle"><span data-what="whiteimpexp_impt"></span></td> + <td> </td> + <td><input type="file" id="myset_importtxt_js"><br><small><span data-what="whiteimpexp_impttip"></span></small><br><label><input type="checkbox" id="importMerge_js"> <span data-what="whiteimpexp_impt2"></span></label></td> + </tr> + <tr> + <td> </td> + <td align="center" valign="middle"><span data-what="whiteimpexp_expt"></span></td> + <td> </td> + <td><button type="button" id="myset_exporttxt_js">✂ <span data-what="whiteimpexp_expt"></span></button></td> + </tr> + </table> + </span> + </div> + <div id="sub_menu9" style="display:none"> + <label><input type="checkbox" id="myset_rqblsmartref"> <span data-what="advanced_smartref"></span></label><br> + <label><input type="checkbox" id="myset_rqblmyrecset"> <span data-what="advanced_myrecset"></span></label><span data-pconly> <small>(ℹ <a href="%NFOBASE%tprb_setprivacy.txt" target="_blank"><span data-what="moreinfo"></span></a>)</small></span><br> + <label><input type="checkbox" id="myset_rqblnonotifypop"> <span data-what="advanced_nonotifypop"></span></label><br> + <br> + <span data-what="dropheader"></span>:<br> + <label><input type="checkbox" id="myset_rqbl_ignh_altsvc"> <span data-what="adv_dropheader0"></span></label><br> + <label><input type="checkbox" id="myset_rqbl_ignh_etag"> <span data-what="adv_dropheader3"></span></label><span data-pconly> <small>(ℹ <a href="https://en.wikipedia.org/wiki/HTTP_ETag#Tracking_using_ETags" target="_blank"><span data-what="moreinfo"></span></a>)</small></span><br> + <label><input type="checkbox" id="myset_rqbl_ignh_expct"> <span data-what="adv_dropheader1"></span></label><br> + <label><input type="checkbox" id="myset_rqbl_ignh_xdnspf"> <span data-what="adv_dropheader2"></span></label><br> + <br> + <span data-what="nodownloadok"></span>:<br> + <label><input type="radio" id="myset_rqblnodlact_0" name="nodownok"> <span data-what="misc_autoredir_lv0"></span></label><br> + <label><input type="radio" id="myset_rqblnodlact_1" name="nodownok"> <span data-what="advanced_nodownk_1"></span></label><br> + <label><input type="radio" id="myset_rqblnodlact_2" name="nodownok"> <span data-what="advanced_nodownk_2"></span></label><br> + <br> + <span data-what="antiannoyance"></span>:<br> + <label><input type="checkbox" id="myset_rqblnogifani"> <span data-what="advanced_nogifani"></span></label><br> + <label><input type="checkbox" id="myset_rqbl_ntb_mute"> <span data-what="advanced_notabsound"></span></label><br> + <br> + <span data-what="autocleaner"></span>:<br> + <label><input type="checkbox" id="myset_rqblclnw_ckie"> <span data-what="autocln_ct_cookies"></span></label><br> + <label><input type="checkbox" id="myset_rqblclnw_stor"> <span data-what="autocln_ct_storage"></span></label><br> + <label><input type="checkbox" id="myset_rqblclnw_cace"> <span data-what="autocln_ct_cache"></span></label><br> + <span data-pconly><label><input type="checkbox" id="myset_rqblclnw_fdta"> <span data-what="autocln_ct_fdata"></span></label><br></span> + <span data-pconly><label><input type="checkbox" id="myset_rqblclnw_hist"> <span data-what="autocln_ct_history"></span></label><br></span> + <label><input type="checkbox" id="myset_rqblclnw_dwnl"> <span data-what="autocln_ct_downs"></span></label><br> + <span data-pconly><label><input type="checkbox" id="myset_rqblclnw_plug"> <span data-what="autocln_ct_plugin"></span></label><br></span> + <br><br> + 𝑥 = <input type="text" id="myset_autocln_vx" size="5" maxlength="3" value="" placeholder="5"><small>[tabs] (<i>5 ~ 999</i>)</small><br> + 𝑦 = <input type="text" id="myset_autocln_vy" size="5" maxlength="4" value="" placeholder="3"><small>[min.] (<i>3 ~ 1440</i>)</small> + </div> + <div id="sub_menu4" style="display:none"> + <span data-pconly> + <label><input type="checkbox" id="myset_rqbl_kbrd"> <span data-what="advanced_usekblnk"></span></label><br> + <span id="kbd_act" style="display:none"><br> + <span data-what="advanced_usekblnk2"></span>: <input type="text" id="myset_rqbl_kbrd_k" size="22" value=""> <small>[↺<u><span data-what="resetme" id="rstKBS"></span></u>]</small> <small>(ℹ <a href="%NFOBASE%tprb_kbsfmt.txt" target="_blank"><span data-what="moreinfo"></span></a>)</small><br> + <label><input type="radio" id="myset_rqbl_kbda_0" name="kbdactn"> <span data-what="advanced_usekblt0"></span></label><br> + <label><input type="radio" id="myset_rqbl_kbda_1" name="kbdactn"> <span data-what="advanced_usekblt1"></span></label><br> + <label><input type="radio" id="myset_rqbl_kbda_2" name="kbdactn"> <span data-what="advanced_usekblt2"></span></label><br> + </span><br></span> + <span data-what="adv_popmenu"></span>:<br> + <label><input type="checkbox" id="myset_rqblpopnarld"> <span data-what="adv_popmenu_narld"></span></label><br> + <span data-pconly><label><input type="checkbox" id="myset_rqblproicon"> <span data-what="adv_popmenu_uico"></span> <small>*</small></label><br></span> + <label><input type="checkbox" id="myset_rqblpmdotf"> <span data-what="adv_popmenu_dotf"></span></label><br> + <span data-pconly> + <label><input type="checkbox" id="myset_rqblpmoffon"> <span data-what="adv_popmenu_btoffon"></span></label><br> + <label><input type="checkbox" id="myset_rqblpmshowip"> <span data-what="adv_popmenu_showip"></span> <small>**</small></label><br> + <label><input type="checkbox" id="myset_rqblpmshowcc"> <span data-what="adv_popmenu_showcc"></span></label><span data-pconly> <small>(ℹ <a href="%NFOBASE%tprb_usegeoip.txt" target="_blank"><span data-what="moreinfo"></span></a>)</small></span><br> + <label><input type="checkbox" id="myset_rqblpmshowsubs"> <span data-what="adv_popmenu_showsubs"></span></label><br> + </span> + <label><input type="checkbox" id="myset_rqblpmjshps"> <span data-what="advanced_btjshttps"></span></label><span data-pconly> <small>(ℹ <a href="%NFOBASE%tprb_jshttps.txt" target="_blank"><span data-what="moreinfo"></span></a>)</small></span><br> + <span data-pconly> + <br> + <small>*</small> <span data-what="adv_popuis_ics"></span>:<br> + <label><input type="checkbox" id="myset_rqbluis_0"> <span data-what="adv_popuis_i0"></span></label>: <input type="text" id="myset_rqbluis_curl" size="30" value=""> <small>(ℹ <a href="%NFOBASE%tprb_uicurl.txt" target="_blank"><span data-what="moreinfo"></span></a>)</small><br> + <label><input type="checkbox" id="myset_rqbluis_1"> <span data-what="adv_popuis_i1"></span></label><br> + <label><input type="checkbox" id="myset_rqbluis_2"> <span data-what="adv_popuis_i2"></span></label><br> + <label><input type="checkbox" id="myset_rqbluis_3"> <span data-what="adv_popuis_i3"></span></label><br> + <label><input type="checkbox" id="myset_rqbluis_4"> <span data-what="adv_popuis_i4"></span></label><br> + <label><input type="checkbox" id="myset_rqbluis_5"> <span data-what="adv_popuis_i5"></span></label><br> + <label><input type="checkbox" id="myset_rqbluis_6"> <span data-what="adv_popuis_i6"></span></label><br> + <label><input type="checkbox" id="myset_rqbluis_7"> <span data-what="adv_popuis_i7"></span></label><br> + <br> + <small>**</small> <span data-what="adv_popuis_pxydns"></span>:<br> + <label><input type="radio" id="myset_rqblpxydns_0" name="pxdnsop"> <span data-what="misc_autoredir_lv0"></span></label><br> + <label><input type="radio" id="myset_rqblpxydns_1" name="pxdnsop"> <span data-what="adv_popuis_pxydns1"></span></label>: <input type="text" id="myset_rqbluis_curl3" size="30" value=""> <small>(ℹ <a href="%NFOBASE%tprb_dnsapi.txt" target="_blank"><span data-what="moreinfo"></span></a>)</small><br> + <br> + <span data-what="adv_poprclk"></span>:<br> + <label><input type="radio" id="myset_rqblpoprck_0" name="pprclk"> <span data-what="misc_autoredir_lv0"></span></label><br> + <label><input type="radio" id="myset_rqblpoprck_1" name="pprclk"> <span data-what="adv_poprclk_1"></span></label><br> + <label><input type="radio" id="myset_rqblpoprck_2" name="pprclk"> <span data-what="adv_poprclk_2"></span></label><br> + <br> + <span data-what="adv_poplblclk"></span>:<br> + <label><input type="radio" id="myset_rqblpoplbl_0" name="pprlbla"> <span data-what="misc_autoredir_lv0"></span></label><br> + <label><input type="radio" id="myset_rqblpoplbl_1" name="pprlbla"> <span data-what="adv_poplbla_1"></span></label><br> + <label><input type="radio" id="myset_rqblpoplbl_2" name="pprlbla"> <span data-what="adv_popuis_i0"></span></label>: <input type="text" id="myset_rqbluis_curl2" size="30" value=""> <small>(ℹ <a href="%NFOBASE%tprb_uicurl.txt" target="_blank"><span data-what="moreinfo"></span></a>)</small><br></span> + <br> + <span data-what="adv_prsrtr"></span>:<br> + <label><input type="radio" id="myset_rqblprsrt_0" name="poprsrtr"> <span data-what="adv_poprsrt_ck"></span></label><br> + <label><input type="radio" id="myset_rqblprsrt_1" name="poprsrtr"> <span data-what="adv_poprsrt_ckrr"></span></label><br> + <label><input type="radio" id="myset_rqblprsrt_2" name="poprsrtr"> <span data-what="adv_poprsrt_azck"></span></label><br> + <label><input type="radio" id="myset_rqblprsrt_3" name="poprsrtr"> <span data-what="adv_poprsrt_azckrr"></span></label><br> + <br> + <span data-what="adv_popstyle"></span>:<br> + <label><input type="radio" id="myset_rqblppsty_0" name="popstly"> <span data-what="adv_popsty_0"></span></label><br> + <span data-pconly> + <label><input type="radio" id="myset_rqblppsty_1" name="popstly"> <span data-what="adv_popsty_0a"></span></label><br> + <label><input type="radio" id="myset_rqblppsty_2" name="popstly"> Candy</label> <small>by IonuÈ› Colceriu</small><br> + </span> + <br> + <span data-what="adv_popcolor"></span>:<br> + <label><input type="radio" id="myset_rqblpclr_0" name="popclrs"> <span data-what="adv_ticotp_def"></span></label><br> + <label><input type="radio" id="myset_rqblpclr_1" name="popclrs"> <span data-what="adv_popclr_blk"></span></label> + <span data-pconly><br> + <label><input type="radio" id="myset_rqblpclr_5" name="popclrs"> <span data-what="adv_popclr_big"></span></label><br> + <br> + <span data-what="adv_ticotp"></span>:<br> + <label><input type="radio" id="myset_rqblico_0" name="icontype"> <span data-what="adv_ticotp_def"></span></label><br> + <label><input type="radio" id="myset_rqblico_1" name="icontype"> Type J</label><br> + <label><input type="radio" id="myset_rqblico_2" name="icontype"> Onebit I</label> <small>by Khodjaev Stanislav</small><br> + <br> + <span data-what="adv_tbbgclr"></span>:<br> + <label><input type="radio" id="myset_rqblbgc_0" name="badgeclr"> <span data-what="adv_ticotp_def"></span></label><br> + <label><input type="radio" id="myset_rqblbgc_1" name="badgeclr"> <span data-what="adv_tbbgclr_pik"></span></label>: <input type="color" id="myset_rqblbgc_picker" value="#ffffff"> + </span> + </div> + <div id="sub_menu5" style="display:none"> + <span data-what="adv_noprotect"></span>:<br> + <label><input type="checkbox" id="myset_rqblmixokay"> <span data-what="advanced_mixok"></span></label><br> + <label><input type="checkbox" id="myset_rqbll2iokay"> <span data-what="advanced_l2iok"></span></label><br> + <br> + <span data-pconly> + <span data-what="adv_geoip"></span>: <small>(ℹ <a href="%NFOBASE%tprb_usegeoip.txt" target="_blank"><span data-what="moreinfo"></span></a>)</small><br> + <table border="0" cellspacing="2" cellpadding="2"> + <tr> + <td> </td> + <td align="center" valign="middle"><span data-what="whiteimpexp_impt"></span></td> + <td> </td> + <td><input type="file" id="myset_import_geoip"><br><input type="text" id="geoip_info4" size="8" class="iglass" style="pointer-events:none" readonly></td> + </tr> + </table> + <button type="button" id="btnClrGeoD">☣ <span data-what="geo_clear"></span></button><br> + <br> + </span> + <br> + <button type="button" id="btnGoResetUI">☣ <span data-what="aon_reset"></span></button> + </div> + <br> + <hr> + <span id="aboutfxandr" style="display:none">⁉ <u><span data-what="info_fxandroid"></span></u><br><br></span> + <button type="submit" id="savenow" class="iglass"> [<u>➤ <span data-what="saveme"></span></u>] </button> <span id="cfgsaved" style="display:none"><b><span data-what="saveme2"></span></b></span> + <span id="aboutfxandr2" style="display:none"> <button type="button" id="droidcls" class="iglass"> [<u>× <span data-what="closeme"></span></u>] </button></span> + </div> + </form> + <script src="tprb_cfg.js"></script> + </body> +</html> diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/tprb_cfg.js b/data/extensions/tprb.addon@searxes.danwin1210.me/tprb_cfg.js new file mode 100644 index 0000000..f7589a8 --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/tprb_cfg.js @@ -0,0 +1,1928 @@ +var _docbase = 'https://searxes.danwin1210.me/collab/tprb0/getmemo.php?client=searxes-tprb&read=/'; +var tprq_i18n_cfg_en = { + "moreinfo": "More information", + "udsd_impexp": "Import/Export", + "udsd_impexpupldwn": "Import/Export/Upload/Download", + "aon_reset": "Factory defaults", + "aon_resettxt_1": "Don't reset my whitelist/blacklist", + "aon_resetme": "Reset addon", + "aon_tool": "Text Editor", + "cancelnow": "Cancel", + "saveme": "Save", + "saveme2": "Saved", + "closeme": "Close", + "showme": "Show", + "resetme": "Reset", + "sub_txt_1": "Whitelist", + "sub_txt_8": "Blacklist", + "sub_txt_2": "Filter", + "sub_txt_7": "Contents", + "sub_txt_6": "Redirect", + "sub_txt_3": "Script", + "sub_txt_9": "Browser", + "sub_txt_4": "Design", + "sub_txt_5": "Misc.", + "fqdnordomain": "FQDN or .DOMAIN", + "yourwhitelist_format": "format: source destination", + "yourwhitelist_format2": "source, destination -- FQDN, *, or .DOMAIN", + "yourwhitelist_format3": "valid: '* F', '* .D', 'F F', 'F *', 'F .D', '.D F', '.D *', '.D .D'", + "yourwhitelist_format4": "extra: '* U', 'F U', '.D U'", + "yourwhitelist_format5": "extra: '* R', 'F R', '.D R'", + "yourblacklist_format": "format: destination", + "yourblacklist_format2": "destination -- FQDN or .DOMAIN", + "yourblacklist_format3": "extra: RegExp", + "whiteimpexp": "Import/Export whitelist", + "whiteimpexp2": "Import/Export Javascript whitelist", + "whiteimpexp3": "Import/Export blacklist", + "whiteimpexp4": "Import/Export content filter whitelist", + "whiteimpexp5": "Import/Export MITM ignore list", + "whiteimpexp5b": "Import/Export custom redirection rule", + "whiteimpexp_impt": "Import", + "whiteimpexp_impttip": "(don't forget to click Save)", + "whiteimpexp_impt2": "Merge new data instead of replacing current list", + "whiteimpexp_expt": "Export", + "listsync": "Upload/Download whitelist", + "listsync_transid": "Transaction ID", + "listsync_sysmsg": "System Message", + "listsync_upload": "New Upload", + "listsync_downloado": "Download & Replace", + "listsync_downloadm": "Download & Merge", + "listsync_destroy": "Destroy Data", + "listsync_startup": "Ready.", + "listsync_m_noapi": "API URL is empty!", + "listsync_m_notid": "Transaction ID is empty!", + "listsync_m_notid2": "Transaction ID not found.", + "listsync_m_nosvresp": "Connection failed.", + "listsync_m_nowlst": "Your whitelist is empty.", + "listsync_m_dstrydone": "Data destroyed.", + "listsync_m_connecting": "Connecting. Please wait.", + "listsync_m_upldone": "Upload complete.", + "listsync_m_dwndone": "Download complete.", + "adv_alwaysokay": "Always allow", + "advanced_css": "Third-party CSS resource", + "advanced_subdom": "Same domain's subdomain", + "advanced_aok_wuz": "Widely used domain pattern", + "advanced_aok_cdnf": "Known CDN FQDN", + "advanced_aok_cdnd": "Known CDN domain", + "advanced_aok_ytb": "YouTube", + "advanced_aok_htps": "only if its protocol is https://", + "advanced_separatecd": "Forbid clearnet and .onion|.i2p to communicate with each other", + "adv_geoip": "Load GeoIP database", + "geo_clear": "Clear data", + "adv_noprotect": "Disable TPRB's protection", + "advanced_mixok": "Turn off strict mixed-content protection", + "advanced_l2iok": "Allow loading internet resource from file://", + "advanced_blkftp": "Block ftp:// protocol", + "advanced_csmyaqs": "Custom CSS selectors", + "advanced_csmyaqs2": "CSS selectors", + "adv_contentfilter": "Content filtering", + "advanced_noiframe": "Hide 'IFRAME' html tag", + "advanced_nocanvas": "Hide 'CANVAS' html tag", + "adv_dearevilpage": "Stop unethical websites from tracking your activity", + "acf_ah_rclk": "Right-click event", + "acf_ah_keys": "Keyboard event", + "acf_ah_scrl": "Mouse scroll event", + "acf_ah_mmove": "Mouse movement event", + "acf_ah_touch": "Touch movement event", + "acf_ah_zerowc": "Remove zero-width character", + "adv_dnrcfonpage": "Content filter whitelist", + "advanced_settemp": "Let user set temporary permissions", + "advanced_fmtsrcurl": "Enable 'source destination=URL' format", + "advanced_fmtsrcrxp": "Enable 'source destination=RegExp' format", + "advanced_fmtsrcrxp2": "Enable 'destination=RegExp' format", + "advanced_smartref": "Remove identifiable information from outgoing Referer header", + "advanced_myrecset": "Modify privacy-related settings", + "advanced_nonotifypop": "Disable notification and popup", + "dropheader": "Modify header received from server", + "adv_dropheader0": "Alt-Svc/Alternate-Protocol (Ignore value)", + "adv_dropheader1": "Expect-CT (Stop reporting)", + "adv_dropheader2": "X-DNS-Prefetch-Control (Turn off prefetch)", + "adv_dropheader3": "ETag (Ignore value)", + "nodownloadok": "Cancel a download automatically (prevent download)", + "advanced_nodownk_1": "Download from the internet", + "advanced_nodownk_2": "Any download (file:, blob:, etc)", + "antiannoyance": "Anti-annoyance", + "advanced_nogifani": "Play the animation only once", + "advanced_notabsound": "Mute all tabs by default", + "autocleaner": "When I close (x) tabs and (y) minutes passed since last time, clean them up", + "autocln_ct_cookies": "Cookies", + "autocln_ct_storage": "Local storage created by websites", + "autocln_ct_cache": "Browser's cache", + "autocln_ct_fdata": "Autofilling forms and saved password", + "autocln_ct_history": "Browsing history", + "autocln_ct_downs": "Download history", + "autocln_ct_plugin": "Data stored by browser plugins", + "advanced_usekblnk": "Enable keyboard shortcut", + "advanced_usekblnk2": "Change Shortcut key", + "advanced_usekblt0": "Open popup", + "advanced_usekblt1": "Add to Content filter whitelist", + "advanced_usekblt2": "Toggle ON|OFF", + "advanced_letsblkjs": "I want to block Javascript and set permissions", + "advanced_letsblkjs2": "Javascript Whitelist", + "advanced_letsblkjs3": "format: FQDN, .DOMAIN, !FQDN, !.DOMAIN", + "advanced_jsxss": "Block known XSS", + "advanced_noworker": "Block Web Worker", + "advanced_jsinline": "Always allow inline script", + "adv_noscrtag": "'NOSCRIPT' HTML tag", + "advanced_noscra_1": "Always hide them", + "advanced_noscra_2": "Show them if scripts are blocked", + "adv_igwblthem": "Ignore whitelist and block", + "adv_igwblthem_puny": "Punycode domain", + "adv_igwblthem_unenc": "Unencrypted requests", + "adv_igwblthem_abnrml": "Abnormal request method", + "adv_igwblthem_abnrml2": "allow only GET and POST", + "adv_igwblthem_wsoks": "WebSocket protocol", + "adv_igwblthem_wsoks2": "127.0.0.1 is whitelisted", + "adv_igwblrest": "Ignore whitelist and block resource type", + "adv_igwblrest_fnt": "beacon, csp_report, font, ping", + "adv_igwblrest_obj": "object, object_subrequest", + "adv_igwblrest_med": "media", + "adv_igwblrest_med2": "video, audio", + "adv_igwblrest_img": "image", + "adv_igwblmime": "Ignore whitelist and block MIME type to prevent downloading", + "adv_igwblmime_av": "video, audio", + "adv_igwblmime_pdf": "PDF", + "adv_igwblmime_off": "MS Office, LibreOffice", + "adv_igwblmime_off2": "application/msword, etc", + "adv_blkhidedst": "Block & Don't show these destinations in popup menu", + "adv_blkhidedst_knwn": "Known tracking/ads attempt", + "adv_blkhidedst_knwn2": "e.g. google-analytics.com", + "adv_blkhidedst_socl": "Known social media/comment", + "adv_blkhidedst_socl2": "e.g. Disqus comment system", + "adv_popmenu": "Popup menu", + "adv_popmenu_narld": "Apply: Don't reload webpage if rule is not changed", + "adv_popmenu_uico": "Show useful icons", + "adv_popmenu_dotf": "Show .DOMAIN", + "adv_popmenu_btoffon": "Show ON|OFF switch", + "advanced_btjshttps": "Javascript: Show 'HTTPS only' checkbox", + "adv_popmenu_showip": "Show IP address", + "adv_popmenu_showcc": "Show GeoIP Country", + "adv_popmenu_showsubs": "Show IP|Country for third-party request", + "adv_popuis_ics": "Useful icons (select up to 3 choices)", + "adv_popuis_i0": "Custom URL", + "adv_popuis_i1": "Robtex: Investigate domain", + "adv_popuis_i2": "Qualys: SSL Server Test", + "adv_popuis_i3": "Twitter: Share URL", + "adv_popuis_i4": "Google Translate: Translate URL", + "adv_popuis_i5": "Reddit: Share URL", + "adv_popuis_i6": "via.hypothes.is: Proxy", + "adv_popuis_i7": "Internet Archive: Cache", + "adv_popuis_pxydns": "If you're using a proxy", + "adv_popuis_pxydns1": "Use API to resolve FQDN", + "adv_poprclk": "Popup right-click action", + "adv_poprclk_1": "Toggle Select|Deselect All", + "adv_poprclk_2": "Apply rule", + "adv_poplblclk": "Popup FQDN area click action", + "adv_poplbla_1": "Show Domain data", + "adv_prsrtr": "Popup menu list", + "adv_poprsrt_ck": "Sort by checked/unchecked", + "adv_poprsrt_ckrr": "Sort by unchecked/checked", + "adv_poprsrt_azck": "Sort alphabetically + checked/unchecked", + "adv_poprsrt_azckrr": "Sort alphabetically + unchecked/checked", + "adv_popstyle": "Popup menu style", + "adv_popsty_0": "Classic", + "adv_popsty_0a": "Classic (larger radio/checkbox)", + "adv_popcolor": "Popup menu theme", + "adv_popclr_blk": "Black", + "adv_popclr_big": "Larger", + "adv_ticotp": "Toolbar icon type", + "adv_ticotp_def": "Default", + "adv_tbbgclr": "Badge background color", + "adv_tbbgclr_pik": "Use this color", + "redr_cleansrch": "Remove unnecessary data from query string", + "redr_justhtps": "Redirect http|ws to https|wss", + "redr_justhtps2": "Ignore Filter - Unencrypted requests", + "redr_mitmmark": "Change MITMed website's title, favicon, and website border", + "misc_autoredir_what": "Stop automatic redirection and warn me", + "misc_autoredir_lv0": "Do nothing", + "misc_autoredir_lv1": "Known URL shortening services", + "misc_autoredir_lv2": "All automatic redirection", + "misc_autoredir_ignr": "Ignore redirection", + "advanced_rdirno_3": "Same domain redirection", + "advanced_rdirno_4": "'Domain name without TLD' is same", + "misc_autoredir_ualert": "Show confirm dialog box instead of webpage", + "redr_nomitm": "Resist Cloudflare PRISM 2.0", + "redr_nomitm_lv0": "Submit yourself to Cloudflare.", + "redr_nomitm_lv1": "Block request immediately.", + "redr_nomitm_lv2": "Redirect request to Internet Archive.", + "redr_nomitm_lv2if": "Only when status 403 is returned", + "redr_nomitm_also": "Also resist", + "redr_nomitm_giveup": "MITM ignore list", + "info_fxandroid": "Some settings are hidden because you're using Android." +}; +var mylangobj, tmp_ourl; +var _IsDroid = false; +var v_ls = location.search; + +function onError(e) { + console.log(`TPRB_CFG: Error:${e}`); +} + +function b64du(str) { + return decodeURIComponent(Array.prototype.map.call(atob(str), function (c) { + return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2); + }).join('')); +} + +function b64eu(str) { + return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p1) { + return String.fromCharCode(parseInt(p1, 16)) + })); +} + +function text2array(w) { + var wr = {}; + var wx = w.split("\n"); + var wxy, wxy_a, wxy_b; + for (var y = 0; y < wx.length; y++) { + wxy = wx[y].split(' '); + if (wxy.length == 2) { + wxy_a = wxy[0]; + wxy_b = wxy[1]; + if (wr[wxy_a] == undefined) { + wr[wxy_a] = []; + }; + if (!wr[wxy_a].includes(wxy_b)) { + wr[wxy_a].push(wxy_b); + } + } + }; + return wr; +} + +function get_clntxt(w) { + return (w.slice().sort(function (a, b) { + return a > b + }).reduce(function (a, b) { + if (a.slice(-1)[0] !== b) { + a.push(b); + }; + return a; + }, [])).filter(v => v != '').join("\n"); +} + +function getihash(w) { + var hash = 0; + for (var i = 0; i < w.length; i++) { + hash = ((hash << 5) - hash) + w.charCodeAt(i); + hash |= 0; + }; + if (hash < 0) { + hash += 4294967296; + }; + return hash; +} + +function config_save(e) { + e.preventDefault(); + document.getElementById('savenow').disabled = true; + var tmp_lstd, rqi, _tryrgx; + tmp_lstd = document.getElementById('myset_rqblwhitelist').value.split("\n"); + for (var i = 0; i < tmp_lstd.length; i++) { + rqi = tmp_lstd[i].split(' ', 2); + if (rqi.length == 2) { + if (rqi[1].length > 3 && rqi[1].startsWith('*.')) { + rqi[1] = rqi[1].replace('*.', '.'); + } + if (rqi[1].startsWith('/')) { + if (rqi[1].endsWith('/')) { + rqi[1] = rqi[1].replace(/\/$/, ''); + } + if (rqi[1].length < 4 || rqi[1].includes('||') || rqi[1].includes('//')) { + rqi[1] = ''; + } + } else { + if (rqi[1].length > 1 && rqi[1].includes('*')) { + rqi[1] = ''; + } + } + if (rqi[0] == '.' || rqi[1] == '.' || rqi[0].includes('..') || rqi[1].includes('..')) { + rqi[0] = ''; + } + if (!rqi[0].startsWith('.') && rqi[0] == rqi[1]) { + rqi[0] = ''; + } + rqi[0] = rqi[0].toLowerCase(); + rqi[1] = rqi[1].toLowerCase(); + if (rqi[1].startsWith('/')) { + try { + if ((new RegExp(rqi[1].replace(/^\//g, ''))).test('hi')) { + _tryrgx = null; + } + } catch (z) { + console.log(z); + rqi[1] = ''; + } + } + if (/^([0-9a-z.*_\[\]\:-]{1,})$/.test(rqi[0]) && (/^([0-9a-z.*_\[\]\:-]{1,})$/.test(rqi[1]) || /^http(|s):\/\/([0-9a-z.*\+\(\)\/&\^%\$#@\!;_\[\]\:-]{5,})$/.test(rqi[1]) || /^\/([\^\$\|\?\!\\\(\)\{\}\+0-9a-z,.*_\[\]\:-]{3,})$/.test(rqi[1]))) { + tmp_lstd[i] = rqi[0] + ' ' + rqi[1]; + } else { + tmp_lstd[i] = ''; + } + } else { + tmp_lstd[i] = ''; + } + } + tmp_lstd = get_clntxt(tmp_lstd); + browser.storage.local.set({ + myset_rqblwhitelist: tmp_lstd + }); + document.getElementById('myset_rqblwhitelist').value = tmp_lstd; + tmp_lstd = document.getElementById('myset_rqblblacklist').value.split("\n"); + for (var i = 0; i < tmp_lstd.length; i++) { + tmp_lstd[i] = tmp_lstd[i].toLowerCase(); + if (!/^([0-9a-z._\[\]\:-]{4,})$/.test(tmp_lstd[i]) && !/^\/([\^\$\|\?\!\\\(\)\{\}\+0-9a-z,.*_\[\]\:-]{3,})$/.test(tmp_lstd[i])) { + tmp_lstd[i] = ''; + continue; + } + if (tmp_lstd[i].startsWith('/')) { + try { + if ((new RegExp(tmp_lstd[i].replace(/^\//g, ''))).test('hi')) { + _tryrgx = null; + } + } catch (z) { + console.log(z); + tmp_lstd[i] = ''; + } + } + } + tmp_lstd = get_clntxt(tmp_lstd); + browser.storage.local.set({ + myset_rqblblacklist: tmp_lstd + }); + document.getElementById('myset_rqblblacklist').value = tmp_lstd; + tmp_lstd = document.getElementById('myset_rqbljsoklist').value.split("\n"); + for (var i = 0; i < tmp_lstd.length; i++) { + tmp_lstd[i] = tmp_lstd[i].toLowerCase(); + if (!/^([\!0-9a-z._\[\]\:-]{4,})$/.test(tmp_lstd[i])) { + tmp_lstd[i] = ''; + } + } + tmp_lstd = get_clntxt(tmp_lstd); + browser.storage.local.set({ + myset_rqbljsoklist: tmp_lstd + }); + document.getElementById('myset_rqbljsoklist').value = tmp_lstd; + tmp_lstd = document.getElementById('myset_rqblcqsrlist').value.split("\n"); + var _cslr_tmpv; + for (var i = 0; i < tmp_lstd.length; i++) { + _cslr_tmpv = tmp_lstd[i].replace(/"/g, "'"); + if (_cslr_tmpv.length <= 1) { + tmp_lstd[i] = ''; + continue; + } + if (_cslr_tmpv.search(/\\/) != -1 || _cslr_tmpv.includes(',')) { + tmp_lstd[i] = ''; + continue; + } + try { + _tryrgx = document.querySelectorAll(_cslr_tmpv); + } catch (z) { + console.log(z); + _cslr_tmpv = ''; + } + tmp_lstd[i] = _cslr_tmpv; + } + tmp_lstd = get_clntxt(tmp_lstd); + browser.storage.local.set({ + myset_rqblcqsrlist: b64eu(tmp_lstd) + }); + document.getElementById('myset_rqblcqsrlist').value = tmp_lstd; + tmp_lstd = document.getElementById('myset_rqblcftrwhite').value.split("\n"); + for (var i = 0; i < tmp_lstd.length; i++) { + tmp_lstd[i] = tmp_lstd[i].toLowerCase(); + if (!/^([0-9a-z._\[\]\:-]{4,})$/.test(tmp_lstd[i])) { + tmp_lstd[i] = ''; + } + } + tmp_lstd = get_clntxt(tmp_lstd); + browser.storage.local.set({ + myset_rqblcftrwhite: tmp_lstd + }); + document.getElementById('myset_rqblcftrwhite').value = tmp_lstd; + tmp_lstd = document.getElementById('myset_rqblmitmoklist').value.split("\n"); + for (var i = 0; i < tmp_lstd.length; i++) { + tmp_lstd[i] = tmp_lstd[i].toLowerCase(); + if (!/^([0-9a-z._\[\]\:-]{4,})$/.test(tmp_lstd[i])) { + tmp_lstd[i] = ''; + } + } + tmp_lstd = get_clntxt(tmp_lstd); + browser.storage.local.set({ + myset_rqblmitmoklist: tmp_lstd + }); + document.getElementById('myset_rqblmitmoklist').value = tmp_lstd; + var _apul = document.getElementById('listsync_apiurl').value; + if (_apul.startsWith('http://') || _apul.startsWith('https://')) { + browser.storage.local.set({ + listsync_apiurl: _apul + }); + } else { + browser.storage.local.set({ + listsync_apiurl: 'https://searxes.danwin1210.me/collab/tprb_list.php' + }); + } + _apul = document.getElementById('myset_rqbluis_curl').value; + if (_apul.startsWith('http://') || _apul.startsWith('https://')) { + browser.storage.local.set({ + myset_rqbluis_curl: _apul + }); + } else { + browser.storage.local.set({ + myset_rqbluis_curl: '' + }); + document.getElementById('myset_rqbluis_curl').value = ''; + document.getElementById('myset_rqbluis_0').checked = false; + } + _apul = document.getElementById('myset_rqbluis_curl2').value; + if (_apul.startsWith('http://') || _apul.startsWith('https://')) { + browser.storage.local.set({ + myset_rqbluis_curl2: _apul + }); + } else { + browser.storage.local.set({ + myset_rqbluis_curl2: '' + }); + document.getElementById('myset_rqbluis_curl2').value = ''; + if (document.getElementById('myset_rqblpoplbl_2').checked) { + document.getElementById('myset_rqblpoplbl_2').checked = false; + document.getElementById('myset_rqblpoplbl_0').checked = true; + } + } + _apul = document.getElementById('myset_rqbluis_curl3').value; + if (_apul.startsWith('http://') || _apul.startsWith('https://')) { + browser.storage.local.set({ + myset_rqbluis_curl3: _apul + }); + } else { + browser.storage.local.set({ + myset_rqbluis_curl3: 'https://searxes.danwin1210.me/collab/gdns.php' + }); + document.getElementById('myset_rqbluis_curl3').value = 'https://searxes.danwin1210.me/collab/gdns.php'; + if (!document.getElementById('myset_rqblpxydns_1').checked) { + document.getElementById('myset_rqblpxydns_1').checked = true; + document.getElementById('myset_rqblpxydns_0').checked = false; + } + } + var _cleantime_x = (parseInt(document.getElementById('myset_autocln_vx').value)) ? parseInt(document.getElementById('myset_autocln_vx').value) : 5; + if (_cleantime_x < 5 || _cleantime_x > 999) { + _cleantime_x = 5; + }; + browser.storage.local.set({ + myset_autocln_vx: _cleantime_x + }); + document.getElementById('myset_autocln_vx').value = _cleantime_x; + var _cleantime_y = (parseInt(document.getElementById('myset_autocln_vy').value)) ? parseInt(document.getElementById('myset_autocln_vy').value) : 3; + if (_cleantime_y < 3 || _cleantime_y > 1440) { + _cleantime_y = 3; + }; + browser.storage.local.set({ + myset_autocln_vy: _cleantime_y + }); + document.getElementById('myset_autocln_vy').value = _cleantime_y; + //EMPTY + if (document.getElementById('myset_rqblcqsrlist').value == '') { + document.getElementById('showusrcssqslr').style.display = 'none'; + document.getElementById('myset_rqbl_csmadqs').checked = false; + } + if (document.getElementById('geoip_info4').value == '0') { + document.getElementById('myset_rqblpmshowcc').checked = false; + } + //CONFLICT + if (document.getElementById('myset_rqblrdr_justhtps').checked) { + document.getElementById('myset_rqblyestls').checked = false; + } + if (!document.getElementById('myset_rqblnoscript').checked) { + document.getElementById('myset_rqblpmjshps').checked = false; + document.getElementById('myset_rqblluvinline').checked = false; + document.getElementById('myset_rqbljsak_wuz').checked = false; + document.getElementById('myset_rqbljsak_cdnf').checked = false; + document.getElementById('myset_rqbljsak_cdnd').checked = false; + document.getElementById('myset_rqblnstag_1').checked = false; + document.getElementById('myset_rqblnstag_2').checked = false; + document.getElementById('myset_rqblnstag_0').checked = true; + } + if (!document.getElementById('myset_rqbljsak_wuz').checked && !document.getElementById('myset_rqbljsak_cdnf').checked && !document.getElementById('myset_rqbljsak_cdnd').checked) { + document.getElementById('myset_rqbljsakreqhs').checked = false; + } + if (document.getElementById('myset_rqbl_kbrd').checked) { + if (document.getElementById('myset_rqbl_kbda_1').checked && document.getElementById('chgsubmenu_7').style.display == 'none') { + document.getElementById('myset_rqbl_kbda_1').checked = false; + document.getElementById('myset_rqbl_kbda_0').checked = true; + } + if (document.getElementById('myset_rqbl_kbda_2').checked) { + document.getElementById('myset_rqblpmoffon').checked = true; + } + } + if (document.getElementById('myset_rqblaured_0').checked) { + document.getElementById('myset_rqblrdrign_4').checked = false; + document.getElementById('myset_rqblrdrign_3').checked = false; + document.getElementById('myset_rqblrdrign_0').checked = true; + } + if (document.getElementById('myset_rqblrdr_mitm_0').checked) { + document.getElementById('myset_rqblrdr_mitm_inc').checked = false; + document.getElementById('myset_rqblrdr_mitm_ggl').checked = false; + document.getElementById('myset_rqblrdr_mitm_scu').checked = false; + } + if (document.getElementById('myset_rqblpclr_5').checked) { + document.getElementById('myset_rqblpmshowip').checked = false; + document.getElementById('myset_rqblpmshowcc').checked = false; + document.getElementById('myset_rqblpmshowsubs').checked = false; + if (document.getElementById('myset_rqblppsty_2').checked) { + document.getElementById('myset_rqblppsty_2').checked = false; + document.getElementById('myset_rqblppsty_1').checked = false; + document.getElementById('myset_rqblppsty_0').checked = true; + } + } + if (!document.getElementById('myset_rqblpmshowip').checked && !document.getElementById('myset_rqblpmshowcc').checked) { + document.getElementById('myset_rqblpmshowsubs').checked = false; + } + //ADVANCED + browser.storage.local.set({ + myset_rqblcsslover: (document.getElementById('myset_rqblcsslover').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblsubdomok: (document.getElementById('myset_rqblsubdomok').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblallok_wuz: (document.getElementById('myset_rqblallok_wuz').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblaok_cdnf: (document.getElementById('myset_rqblaok_cdnf').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblaok_cdnd: (document.getElementById('myset_rqblaok_cdnd').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblaok_ytb: (document.getElementById('myset_rqblaok_ytb').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblcleardark: (document.getElementById('myset_rqblcleardark').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblmixokay: (document.getElementById('myset_rqblmixokay').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqbll2iokay: (document.getElementById('myset_rqbll2iokay').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqbl_csmadqs: (document.getElementById('myset_rqbl_csmadqs').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqbldieframe: (document.getElementById('myset_rqbldieframe').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblcftagcanvas: (document.getElementById('myset_rqblcftagcanvas').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqbl_ah_rclk: (document.getElementById('myset_rqbl_ah_rclk').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqbl_ah_keys: (document.getElementById('myset_rqbl_ah_keys').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqbl_ah_scrl: (document.getElementById('myset_rqbl_ah_scrl').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqbl_ah_mmove: (document.getElementById('myset_rqbl_ah_mmove').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqbl_ah_touch: (document.getElementById('myset_rqbl_ah_touch').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqbl_ah_0wchr: (document.getElementById('myset_rqbl_ah_0wchr').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblsettemp: (document.getElementById('myset_rqblsettemp').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblfmtdsturl: (document.getElementById('myset_rqblfmtdsturl').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblfmtdstrxp: (document.getElementById('myset_rqblfmtdstrxp').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblsmartref: (document.getElementById('myset_rqblsmartref').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblmyrecset: (document.getElementById('myset_rqblmyrecset').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblnonotifypop: (document.getElementById('myset_rqblnonotifypop').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqbl_ignh_altsvc: (document.getElementById('myset_rqbl_ignh_altsvc').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqbl_ignh_etag: (document.getElementById('myset_rqbl_ignh_etag').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqbl_ignh_expct: (document.getElementById('myset_rqbl_ignh_expct').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqbl_ignh_xdnspf: (document.getElementById('myset_rqbl_ignh_xdnspf').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblnogifani: (document.getElementById('myset_rqblnogifani').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqbl_ntb_mute: (document.getElementById('myset_rqbl_ntb_mute').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblclnw_ckie: (document.getElementById('myset_rqblclnw_ckie').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblclnw_stor: (document.getElementById('myset_rqblclnw_stor').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblclnw_cace: (document.getElementById('myset_rqblclnw_cace').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblclnw_fdta: (document.getElementById('myset_rqblclnw_fdta').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblclnw_hist: (document.getElementById('myset_rqblclnw_hist').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblclnw_dwnl: (document.getElementById('myset_rqblclnw_dwnl').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblclnw_plug: (document.getElementById('myset_rqblclnw_plug').checked) ? 'y' : 'n' + }); + if (!_IsDroid) { + if (document.getElementById('myset_rqbl_kbrd').checked) { + browser.storage.local.set({ + myset_rqbl_kbrd: 'y' + }); + if (!/^(Alt|Ctrl|Command|MacCtrl)\+(|Shift\+)(([A-Z0-9]{1})|Comma|Period|Home|End|PageUp|PageDown|Space|Insert|Delete|Up|Down|Left|Right)$/.test(document.getElementById('myset_rqbl_kbrd_k').value)) { + document.getElementById('myset_rqbl_kbrd_k').value = 'Alt+3'; + browser.commands.update({ + name: 'tprb-key-action', + shortcut: 'Alt+3' + }).then(function () {}); + } else { + browser.commands.update({ + name: 'tprb-key-action', + shortcut: document.getElementById('myset_rqbl_kbrd_k').value + }).then(function () {}); + } + } else { + browser.storage.local.set({ + myset_rqbl_kbrd: 'n' + }); + } + } + browser.storage.local.set({ + myset_rqblnoscript: (document.getElementById('myset_rqblnoscript').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblxssblock: (document.getElementById('myset_rqblxssblock').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblnoworker: (document.getElementById('myset_rqblnoworker').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblluvinline: (document.getElementById('myset_rqblluvinline').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqbljsak_wuz: (document.getElementById('myset_rqbljsak_wuz').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqbljsak_cdnf: (document.getElementById('myset_rqbljsak_cdnf').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqbljsak_cdnd: (document.getElementById('myset_rqbljsak_cdnd').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqbljsakreqhs: (document.getElementById('myset_rqbljsakreqhs').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblpopnarld: (document.getElementById('myset_rqblpopnarld').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblproicon: (document.getElementById('myset_rqblproicon').checked) ? 'y' : 'n' + }); + var iUsefulCNT = 0; + if (document.getElementById('myset_rqbluis_0').checked) { + iUsefulCNT += 1; + browser.storage.local.set({ + myset_rqbluis_0: 'y' + }); + } else { + browser.storage.local.set({ + myset_rqbluis_0: 'n' + }); + } + if (document.getElementById('myset_rqbluis_1').checked) { + iUsefulCNT += 1; + browser.storage.local.set({ + myset_rqbluis_1: 'y' + }); + } else { + browser.storage.local.set({ + myset_rqbluis_1: 'n' + }); + } + if (document.getElementById('myset_rqbluis_2').checked) { + iUsefulCNT += 1; + browser.storage.local.set({ + myset_rqbluis_2: 'y' + }); + } else { + browser.storage.local.set({ + myset_rqbluis_2: 'n' + }); + } + if (document.getElementById('myset_rqbluis_3').checked) { + iUsefulCNT += 1; + browser.storage.local.set({ + myset_rqbluis_3: 'y' + }); + } else { + browser.storage.local.set({ + myset_rqbluis_3: 'n' + }); + } + if (document.getElementById('myset_rqbluis_4').checked) { + iUsefulCNT += 1; + browser.storage.local.set({ + myset_rqbluis_4: 'y' + }); + } else { + browser.storage.local.set({ + myset_rqbluis_4: 'n' + }); + } + if (document.getElementById('myset_rqbluis_5').checked) { + iUsefulCNT += 1; + browser.storage.local.set({ + myset_rqbluis_5: 'y' + }); + } else { + browser.storage.local.set({ + myset_rqbluis_5: 'n' + }); + } + if (document.getElementById('myset_rqbluis_6').checked) { + iUsefulCNT += 1; + browser.storage.local.set({ + myset_rqbluis_6: 'y' + }); + } else { + browser.storage.local.set({ + myset_rqbluis_6: 'n' + }); + } + if (document.getElementById('myset_rqbluis_7').checked) { + iUsefulCNT += 1; + browser.storage.local.set({ + myset_rqbluis_7: 'y' + }); + } else { + browser.storage.local.set({ + myset_rqbluis_7: 'n' + }); + } + if (iUsefulCNT == 0 || iUsefulCNT > 3) { + document.getElementById('myset_rqblproicon').checked = false; + browser.storage.local.set({ + myset_rqblproicon: 'n' + }); + } + browser.storage.local.set({ + myset_rqblpmdotf: (document.getElementById('myset_rqblpmdotf').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblpmoffon: (document.getElementById('myset_rqblpmoffon').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblpmshowip: (document.getElementById('myset_rqblpmshowip').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblpmshowcc: (document.getElementById('myset_rqblpmshowcc').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblpmshowsubs: (document.getElementById('myset_rqblpmshowsubs').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblpmjshps: (document.getElementById('myset_rqblpmjshps').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqbl_bldstrxp: (document.getElementById('myset_rqbl_bldstrxp').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblnopuny: (document.getElementById('myset_rqblnopuny').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblyestls: (document.getElementById('myset_rqblyestls').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqbljustgp: (document.getElementById('myset_rqbljustgp').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblbyesok: (document.getElementById('myset_rqblbyesok').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblblockfnt: (document.getElementById('myset_rqblblockfnt').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblblockmid: (document.getElementById('myset_rqblblockmid').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblblockimg: (document.getElementById('myset_rqblblockimg').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblblockobj: (document.getElementById('myset_rqblblockobj').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblmimeav: (document.getElementById('myset_rqblmimeav').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblmimepdf: (document.getElementById('myset_rqblmimepdf').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblmimexls: (document.getElementById('myset_rqblmimexls').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblusemybl: (document.getElementById('myset_rqblusemybl').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblbyesocial: (document.getElementById('myset_rqblbyesocial').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblrdr_clnsrch: (document.getElementById('myset_rqblrdr_clnsrch').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblrdr_justhtps: (document.getElementById('myset_rqblrdr_justhtps').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblardr_usealrt: (document.getElementById('myset_rqblardr_usealrt').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqbl_mitmxmark: (document.getElementById('myset_rqbl_mitmxmark').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblrdr_mitm_t2oi: (document.getElementById('myset_rqblrdr_mitm_t2oi').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblrdr_mitm_inc: (document.getElementById('myset_rqblrdr_mitm_inc').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblrdr_mitm_ggl: (document.getElementById('myset_rqblrdr_mitm_ggl').checked) ? 'y' : 'n' + }); + browser.storage.local.set({ + myset_rqblrdr_mitm_scu: (document.getElementById('myset_rqblrdr_mitm_scu').checked) ? 'y' : 'n' + }); + if (document.getElementById('myset_rqblnodlact_0').checked) { + browser.storage.local.set({ + myset_rqblnodlact: 0 + }); + } + if (document.getElementById('myset_rqblnodlact_1').checked) { + browser.storage.local.set({ + myset_rqblnodlact: 1 + }); + } + if (document.getElementById('myset_rqblnodlact_2').checked) { + browser.storage.local.set({ + myset_rqblnodlact: 2 + }); + } + if (document.getElementById('myset_rqbl_kbda_0').checked) { + browser.storage.local.set({ + myset_rqbl_kbda: 0 + }); + } + if (document.getElementById('myset_rqbl_kbda_1').checked) { + browser.storage.local.set({ + myset_rqbl_kbda: 1 + }); + } + if (document.getElementById('myset_rqbl_kbda_2').checked) { + browser.storage.local.set({ + myset_rqbl_kbda: 2 + }); + } + if (document.getElementById('myset_rqblnstag_0').checked) { + browser.storage.local.set({ + myset_rqblnstag: 0 + }); + } + if (document.getElementById('myset_rqblnstag_1').checked) { + browser.storage.local.set({ + myset_rqblnstag: 1 + }); + } + if (document.getElementById('myset_rqblnstag_2').checked) { + browser.storage.local.set({ + myset_rqblnstag: 2 + }); + } + if (document.getElementById('myset_rqblpxydns_0').checked) { + browser.storage.local.set({ + myset_rqblpxydns: 0 + }); + } + if (document.getElementById('myset_rqblpxydns_1').checked) { + browser.storage.local.set({ + myset_rqblpxydns: 1 + }); + } + if (document.getElementById('myset_rqblpoprck_0').checked) { + browser.storage.local.set({ + myset_rqblpoprck: 0 + }); + } + if (document.getElementById('myset_rqblpoprck_1').checked) { + browser.storage.local.set({ + myset_rqblpoprck: 1 + }); + } + if (document.getElementById('myset_rqblpoprck_2').checked) { + browser.storage.local.set({ + myset_rqblpoprck: 2 + }); + } + if (document.getElementById('myset_rqblpoplbl_0').checked) { + browser.storage.local.set({ + myset_rqblpoplbl: 0 + }); + } + if (document.getElementById('myset_rqblpoplbl_1').checked) { + browser.storage.local.set({ + myset_rqblpoplbl: 1 + }); + } + if (document.getElementById('myset_rqblpoplbl_2').checked) { + browser.storage.local.set({ + myset_rqblpoplbl: 2 + }); + } + if (document.getElementById('myset_rqblprsrt_0').checked) { + browser.storage.local.set({ + myset_rqblprsort: 0 + }); + } + if (document.getElementById('myset_rqblprsrt_1').checked) { + browser.storage.local.set({ + myset_rqblprsort: 1 + }); + } + if (document.getElementById('myset_rqblprsrt_2').checked) { + browser.storage.local.set({ + myset_rqblprsort: 2 + }); + } + if (document.getElementById('myset_rqblprsrt_3').checked) { + browser.storage.local.set({ + myset_rqblprsort: 3 + }); + } + if (document.getElementById('myset_rqblppsty_0').checked) { + browser.storage.local.set({ + myset_rqblppsty: 0 + }); + } + if (document.getElementById('myset_rqblppsty_1').checked) { + browser.storage.local.set({ + myset_rqblppsty: 1 + }); + } + if (document.getElementById('myset_rqblppsty_2').checked) { + browser.storage.local.set({ + myset_rqblppsty: 2 + }); + } + if (document.getElementById('myset_rqblpclr_0').checked) { + browser.storage.local.set({ + myset_rqblpcolor: 0 + }); + } + if (document.getElementById('myset_rqblpclr_1').checked) { + browser.storage.local.set({ + myset_rqblpcolor: 1 + }); + } + if (document.getElementById('myset_rqblpclr_5').checked) { + browser.storage.local.set({ + myset_rqblpcolor: 5 + }); + } + if (document.getElementById('myset_rqblico_0').checked) { + browser.storage.local.set({ + myset_rqblmyicon: 0 + }); + } + if (document.getElementById('myset_rqblico_1').checked) { + browser.storage.local.set({ + myset_rqblmyicon: 1 + }); + } + if (document.getElementById('myset_rqblico_2').checked) { + browser.storage.local.set({ + myset_rqblmyicon: 2 + }); + } + if (document.getElementById('myset_rqblbgc_0').checked) { + browser.storage.local.set({ + myset_rqblbgc: 0 + }); + } + if (document.getElementById('myset_rqblbgc_1').checked) { + browser.storage.local.set({ + myset_rqblbgc: 1 + }); + } + if (document.getElementById('myset_rqblaured_0').checked) { + browser.storage.local.set({ + myset_rqblaured: 0 + }); + } + if (document.getElementById('myset_rqblaured_1').checked) { + browser.storage.local.set({ + myset_rqblaured: 1 + }); + } + if (document.getElementById('myset_rqblaured_2').checked) { + browser.storage.local.set({ + myset_rqblaured: 2 + }); + } + if (document.getElementById('myset_rqblrdrign_0').checked) { + browser.storage.local.set({ + myset_rqblrdrign: 0 + }); + } + if (document.getElementById('myset_rqblrdrign_3').checked) { + browser.storage.local.set({ + myset_rqblrdrign: 3 + }); + } + if (document.getElementById('myset_rqblrdrign_4').checked) { + browser.storage.local.set({ + myset_rqblrdrign: 4 + }); + } + if (document.getElementById('myset_rqblrdr_mitm_0').checked) { + browser.storage.local.set({ + myset_rqblrdr_mitm: 0 + }); + } + if (document.getElementById('myset_rqblrdr_mitm_1').checked) { + browser.storage.local.set({ + myset_rqblrdr_mitm: 1 + }); + } + if (document.getElementById('myset_rqblrdr_mitm_2').checked) { + browser.storage.local.set({ + myset_rqblrdr_mitm: 2 + }); + } + var mycolor = document.getElementById('myset_rqblbgc_picker').value; + if (mycolor.length == 7) { + browser.storage.local.set({ + myset_rqblbgc_color: mycolor + }); + } + browser.runtime.sendMessage(['rld']).then(function (r) { + document.getElementById('savenow').disabled = false; + if (document.getElementById('cfgsaved').style.display != 'inline') { + document.getElementById('cfgsaved').style.display = 'inline'; + setTimeout(function () { + document.getElementById('cfgsaved').style.display = 'none'; + }, 1400); + } + }, onError); +} + +function change_menu(x) { + document.getElementById('chgsubmenu_1').disabled = (x != 1) ? false : true; + document.getElementById('sub_menu1').style.display = (x != 1) ? 'none' : 'block'; + document.getElementById('chgsubmenu_2').disabled = (x != 2) ? false : true; + document.getElementById('sub_menu2').style.display = (x != 2) ? 'none' : 'block'; + document.getElementById('chgsubmenu_3').disabled = (x != 3) ? false : true; + document.getElementById('sub_menu3').style.display = (x != 3) ? 'none' : 'block'; + document.getElementById('chgsubmenu_4').disabled = (x != 4) ? false : true; + document.getElementById('sub_menu4').style.display = (x != 4) ? 'none' : 'block'; + document.getElementById('chgsubmenu_5').disabled = (x != 5) ? false : true; + document.getElementById('sub_menu5').style.display = (x != 5) ? 'none' : 'block'; + document.getElementById('chgsubmenu_6').disabled = (x != 6) ? false : true; + document.getElementById('sub_menu6').style.display = (x != 6) ? 'none' : 'block'; + document.getElementById('chgsubmenu_7').disabled = (x != 7) ? false : true; + document.getElementById('sub_menu7').style.display = (x != 7) ? 'none' : 'block'; + document.getElementById('chgsubmenu_8').disabled = (x != 8) ? false : true; + document.getElementById('sub_menu8').style.display = (x != 8) ? 'none' : 'block'; + document.getElementById('chgsubmenu_9').disabled = (x != 9) ? false : true; + document.getElementById('sub_menu9').style.display = (x != 9) ? 'none' : 'block'; +} + +function is_safeload(w) { + var _tw = w.split("\n"); + var _tw_isok = 1; + var _twv; + for (var _twi = 0; _twi < _tw.length; _twi++) { + _twv = _tw[_twi]; + if (_twv != '' && !/^([0-9a-z,.*\+\\\(\)\{\}\/&\^%\$#@\?\!;_\|\[\]\: -]{1,})$/.test(_twv)) { + _tw_isok = 0; + break; + } + }; + if (_tw_isok == 0) { + console.log('TPRB_CFG: This text is not safe'); + return false; + } else { + return true; + } +} + +function import_me(ia, ib, im) { + var _tl = im.files[0]; + if (_tl != undefined) { + if (_tl.size >= 5) { + var fr = new FileReader(); + fr.addEventListener('load', function (ev) { + var _rt = ev.target.result.replace(/(?:\r\n|\r|\n)/g, "\n"); + if (_rt.length >= 5 && is_safeload(_rt)) { + if (document.getElementById(ia).checked) { + document.getElementById(ib).value += "\n" + _rt; + } else { + document.getElementById(ib).value = _rt; + } + }; + _rt = null; + }); + fr.readAsText(_tl); + } + }; + im.value = ''; +} + +function export_me(ia, ib) { + var _tl = document.getElementById(ia).value; + if (_tl.length >= 5 && is_safeload(_tl)) { + tmp_ourl = URL.createObjectURL(new Blob([_tl])); + browser.downloads.download({ + url: tmp_ourl, + filename: ib, + saveAs: true + }).then(function () {}, function () { + URL.revokeObjectURL(tmp_ourl); + }); + } +} + +function connect_fin(m) { + document.getElementById('listsync_sysmsg').value = mylangobj[m]; + document.getElementById('listsync_btnup').disabled = false; + document.getElementById('listsync_btnds').disabled = false; + document.getElementById('listsync_btndlo').disabled = false; + document.getElementById('listsync_btndlm').disabled = false; + throw new Error('!'); +} + +function connect_net(n) { + document.getElementById('listsync_btnup').disabled = true; + document.getElementById('listsync_btnds').disabled = true; + document.getElementById('listsync_btndlo').disabled = true; + document.getElementById('listsync_btndlm').disabled = true; + var api = document.getElementById('listsync_apiurl').value; + if ((!api.startsWith('http://') && !api.startsWith('https://')) || api.length < 19) { + connect_fin('listsync_m_noapi'); + } + var transid = document.getElementById('listsync_transid').value; + if (n >= 1) { + if (transid.length != 19) { + connect_fin('listsync_m_notid'); + } + } + var xhr = new XMLHttpRequest(); + xhr.open("POST", api + "?f=" + Math.random()); + xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); + xhr.onreadystatechange = function () { + if (xhr.readyState == 4) { + var xhr_resp = xhr.responseText; + if (n == 0) { + if (xhr_resp.startsWith('200|')) { + xhr_resp = xhr_resp.split('|')[1]; + if (/^([0-9a-z-]{19})$/.test(xhr_resp)) { + document.getElementById("listsync_transid").value = xhr_resp; + connect_fin('listsync_m_upldone'); + } + }; + connect_fin('listsync_m_nosvresp'); + } + if (n == 1) { + if (xhr_resp == '200') { + connect_fin('listsync_m_dstrydone'); + }; + if (xhr_resp == '255') { + connect_fin('listsync_m_notid2'); + }; + connect_fin('listsync_m_nosvresp'); + } + if (n == 2 || n == 3) { + if (xhr_resp == '255') { + connect_fin('listsync_m_notid2'); + }; + if (xhr_resp.startsWith('200|')) { + xhr_resp = atob(xhr_resp.split('|')[1]); + if (xhr_resp.length >= 6) { + if (n == 2) { + document.getElementById("myset_rqblwhitelist").value = xhr_resp; + }; + if (n == 3) { + document.getElementById("myset_rqblwhitelist").value += "\n" + xhr_resp; + }; + connect_fin('listsync_m_dwndone'); + } + }; + connect_fin('listsync_m_nosvresp'); + } + } + } + if (n == 0) { + var _wlst = document.getElementById("myset_rqblwhitelist").value; + if (_wlst.length < 6) { + connect_fin('listsync_m_nowlst'); + }; + xhr.send("u=" + encodeURIComponent(btoa(_wlst))); + } + if (n == 1) { + xhr.send("x=" + transid); + } + if (n == 2 || n == 3) { + xhr.send("g=" + transid); + } + document.getElementById('listsync_sysmsg').value = mylangobj['listsync_m_connecting']; + return false; +} + +function pc_open_ntab(p) { + return new Promise((_a, _d) => { + if (p) { + browser.tabs.query({ + title: 'TPRB:[Config]' + }).then(function (qt) { + if (v_ls != '?=tprb') { + var _open = false; + if (qt.length >= 1) { + for (var i = 0; i < qt.length; i++) { + if (/^moz-extension:\/\/(.*)\/tprb_cfg\.html(.*)$/.test(qt[i].url)) { + _open = true; + break; + } + } + } + browser.tabs.query({ + active: true, + currentWindow: true + }).then(function (x) { + if (x[0] != undefined) { + if (!_open) { + if (_IsDroid) { + document.getElementById('open_init').style.display = 'block'; + document.body.style.display = 'block'; + var _xid = x[0].id; + document.getElementById('opendroid').addEventListener('click', function () { + browser.tabs.update(_xid, { + active: true, + url: browser.extension.getURL('tprb_cfg.html?=tprb') + }); + }); + throw new Error('!'); + } else { + browser.tabs.update(x[0].id, { + active: true, + url: browser.extension.getURL('tprb_cfg.html?=tprb') + }); + } + } else { + browser.tabs.update(qt[i].id, { + active: true + }).then(function () { + browser.tabs.remove(x[0].id); + }, function () {}); + } + } + }, function () {}); + _d(); + } else { + document.body.bgColor = '#f9f9fa'; + _a(); + } + }, _d); + } else { + _a(); + } + }); +} +document.addEventListener('DOMContentLoaded', function () { + if (v_ls != '' && v_ls != '?=tprb') { + throw new Error('!'); + } + browser.runtime.getPlatformInfo().then(function (i) { + if (i.os == 'android') { + _IsDroid = true; + } + browser.storage.local.get().then(function (r) { + pc_open_ntab(_IsDroid).then(function () { + document.getElementById('myset_rqblwhitelist').value = r.myset_rqblwhitelist || ''; + document.getElementById('myset_rqbljsoklist').value = r.myset_rqbljsoklist || ''; + document.getElementById('myset_rqblblacklist').value = r.myset_rqblblacklist || ''; + document.getElementById('myset_rqblcqsrlist').value = (r.myset_rqblcqsrlist != undefined) ? b64du(r.myset_rqblcqsrlist) : ''; + document.getElementById('myset_rqblcftrwhite').value = r.myset_rqblcftrwhite || ''; + document.getElementById('myset_rqblmitmoklist').value = r.myset_rqblmitmoklist || ''; + document.getElementById('listsync_apiurl').value = r.listsync_apiurl || ''; + document.getElementById('myset_rqbluis_curl').value = r.myset_rqbluis_curl || ''; + document.getElementById('myset_rqbluis_curl2').value = r.myset_rqbluis_curl2 || ''; + document.getElementById('myset_rqbluis_curl3').value = r.myset_rqbluis_curl3 || ''; + document.getElementById('myset_autocln_vx').value = (r.myset_autocln_vx) ? parseInt(r.myset_autocln_vx) : 5; + if (document.getElementById('myset_autocln_vx').value < 5 || document.getElementById('myset_autocln_vx').value > 999) { + document.getElementById('myset_autocln_vx').value = 5; + } + document.getElementById('myset_autocln_vy').value = (r.myset_autocln_vy) ? parseInt(r.myset_autocln_vy) : 3; + if (document.getElementById('myset_autocln_vy').value < 3 || document.getElementById('myset_autocln_vy').value > 1440) { + document.getElementById('myset_autocln_vy').value = 3; + } + document.getElementById('myset_rqblcsslover').checked = (r.myset_rqblcsslover == 'y') ? true : false; + document.getElementById('myset_rqblsubdomok').checked = (r.myset_rqblsubdomok == 'y') ? true : false; + document.getElementById('myset_rqblallok_wuz').checked = (r.myset_rqblallok_wuz == 'y') ? true : false; + document.getElementById('myset_rqblaok_cdnf').checked = (r.myset_rqblaok_cdnf == 'y') ? true : false; + document.getElementById('myset_rqblaok_cdnd').checked = (r.myset_rqblaok_cdnd == 'y') ? true : false; + document.getElementById('myset_rqblaok_ytb').checked = (r.myset_rqblaok_ytb == 'y') ? true : false; + document.getElementById('myset_rqblcleardark').checked = (r.myset_rqblcleardark == 'y') ? true : false; + document.getElementById('myset_rqblmixokay').checked = (r.myset_rqblmixokay == 'y') ? true : false; + document.getElementById('myset_rqbll2iokay').checked = (r.myset_rqbll2iokay == 'y') ? true : false; + document.getElementById('myset_rqbl_csmadqs').checked = (r.myset_rqbl_csmadqs == 'y') ? true : false; + document.getElementById('showusrcssqslr').style.display = (r.myset_rqbl_csmadqs == 'y') ? 'inline' : 'none'; + document.getElementById('myset_rqbldieframe').checked = (r.myset_rqbldieframe == 'y') ? true : false; + document.getElementById('myset_rqblcftagcanvas').checked = (r.myset_rqblcftagcanvas == 'y') ? true : false; + document.getElementById('myset_rqbl_ah_rclk').checked = (r.myset_rqbl_ah_rclk == 'y') ? true : false; + document.getElementById('myset_rqbl_ah_keys').checked = (r.myset_rqbl_ah_keys == 'y') ? true : false; + document.getElementById('myset_rqbl_ah_scrl').checked = (r.myset_rqbl_ah_scrl == 'y') ? true : false; + document.getElementById('myset_rqbl_ah_mmove').checked = (r.myset_rqbl_ah_mmove == 'y') ? true : false; + document.getElementById('myset_rqbl_ah_touch').checked = (r.myset_rqbl_ah_touch == 'y') ? true : false; + document.getElementById('myset_rqbl_ah_0wchr').checked = (r.myset_rqbl_ah_0wchr == 'y') ? true : false; + document.getElementById('myset_rqblsettemp').checked = (r.myset_rqblsettemp == 'y') ? true : false; + document.getElementById('myset_rqblfmtdsturl').checked = (r.myset_rqblfmtdsturl == 'y') ? true : false; + document.getElementById('showdsturlfmt').style.display = (r.myset_rqblfmtdsturl == 'y') ? 'inline' : 'none'; + document.getElementById('myset_rqblfmtdstrxp').checked = (r.myset_rqblfmtdstrxp == 'y') ? true : false; + document.getElementById('showdstrxpfmt').style.display = (r.myset_rqblfmtdstrxp == 'y') ? 'inline' : 'none'; + document.getElementById('myset_rqblsmartref').checked = (r.myset_rqblsmartref == 'y') ? true : false; + document.getElementById('myset_rqblmyrecset').checked = (r.myset_rqblmyrecset == 'y') ? true : false; + document.getElementById('myset_rqblnonotifypop').checked = (r.myset_rqblnonotifypop == 'y') ? true : false; + document.getElementById('myset_rqbl_ignh_altsvc').checked = (r.myset_rqbl_ignh_altsvc == 'y') ? true : false; + document.getElementById('myset_rqbl_ignh_etag').checked = (r.myset_rqbl_ignh_etag == 'y') ? true : false; + document.getElementById('myset_rqbl_ignh_expct').checked = (r.myset_rqbl_ignh_expct == 'y') ? true : false; + document.getElementById('myset_rqbl_ignh_xdnspf').checked = (r.myset_rqbl_ignh_xdnspf == 'y') ? true : false; + document.getElementById('myset_rqblnogifani').checked = (r.myset_rqblnogifani == 'y') ? true : false; + document.getElementById('myset_rqbl_ntb_mute').checked = (r.myset_rqbl_ntb_mute == 'y') ? true : false; + document.getElementById('myset_rqblclnw_ckie').checked = (r.myset_rqblclnw_ckie == 'y') ? true : false; + document.getElementById('myset_rqblclnw_stor').checked = (r.myset_rqblclnw_stor == 'y') ? true : false; + document.getElementById('myset_rqblclnw_cace').checked = (r.myset_rqblclnw_cace == 'y') ? true : false; + document.getElementById('myset_rqblclnw_fdta').checked = (r.myset_rqblclnw_fdta == 'y') ? true : false; + document.getElementById('myset_rqblclnw_hist').checked = (r.myset_rqblclnw_hist == 'y') ? true : false; + document.getElementById('myset_rqblclnw_dwnl').checked = (r.myset_rqblclnw_dwnl == 'y') ? true : false; + document.getElementById('myset_rqblclnw_plug').checked = (r.myset_rqblclnw_plug == 'y') ? true : false; + document.getElementById('myset_rqbl_kbrd').checked = (r.myset_rqbl_kbrd == 'y') ? true : false; + document.getElementById('kbd_act').style.display = (r.myset_rqbl_kbrd == 'y') ? 'inline' : 'none'; + if (!_IsDroid) { + browser.commands.getAll().then(function (g) { + if (g[0]) { + document.getElementById('myset_rqbl_kbrd_k').value = g[0].shortcut; + } + }); + } + document.getElementById('myset_rqblnoscript').checked = (r.myset_rqblnoscript == 'y') ? true : false; + document.getElementById('myset_rqblxssblock').checked = (r.myset_rqblxssblock == 'y') ? true : false; + document.getElementById('myset_rqblnoworker').checked = (r.myset_rqblnoworker == 'y') ? true : false; + document.getElementById('myset_rqblluvinline').checked = (r.myset_rqblluvinline == 'y') ? true : false; + document.getElementById('myset_rqbljsak_wuz').checked = (r.myset_rqbljsak_wuz == 'y') ? true : false; + document.getElementById('myset_rqbljsak_cdnf').checked = (r.myset_rqbljsak_cdnf == 'y') ? true : false; + document.getElementById('myset_rqbljsak_cdnd').checked = (r.myset_rqbljsak_cdnd == 'y') ? true : false; + document.getElementById('myset_rqbljsakreqhs').checked = (r.myset_rqbljsakreqhs == 'y') ? true : false; + document.getElementById('myset_rqblpopnarld').checked = (r.myset_rqblpopnarld == 'y') ? true : false; + if (r.myset_rqblproicon == 'y') { + document.getElementById('myset_rqblproicon').checked = true; + document.getElementById('myset_rqbluis_0').checked = (r.myset_rqbluis_0 == 'y') ? true : false; + document.getElementById('myset_rqbluis_1').checked = (r.myset_rqbluis_1 == 'y') ? true : false; + document.getElementById('myset_rqbluis_2').checked = (r.myset_rqbluis_2 == 'y') ? true : false; + document.getElementById('myset_rqbluis_3').checked = (r.myset_rqbluis_3 == 'y') ? true : false; + document.getElementById('myset_rqbluis_4').checked = (r.myset_rqbluis_4 == 'y') ? true : false; + document.getElementById('myset_rqbluis_5').checked = (r.myset_rqbluis_5 == 'y') ? true : false; + document.getElementById('myset_rqbluis_6').checked = (r.myset_rqbluis_6 == 'y') ? true : false; + document.getElementById('myset_rqbluis_7').checked = (r.myset_rqbluis_7 == 'y') ? true : false; + } else { + document.getElementById('myset_rqblproicon').checked = false; + } + document.getElementById('myset_rqblpmdotf').checked = (r.myset_rqblpmdotf == 'y') ? true : false; + document.getElementById('myset_rqblpmoffon').checked = (r.myset_rqblpmoffon == 'y') ? true : false; + document.getElementById('myset_rqblpmshowip').checked = (r.myset_rqblpmshowip == 'y') ? true : false; + document.getElementById('myset_rqblpmshowcc').checked = (r.myset_rqblpmshowcc == 'y') ? true : false; + document.getElementById('myset_rqblpmshowsubs').checked = (r.myset_rqblpmshowsubs == 'y') ? true : false; + document.getElementById('myset_rqblpmjshps').checked = (r.myset_rqblpmjshps == 'y') ? true : false; + document.getElementById('myset_rqbl_bldstrxp').checked = (r.myset_rqbl_bldstrxp == 'y') ? true : false; + document.getElementById('showbdrxpfmt').style.display = (r.myset_rqbl_bldstrxp == 'y') ? 'inline' : 'none'; + document.getElementById('myset_rqblnopuny').checked = (r.myset_rqblnopuny == 'y') ? true : false; + document.getElementById('myset_rqblyestls').checked = (r.myset_rqblyestls == 'y') ? true : false; + document.getElementById('myset_rqbljustgp').checked = (r.myset_rqbljustgp == 'y') ? true : false; + document.getElementById('myset_rqblbyesok').checked = (r.myset_rqblbyesok == 'y') ? true : false; + document.getElementById('myset_rqblblockfnt').checked = (r.myset_rqblblockfnt == 'y') ? true : false; + document.getElementById('myset_rqblblockmid').checked = (r.myset_rqblblockmid == 'y') ? true : false; + document.getElementById('myset_rqblblockimg').checked = (r.myset_rqblblockimg == 'y') ? true : false; + document.getElementById('myset_rqblblockobj').checked = (r.myset_rqblblockobj == 'y') ? true : false; + document.getElementById('myset_rqblmimeav').checked = (r.myset_rqblmimeav == 'y') ? true : false; + document.getElementById('myset_rqblmimepdf').checked = (r.myset_rqblmimepdf == 'y') ? true : false; + document.getElementById('myset_rqblmimexls').checked = (r.myset_rqblmimexls == 'y') ? true : false; + document.getElementById('myset_rqblusemybl').checked = (r.myset_rqblusemybl == 'y') ? true : false; + document.getElementById('myset_rqblbyesocial').checked = (r.myset_rqblbyesocial == 'y') ? true : false; + document.getElementById('myset_rqblrdr_clnsrch').checked = (r.myset_rqblrdr_clnsrch == 'y') ? true : false; + document.getElementById('myset_rqblrdr_justhtps').checked = (r.myset_rqblrdr_justhtps == 'y') ? true : false; + document.getElementById('myset_rqblardr_usealrt').checked = (r.myset_rqblardr_usealrt == 'y') ? true : false; + document.getElementById('myset_rqbl_mitmxmark').checked = (r.myset_rqbl_mitmxmark == 'y') ? true : false; + document.getElementById('myset_rqblrdr_mitm_t2oi').checked = (r.myset_rqblrdr_mitm_t2oi == 'y') ? true : false; + document.getElementById('myset_rqblrdr_mitm_inc').checked = (r.myset_rqblrdr_mitm_inc == 'y') ? true : false; + document.getElementById('myset_rqblrdr_mitm_ggl').checked = (r.myset_rqblrdr_mitm_ggl == 'y') ? true : false; + document.getElementById('myset_rqblrdr_mitm_scu').checked = (r.myset_rqblrdr_mitm_scu == 'y') ? true : false; + if (r.myset_rqblpxydns) { + switch (r.myset_rqblpxydns) { + case 1: + document.getElementById('myset_rqblpxydns_1').checked = true; + break; + default: + document.getElementById('myset_rqblpxydns_0').checked = true; + break; + } + } else { + document.getElementById('myset_rqblpxydns_0').checked = true; + } + if (r.myset_rqblnodlact) { + switch (r.myset_rqblnodlact) { + case 1: + document.getElementById('myset_rqblnodlact_1').checked = true; + break; + case 2: + document.getElementById('myset_rqblnodlact_2').checked = true; + break; + default: + document.getElementById('myset_rqblnodlact_0').checked = true; + break; + } + } else { + document.getElementById('myset_rqblnodlact_0').checked = true; + } + if (r.myset_rqbl_kbda) { + switch (r.myset_rqbl_kbda) { + case 1: + document.getElementById('myset_rqbl_kbda_1').checked = true; + break; + case 2: + document.getElementById('myset_rqbl_kbda_2').checked = true; + break; + default: + document.getElementById('myset_rqbl_kbda_0').checked = true; + break; + } + } else { + document.getElementById('myset_rqbl_kbda_0').checked = true; + } + if (r.myset_rqblnstag) { + switch (r.myset_rqblnstag) { + case 1: + document.getElementById('myset_rqblnstag_1').checked = true; + break; + case 2: + document.getElementById('myset_rqblnstag_2').checked = true; + break; + default: + document.getElementById('myset_rqblnstag_0').checked = true; + break; + } + } else { + document.getElementById('myset_rqblnstag_0').checked = true; + } + if (r.myset_rqblpoprck) { + switch (r.myset_rqblpoprck) { + case 1: + document.getElementById('myset_rqblpoprck_1').checked = true; + break; + case 2: + document.getElementById('myset_rqblpoprck_2').checked = true; + break; + default: + document.getElementById('myset_rqblpoprck_0').checked = true; + break; + } + } else { + document.getElementById('myset_rqblpoprck_0').checked = true; + } + if (r.myset_rqblpoplbl) { + switch (r.myset_rqblpoplbl) { + case 1: + document.getElementById('myset_rqblpoplbl_1').checked = true; + break; + case 2: + document.getElementById('myset_rqblpoplbl_2').checked = true; + break; + default: + document.getElementById('myset_rqblpoplbl_0').checked = true; + break; + } + } else { + document.getElementById('myset_rqblpoplbl_0').checked = true; + } + if (r.myset_rqblprsort) { + switch (r.myset_rqblprsort) { + case 1: + document.getElementById('myset_rqblprsrt_1').checked = true; + break; + case 2: + document.getElementById('myset_rqblprsrt_2').checked = true; + break; + case 3: + document.getElementById('myset_rqblprsrt_3').checked = true; + break; + default: + document.getElementById('myset_rqblprsrt_0').checked = true; + break; + } + } else { + document.getElementById('myset_rqblprsrt_0').checked = true; + } + if (r.myset_rqblppsty) { + switch (r.myset_rqblppsty) { + case 1: + document.getElementById('myset_rqblppsty_1').checked = true; + break; + case 2: + document.getElementById('myset_rqblppsty_2').checked = true; + break; + default: + document.getElementById('myset_rqblppsty_0').checked = true; + break; + } + } else { + document.getElementById('myset_rqblppsty_0').checked = true; + } + if (r.myset_rqblpcolor) { + switch (r.myset_rqblpcolor) { + case 1: + document.getElementById('myset_rqblpclr_1').checked = true; + break; + case 5: + document.getElementById('myset_rqblpclr_5').checked = true; + break; + default: + document.getElementById('myset_rqblpclr_0').checked = true; + break; + } + } else { + document.getElementById('myset_rqblpclr_0').checked = true; + } + if (r.myset_rqblmyicon) { + switch (r.myset_rqblmyicon) { + case 1: + document.getElementById('myset_rqblico_1').checked = true; + break; + case 2: + document.getElementById('myset_rqblico_2').checked = true; + break; + default: + document.getElementById('myset_rqblico_0').checked = true; + break; + } + } else { + document.getElementById('myset_rqblico_0').checked = true; + } + if (r.myset_rqblaured) { + switch (r.myset_rqblaured) { + case 1: + document.getElementById('myset_rqblaured_1').checked = true; + break; + case 2: + document.getElementById('myset_rqblaured_2').checked = true; + break; + default: + document.getElementById('myset_rqblaured_0').checked = true; + break; + } + } else { + document.getElementById('myset_rqblaured_0').checked = true; + } + if (r.myset_rqblrdrign) { + switch (r.myset_rqblrdrign) { + case 3: + document.getElementById('myset_rqblrdrign_3').checked = true; + break; + case 4: + document.getElementById('myset_rqblrdrign_4').checked = true; + break; + default: + document.getElementById('myset_rqblrdrign_0').checked = true; + break; + } + } else { + document.getElementById('myset_rqblrdrign_0').checked = true; + } + if (r.myset_rqblrdr_mitm) { + switch (r.myset_rqblrdr_mitm) { + case 1: + document.getElementById('myset_rqblrdr_mitm_1').checked = true; + break; + case 2: + document.getElementById('myset_rqblrdr_mitm_2').checked = true; + break; + default: + document.getElementById('myset_rqblrdr_mitm_0').checked = true; + break; + } + } else { + document.getElementById('myset_rqblrdr_mitm_0').checked = true; + } + if (r.myset_rqblbgc == 1) { + document.getElementById('myset_rqblbgc_1').checked = true; + } else { + document.getElementById('myset_rqblbgc_0').checked = true; + } + if (r.myset_rqblbgc_color) { + if (r.myset_rqblbgc_color.length == 7) { + document.getElementById('myset_rqblbgc_picker').value = r.myset_rqblbgc_color; + } + } + mylangobj = tprq_i18n_cfg_en; + var _i8n_k; + for (var _i8n_n of document.querySelectorAll('span[data-what]')) { + _i8n_k = _i8n_n.dataset.what; + if (mylangobj[_i8n_k]) { + _i8n_n.appendChild(document.createTextNode(mylangobj[_i8n_k])); + } else { + console.log('TPRB_CFG: i18n Error:', _i8n_k); + _i8n_n.appendChild(document.createTextNode('!TRANSLATE_ERROR!')); + } + } + if (_IsDroid) { + for (var _pco of document.querySelectorAll('span[data-pconly]')) { + _pco.style.display = 'none'; + }; + document.getElementById('aboutfxandr').style.display = 'inline'; + document.getElementById('aboutfxandr2').style.display = 'inline'; + document.body.id = 'cfgdr'; + document.body.bgColor = '#f9f9fa'; + } + document.getElementById('listsync_sysmsg').value = mylangobj['listsync_startup']; + document.getElementById('geoip_info4').value = (r.myset_rqbl_geo) ? Object.keys(JSON.parse(r.myset_rqbl_geo)).length : 0; + document.getElementById('mainmenu').style.display = 'block'; + document.body.style.display = 'block'; + document.addEventListener('contextmenu', function (z) { + if (z.target.tagName != 'TEXTAREA' && z.target.tagName != 'INPUT') { + z.preventDefault(); + } + }); + for (var _du of document.querySelectorAll("a[href^='%NFOBASE%']")) { + _du.href = _docbase + _du.href.split('%NFOBASE%')[1]; + } + }, function () { + throw new Error('!'); + }); + }, onError); + }); +}); +document.querySelector('form').addEventListener('submit', config_save); +document.getElementById('myset_importtxt_wl').addEventListener('change', function () { + import_me('importMerge_wl', 'myset_rqblwhitelist', this); +}); +document.getElementById('myset_importtxt_bl').addEventListener('change', function () { + import_me('importMerge_bl', 'myset_rqblblacklist', this); +}); +document.getElementById('myset_importtxt_mm').addEventListener('change', function () { + import_me('importMerge_mm', 'myset_rqblmitmoklist', this); +}); +document.getElementById('myset_importtxt_cf').addEventListener('change', function () { + import_me('importMerge_cf', 'myset_rqblcftrwhite', this); +}); +document.getElementById('myset_importtxt_js').addEventListener('change', function () { + import_me('importMerge_js', 'myset_rqbljsoklist', this); +}); +document.getElementById('myset_exporttxt_wl').addEventListener('click', function () { + export_me('myset_rqblwhitelist', 'tprb_wlist.txt'); +}); +document.getElementById('myset_exporttxt_bl').addEventListener('click', function () { + export_me('myset_rqblblacklist', 'tprb_blist.txt'); +}); +document.getElementById('myset_exporttxt_mm').addEventListener('click', function () { + export_me('myset_rqblmitmoklist', 'tprb_mmlist.txt'); +}); +document.getElementById('myset_exporttxt_cf').addEventListener('click', function () { + export_me('myset_rqblcftrwhite', 'tprb_cflist.txt'); +}); +document.getElementById('myset_exporttxt_js').addEventListener('click', function () { + export_me('myset_rqbljsoklist', 'tprb_jslist.txt'); +}); +document.getElementById('myset_rqblfmtdsturl').addEventListener('click', function () { + document.getElementById('showdsturlfmt').style.display = (this.checked) ? 'inline' : 'none'; +}); +document.getElementById('myset_rqblfmtdstrxp').addEventListener('click', function () { + document.getElementById('showdstrxpfmt').style.display = (this.checked) ? 'inline' : 'none'; +}); +document.getElementById('myset_rqbl_bldstrxp').addEventListener('click', function () { + document.getElementById('showbdrxpfmt').style.display = (this.checked) ? 'inline' : 'none'; +}); +document.getElementById('myset_rqbl_kbrd').addEventListener('click', function () { + document.getElementById('kbd_act').style.display = (this.checked) ? 'inline' : 'none'; +}); +document.getElementById('myset_rqbl_csmadqs').addEventListener('click', function () { + document.getElementById('showusrcssqslr').style.display = (this.checked) ? 'inline' : 'none'; +}); +document.getElementById('listsync_btnup').addEventListener('click', function () { + connect_net(0); +}); +document.getElementById('listsync_btnds').addEventListener('click', function () { + connect_net(1); +}); +document.getElementById('listsync_btndlo').addEventListener('click', function () { + connect_net(2); +}); +document.getElementById('listsync_btndlm').addEventListener('click', function () { + connect_net(3); +}); +document.getElementById('rstKBS').addEventListener('click', function () { + document.getElementById('myset_rqbl_kbrd_k').value = 'Alt+3'; +}); +document.getElementById('btnGoResetUI').addEventListener('click', function () { + document.getElementById('mainmenu').style.display = 'none'; + document.getElementById('reset_page').style.display = 'block'; +}); +document.getElementById('aonbtn_bset0').addEventListener('click', function () { + document.getElementById('reset_page').style.display = 'none'; + document.getElementById('aon_dnt_rst_wlst').checked = false; + document.getElementById('mainmenu').style.display = 'block'; +}); +document.getElementById('aonbtn_bset1').addEventListener('click', function () { + document.getElementById('reset_page').style.display = 'none'; + browser.storage.local.get().then(function (_c) { + var _nowlst_main = ''; + var _nowlst_bl = ''; + var _nowlst_cont = ''; + var _nowlst_mitm = ''; + var _nowlst_js = ''; + var _now_jkeep = (document.getElementById('aon_dnt_rst_wlst').checked) ? true : false; + if (_now_jkeep) { + if (_c.myset_rqblwhitelist) { + _nowlst_main = _c.myset_rqblwhitelist; + } + if (_c.myset_rqblblacklist) { + _nowlst_bl = _c.myset_rqblblacklist; + } + if (_c.myset_rqblcftrwhite) { + _nowlst_cont = _c.myset_rqblcftrwhite; + } + if (_c.myset_rqblmitmoklist) { + _nowlst_mitm = _c.myset_rqblmitmoklist; + } + if (_c.myset_rqbljsoklist) { + _nowlst_js = _c.myset_rqbljsoklist; + } + } + browser.storage.local.clear().then(function () { + if (_now_jkeep) { + if (_nowlst_main.length >= 4) { + browser.storage.local.set({ + myset_rqblwhitelist: _nowlst_main + }); + } + if (_nowlst_bl.length >= 4) { + browser.storage.local.set({ + myset_rqblblacklist: _nowlst_bl + }); + } + if (_nowlst_cont.length >= 4) { + browser.storage.local.set({ + myset_rqblcftrwhite: _nowlst_cont + }); + } + if (_nowlst_mitm.length >= 4) { + browser.storage.local.set({ + myset_rqblmitmoklist: _nowlst_mitm + }); + } + if (_nowlst_js.length >= 4) { + browser.storage.local.set({ + myset_rqbljsoklist: _nowlst_js + }); + } + } + location.reload(true); + }, onError); + }, onError); +}); +document.getElementById('chgsubmenu_1').addEventListener('click', function () { + change_menu(1); +}); +document.getElementById('chgsubmenu_2').addEventListener('click', function () { + change_menu(2); +}); +document.getElementById('chgsubmenu_3').addEventListener('click', function () { + change_menu(3); +}); +document.getElementById('chgsubmenu_4').addEventListener('click', function () { + change_menu(4); +}); +document.getElementById('chgsubmenu_5').addEventListener('click', function () { + change_menu(5); +}); +document.getElementById('chgsubmenu_6').addEventListener('click', function () { + change_menu(6); +}); +document.getElementById('chgsubmenu_7').addEventListener('click', function () { + change_menu(7); +}); +document.getElementById('chgsubmenu_8').addEventListener('click', function () { + change_menu(8); +}); +document.getElementById('chgsubmenu_9').addEventListener('click', function () { + change_menu(9); +}); +document.getElementById('udsd_menu_1').addEventListener('click', function () { + this.style.display = 'none'; + document.getElementById('udsd_menu_1_real').style.display = 'inline'; +}); +document.getElementById('udsd_menu_2').addEventListener('click', function () { + this.style.display = 'none'; + document.getElementById('udsd_menu_2_real').style.display = 'inline'; +}); +document.getElementById('udsd_menu_6').addEventListener('click', function () { + this.style.display = 'none'; + document.getElementById('udsd_menu_6_real').style.display = 'inline'; +}); +document.getElementById('udsd_menu_7').addEventListener('click', function () { + this.style.display = 'none'; + document.getElementById('udsd_menu_7_real').style.display = 'inline'; +}); +document.getElementById('udsd_menu_8').addEventListener('click', function () { + this.style.display = 'none'; + document.getElementById('udsd_menu_8_real').style.display = 'inline'; +}); +document.getElementById('droidcls').addEventListener('click', function () { + browser.tabs.query({ + active: true, + currentWindow: true + }).then(function (tabs) { + browser.tabs.remove(tabs[0].id); + }, function () {}) +}); +document.getElementById('myset_import_geoip').addEventListener('change', function () { + var _tl = this.files[0]; + if (_tl != undefined) { + if (_tl.size >= 100000) { + var fr = new FileReader(); + fr.addEventListener('load', function (ev) { + var _rt = ev.target.result.replace(/(?:\r\n|\r|\n)/g, "\n").split("\n"); + var _rt_len = _rt.length; + if (_rt_len >= 1000) { + document.getElementById('myset_import_geoip').disabled = true; + document.getElementById('btnClrGeoD').disabled = true; + var _rti, _gd_v4 = {}, + _gct_v4 = 0; + for (var i = 0; i < _rt_len; i++) { + _rti = _rt[i]; + if (/^([0-9]{1,10}),([0-9]{1,10}),([A-Z]{2})$/.test(_rti)) { + _rti = _rti.split(','); + _rti[0] = parseInt(_rti[0]); + _rti[1] = parseInt(_rti[1]); + if (_rti[2].length == 2 && _rti[1] >= _rti[0]) { + _gd_v4[_rti[0]] = [_rti[1], _rti[2]]; + _gct_v4 += 1; + } + } + } + if (_gct_v4 > 1000) { + browser.storage.local.set({ + myset_rqbl_geo: JSON.stringify(_gd_v4) + }); + _gd_v4 = null; + document.getElementById('geoip_info4').value = _gct_v4; + } + document.getElementById('btnClrGeoD').disabled = false; + document.getElementById('myset_import_geoip').disabled = false; + } + _rt = null; + }); + fr.readAsText(_tl); + } + } + this.value = ''; +}); +document.getElementById('btnClrGeoD').addEventListener('click', function () { + browser.storage.local.set({ + myset_rqbl_geo: '' + }); + document.getElementById('geoip_info4').value = 0; +}); +browser.downloads.onChanged.addListener(function (g) { + if (g.state) { + if (g.state.current == 'complete') { + URL.revokeObjectURL(tmp_ourl); + tmp_ourl = null; + } + } +});
\ No newline at end of file diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/tprb_core.js b/data/extensions/tprb.addon@searxes.danwin1210.me/tprb_core.js new file mode 100644 index 0000000..da71fd1 --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/tprb_core.js @@ -0,0 +1,3509 @@ +var tprq_init = 0; +var tprq_mylang = {}; +var tprq_whitelist = {}; +var tprq_black_nrml = []; +var tprq_black_regx = []; +var tprq_whitetemp = {}; +var tprq_tab_dst = {}; +var tprq_amdroid = false; +var tprq_mustcleanup = false; +var tprq_cleanup_what = {}; +var tprq_tabcls_cnt = 0; +var tprq_acln_x = 999; +var tprq_acln_y = 1440; +var tprq_acln_lastrun = 0; +var tprq_newtab_mute = false; +var tprq_allowcss = 0; +var tprq_separdark = 0; +var tprq_mixignore = 0; +var tprq_l2iignore = 0; +var tprq_tac_ignlst = []; +var tprq_allowsubdom = 0; +var tprq_allowwidedm = 0; +var tprq_allowcdnf = 0; +var tprq_allowcdnd = 0; +var tprq_alloweytb = 0; +var tprq_showtemp = 0; +var tprq_fmtdsturl = 0; +var tprq_fmtdstrxp = 0; +var tprq_smartref = 0; +var tprq_ignh_altsvc = 0; +var tprq_ignh_etag = 0; +var tprq_ignh_expct = 0; +var tprq_ignh_xdnspf = 0; +var tprq_showcntr = 0; +var tprq_kb_act = -1; +var tprq_jsfilter = 0; +var tprq_jsnoxss = 0; +var tprq_noworker = 0; +var tprq_jslineok = 0; +var tprq_jsak_wud = 0; +var tprq_jsak_cdnf = 0; +var tprq_jsak_cdnd = 0; +var tprq_jsakreqhs = 0; +var tprq_oklist_js = []; +var tprq_history_js = []; +var tprq_tmpok_js = []; +var tprq_showicon = 0; +var tprq_myuis = []; +var tprq_showdotf = 0; +var tprq_showxbtn = 0; +var tprq_pop_sort = 0; +var tprq_pop_bid = ['', '#fff']; +var tprq_popstyle = 0; +var tprq_poponoff = 0; +var tprq_poponoff_ison = true; +var tprq_pophtps_js = 0; +var tprq_popshowip = 0; +var tprq_popshowcc = 0; +var tprq_popshowsubs = 0; +var tprq_usednsapi = 0; +var tprq_dnsapi_url = ''; +var tprq_dnspair = {}; +var tprq_popnarld = 0; +var tprq_poprclk = 0; +var tprq_poplbla = 0; +var tprq_denypuny = 0; +var tprq_secureonly = 0; +var tprq_onlygp = 0; +var tprq_denysocks = 0; +var tprq_fwdom = 0; +var tprq_blockfnt = 0; +var tprq_blockmid = 0; +var tprq_blockimg = 0; +var tprq_blockobj = 0; +var tprq_mime_av = 0; +var tprq_mime_pdf = 0; +var tprq_mime_office = 0; +var tprq_cleanparam = 0; +var tprq_redir2htps = 0; +var tprq_scan_shortu = 0; +var tprq_aured_ignr = 0; +var tprq_aured_confirm = false; +var tprq_usedntme = 0; +var tprq_unsocial = 0; +var tprq_scan_mitm = 0; +var tprq_mitmoklist = []; +var tprq_nomitm_s403 = 0; +var tprq_nomitm_inc = 0; +var tprq_nomitm_ggl = 0; +var tprq_nomitm_scu = 0; +var tprq_bkt_mitms = []; +var tprq_flags = ['icons/icon-32.png', 'icons/i_ylw.png', 'icons/i_red.png']; +var tprq_bl_img = 'R0lGODlhAQABAIAAAP///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQBCgAAACwAAAAAAQABAAACAkQBADs='; +var tprq_dblack_fqdn = []; +var tprq_dblack_dom = []; +var tprq_dsocial_fqdn = []; +var tprq_dsocial_dom = []; +var tprq_db_xss1 = []; +var tprq_db_xss2 = []; +var tprq_db_xss3 = []; +var tprq_geo4_loaded = false; +var tprq_db_geo4 = {}; +//=== +function onError(e) { + console.log(`TPRB: Error:${e}`); +} + +function text2array(w) { + var wr = {}; + var wx = w.split("\n"); + var wxy, wxy_a, wxy_b; + for (var y = 0; y < wx.length; y++) { + wxy = wx[y].split(' '); + if (wxy.length == 2) { + wxy_a = wxy[0]; + wxy_b = wxy[1]; + if (wr[wxy_a] == undefined) { + wr[wxy_a] = []; + }; + if (!wr[wxy_a].includes(wxy_b)) { + wr[wxy_a].push(wxy_b); + } + } + }; + return wr; +} + +function array2text(w) { + var _wr = ''; + var wk, lk; + for (var k in w) { + if (k.length >= 1) { + wk = w[k]; + for (var l in wk) { + lk = wk[l]; + if (lk.length >= 1) { + _wr += k + " " + lk + "\n"; + } + } + } + }; + return _wr; +} + +function text2array2(w) { + var wr = {}; + var wx = w.split("\n"); + var wxy, wxy_a, wxy_b; + for (var y = 0; y < wx.length; y++) { + wxy = wx[y].split(' '); + if (wxy.length == 2) { + wxy_a = wxy[0]; + wxy_b = wxy[1]; + if (wr[wxy_a] == undefined) { + wr[wxy_a] = wxy_b; + } + } + }; + return wr; +} + +function rqbl_loadcfg() { + browser.storage.local.get().then(function (w) { + tprq_whitelist = (w.myset_rqblwhitelist) ? text2array(w.myset_rqblwhitelist) : {}; + var _tmpbl = (w.myset_rqblblacklist) ? w.myset_rqblblacklist.split("\n").filter(v => v != '') : []; + if (_tmpbl.length < 1) { + tprq_fwdom = 0; + } else { + if (w.myset_rqbl_bldstrxp == 'y') { + tprq_fwdom = 2; + } else { + tprq_fwdom = 1; + } + } + tprq_black_nrml = []; + tprq_black_regx = []; + if (tprq_fwdom >= 1) { + for (var i = 0; i < _tmpbl.length; i++) { + if (_tmpbl[i].startsWith('/')) { + tprq_black_regx.push(_tmpbl[i]); + } else { + tprq_black_nrml.push(_tmpbl[i]); + } + } + } + tprq_allowcss = (w.myset_rqblcsslover == 'y') ? 1 : 0; + tprq_allowsubdom = (w.myset_rqblsubdomok == 'y') ? 1 : 0; + tprq_allowwidedm = (w.myset_rqblallok_wuz == 'y') ? 1 : 0; + tprq_allowcdnf = (w.myset_rqblaok_cdnf == 'y') ? 1 : 0; + tprq_allowcdnd = (w.myset_rqblaok_cdnd == 'y') ? 1 : 0; + tprq_alloweytb = (w.myset_rqblaok_ytb == 'y') ? 1 : 0; + tprq_separdark = (w.myset_rqblcleardark == 'y') ? 1 : 0; + tprq_mixignore = (w.myset_rqblmixokay == 'y') ? 1 : 0; + tprq_l2iignore = (w.myset_rqbll2iokay == 'y') ? 1 : 0; + tprq_tac_ignlst = (w.myset_rqblcftrwhite) ? w.myset_rqblcftrwhite.split("\n").filter(v => v != '') : []; + tprq_showtemp = (w.myset_rqblsettemp == 'y') ? 1 : 0; + tprq_fmtdsturl = (w.myset_rqblfmtdsturl == 'y') ? 1 : 0; + tprq_fmtdstrxp = (w.myset_rqblfmtdstrxp == 'y') ? 1 : 0; + tprq_smartref = (w.myset_rqblsmartref == 'y') ? 1 : 0; + tprq_nodlact = w.myset_rqblnodlact || 0; + tprq_ignh_altsvc = (w.myset_rqbl_ignh_altsvc == 'y') ? 1 : 0; + tprq_ignh_etag = (w.myset_rqbl_ignh_etag == 'y') ? 1 : 0; + tprq_ignh_expct = (w.myset_rqbl_ignh_expct == 'y') ? 1 : 0; + tprq_ignh_xdnspf = (w.myset_rqbl_ignh_xdnspf == 'y') ? 1 : 0; + tprq_cleanparam = (w.myset_rqblrdr_clnsrch == 'y') ? 1 : 0; + tprq_redir2htps = (w.myset_rqblrdr_justhtps == 'y') ? 1 : 0; + tprq_bl_img = 'R0lGODlhAQABAIAAAP///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQBCgAAACwAAAAAAQABAAACAkQBADs='; + tprq_scan_shortu = w.myset_rqblaured || 0; + tprq_aured_ignr = w.myset_rqblrdrign || 0; + if (tprq_aured_ignr == 1 || tprq_aured_ignr == 2) { + tprq_aured_ignr = 0; + } + tprq_aured_confirm = (w.myset_rqblardr_usealrt == 'y') ? true : false; + tprq_scan_mitm = w.myset_rqblrdr_mitm || 0; + if (tprq_scan_mitm != 0) { + tprq_mitmoklist = (w.myset_rqblmitmoklist) ? w.myset_rqblmitmoklist.split("\n").filter(v => v != '') : []; + } else { + tprq_mitmoklist = []; + } + tprq_nomitm_s403 = (w.myset_rqblrdr_mitm_t2oi == 'y') ? 1 : 0; + tprq_nomitm_inc = (w.myset_rqblrdr_mitm_inc == 'y') ? 1 : 0; + tprq_nomitm_ggl = (w.myset_rqblrdr_mitm_ggl == 'y') ? 1 : 0; + tprq_nomitm_scu = (w.myset_rqblrdr_mitm_scu == 'y') ? 1 : 0; + tprq_showcntr = 1; + if (w.myset_rqblnoscript == 'y') { + tprq_oklist_js = (w.myset_rqbljsoklist) ? w.myset_rqbljsoklist.split("\n").filter(v => v != '') : []; + tprq_jsfilter = 1; + } else { + tprq_jsfilter = 0; + tprq_oklist_js = []; + tprq_history_js = []; + } + tprq_jsnoxss = (w.myset_rqblxssblock == 'y') ? 1 : 0; + tprq_db_xss1 = (w.myset_rqblxssblock == 'y') ? ['%3cscript+', '%3cscript%20', '%3c%2fscript', '%3c/script', 'javascript%3a', 'livescript%3a', 'javascript:', 'livescript:', '<script ', '</script'] : []; + tprq_db_xss2 = (w.myset_rqblxssblock == 'y') ? ['eval', 'settimeout', 'setinterval', 'function', 'jquery', 'document.', 'innerhtml', 'location.', 'window.', 'worker(', 'alert(', 'atob(', 'worker%28', 'alert%28', 'atob%28'] : []; + tprq_db_xss3 = (w.myset_rqblxssblock == 'y') ? ["'", '"', ';', '()', '+', '%27', '%22', '%3b', '%28%29', '%2b'] : []; + tprq_noworker = (w.myset_rqblnoworker == 'y') ? 1 : 0; + tprq_jslineok = (w.myset_rqblluvinline == 'y') ? 1 : 0; + tprq_jsak_wud = (w.myset_rqbljsak_wuz == 'y') ? 1 : 0; + tprq_jsak_cdnf = (w.myset_rqbljsak_cdnf == 'y') ? 1 : 0; + tprq_jsak_cdnd = (w.myset_rqbljsak_cdnd == 'y') ? 1 : 0; + tprq_jsakreqhs = (w.myset_rqbljsakreqhs == 'y') ? 1 : 0; + if (w.myset_rqblproicon == 'y') { + tprq_showicon = 1; + tprq_myuis = []; + var _wmrc = w.myset_rqbluis_curl || ''; + if (w.myset_rqbluis_0 == 'y' && _wmrc.startsWith('http')) { + tprq_myuis.push(['0', _wmrc.replace('%F%', '%%TPRB_HOST%%').replace('%E%', '%%TPRB_ERL%%').replace('%U%', '%%TPRB_URL%%')]); + } + if (w.myset_rqbluis_1 == 'y') { + tprq_myuis.push(['1', 'https://www.robtex.com/dns-lookup/%%TPRB_HOST%%']); + } + if (w.myset_rqbluis_2 == 'y') { + tprq_myuis.push(['2', 'https://www.ssllabs.com/ssltest/analyze.html?d=%%TPRB_HOST%%']); + } + if (w.myset_rqbluis_3 == 'y') { + tprq_myuis.push(['3', 'https://twitter.com/intent/tweet?url=%%TPRB_ERL%%']); + } + if (w.myset_rqbluis_4 == 'y') { + tprq_myuis.push(['4', 'https://translate.google.com/translate?sl=auto&tl=ru&u=%%TPRB_ERL%%']); + } + if (w.myset_rqbluis_5 == 'y') { + tprq_myuis.push(['5', 'https://reddit.com/submit?url=%%TPRB_ERL%%']); + } + if (w.myset_rqbluis_6 == 'y') { + tprq_myuis.push(['6', 'https://via.hypothes.is/%%TPRB_URL%%']); + } + if (w.myset_rqbluis_7 == 'y') { + tprq_myuis.push(['7', 'https://web.archive.org/cache/%%TPRB_URL%%']); + } + if (tprq_myuis.length == 0 || tprq_myuis.length > 3) { + tprq_showicon = 0; + tprq_myuis = []; + } + } else { + tprq_showicon = 0; + tprq_myuis = []; + } + if (w.myset_rqblpmoffon == 'y') { + tprq_poponoff = 1; + } else { + tprq_poponoff = 0; + tprq_poponoff_ison = true; + } + tprq_showdotf = (w.myset_rqblpmdotf == 'y') ? 1 : 0; + tprq_showxbtn = 1; + tprq_popstyle = w.myset_rqblppsty || 0; + tprq_pophtps_js = (w.myset_rqblpmjshps == 'y') ? 1 : 0; + tprq_popshowip = (w.myset_rqblpmshowip == 'y') ? 1 : 0; + tprq_popshowcc = (w.myset_rqblpmshowcc == 'y') ? 1 : 0; + tprq_popshowsubs = (w.myset_rqblpmshowsubs == 'y') ? 1 : 0; + tprq_usednsapi = w.myset_rqblpxydns || 0; + if (tprq_usednsapi == 1) { + tprq_dnsapi_url = w.myset_rqbluis_curl3 || ''; + } + tprq_popnarld = (w.myset_rqblpopnarld == 'y') ? 1 : 0; + tprq_poprclk = w.myset_rqblpoprck || 0; + tprq_poplbla = w.myset_rqblpoplbl || 0; + if (tprq_poplbla == 2) { + tprq_poplbla = w.myset_rqbluis_curl2 || 0; + } + tprq_denypuny = (w.myset_rqblnopuny == 'y') ? 1 : 0; + tprq_secureonly = (w.myset_rqblyestls == 'y') ? 1 : 0; + tprq_onlygp = (w.myset_rqbljustgp == 'y') ? 1 : 0; + tprq_denysocks = (w.myset_rqblbyesok == 'y') ? 1 : 0; + tprq_blockfnt = (w.myset_rqblblockfnt == 'y') ? 1 : 0; + tprq_blockmid = (w.myset_rqblblockmid == 'y') ? 1 : 0; + tprq_blockimg = (w.myset_rqblblockimg == 'y') ? 1 : 0; + tprq_blockobj = (w.myset_rqblblockobj == 'y') ? 1 : 0; + tprq_mime_av = (w.myset_rqblmimeav == 'y') ? 1 : 0; + tprq_mime_pdf = (w.myset_rqblmimepdf == 'y') ? 1 : 0; + tprq_mime_office = (w.myset_rqblmimexls == 'y') ? 1 : 0; + tprq_newtab_mute = (w.myset_rqbl_ntb_mute == 'y') ? true : false; + tprq_usedntme = (w.myset_rqblusemybl == 'y') ? 1 : 0; + tprq_dblack_fqdn = (w.myset_rqblusemybl == 'y') ? ['a.postrelease.com', 'a.teads.tv', 'adserver.xpanama.net', 'ae.pubmatic.com', 'ak.sail-horizon.com', 'api.inwemo.com', 'api.unthem.com', 'api.viglink.com', 'assets.adobedtm.com', 'autolinkmaker.itunes.apple.com', 'awaps.yandex.ru', 'b.scorecardresearch.com', 'bam.nr-data.net', 'bat.bing.com', 'btrace.qq.com', 'c.go-mpulse.net', 'cdm.cursecdn.com', 'cdn.adless.io', 'cdn.adsafeprotected.com', 'cdn.carbonads.com', 'cdn.cloudcoins.co', 'cdn.heapanalytics.com', 'cdn.krxd.net', 'cdn.livefyre.com', 'cdn.mxpnl.com', 'cdn.nablabee.com', 'cdn.segment.com', 'cdnssl.clicktale.net', 'cfcd.duckdns.org', 'cfceu.duckdns.org', 'cfcs1.duckdns.org', 'cl.webterren.com', 'consent.cookiebot.com', 'counter.yadro.ru', 'cryptown.netlify.com', 'd.line-cdn.net', 'd.line-scdn.net', 'd10lpsik1i8c69.cloudfront.net', 'd1z2jf7jlzjs58.cloudfront.net', 'd3iz6lralvg77g.cloudfront.net', 'dc.ads.linkedin.com', 'dev.visualwebsiteoptimizer.com', 'fonts.gstatic.com', 'fresh-js.bitbucket.io', 'g2.gumgum.com', 'go.megabanners.cf', 'greenindex.dynamic-dns.net', 'gustaver.ddns.net', 'harvest.surge.sh', 'imasdk.googleapis.com', 'js-agent.newrelic.com', 'js-sec.indexww.com', 'lb.statsevent.com', 'load.jsecoin.com', 'may-js.github.io', 'mc.yandex.ru', 'miner.nablabee.com', 'nexus.ensighten.com', 'nunu-001.now.sh', 'o.aolcdn.com', 'pingjs.qq.com', 'pixel.wp.com', 'platform.linkedin.com', 'platform.stumbleupon.com', 'qos.report.qq.com', 'rcm-jp.amazon.co.jp', 'refresh-js.bitbucket.io', 'route.carambo.la', 's.go-mpulse.net', 's.skimresources.com', 'sb.scorecardresearch.com', 'script.crazyegg.com', 'secure-us.imrworldwide.com', 'smartplugin.youbora.com', 'static.addtoany.com', 'static.adziff.com', 'static.hotjar.com', 'static.parsely.com', 'stats.wp.com', 'tags.bluekai.com', 'traffic.adxprtz.com', 'webwidgetz.duckdns.org', 'whos.amung.us', 'worker.salon.com', 'ws.amazon.co.jp', 'wsp.marketgid.com', 'www.adumen.com', 'www.assoc-amazon.jp', 'www.blogsmithmedia.com', 'www.dianomi.com', 'www.googletagmanager.com', 'www.googletagservices.com', 'www.summerhamster.com', 'www.tns-counter.ru', 'yads.c.yimg.jp', 'z.moatads.com', 'b92.yahoo.co.jp', 'cd-ladsp-com.s3.amazonaws.com', 'static.supuv2.com', 'cse.google.com', 'config.seedtag.com', 'cdn.cookielaw.org', 'seal.verisign.com', 'ff.kis.v2.scr.kaspersky-labs.com', 'cdn.translationexchange.com', 'sdk.privacy-center.org', 'api.rollbar.com', 'js.rtoaster.jp', 'cdn.elasticad.net', 'cdn.ravenjs.com', 'cdn.branch.io', 'www.tamgrt.com', 'www.dwin1.com', 'd7d3cf2e81d293050033-3dfc0615b0fd7b49143049256703bfce.ssl.cf1.rackcdn.com'] : []; + tprq_dblack_dom = (w.myset_rqblusemybl == 'y') ? ['0x1f4b0.com', '101com.com', '123found.com', '123freeavatars.com', '180hits.de', '1q2w3.website', '207.net', '24log.com', '24log.de', '2mdn.net', '2o7.net', '360yield.com', '3lift.com', '4d5.net', '50websads.com', '518ad.com', '51yes.com', '600z.com', '777partner.com', '7bpeople.com', '7search.com', '99count.com', 'a2gw.com', 'a8.net', 'aaddzz.com', 'aalbbh84.info', 'abacho.net', 'abandonedclover.com', 'abruptroad.com', 'absoluteclickscom.com', 'abz.com', 'accesstrade.net', 'actionsplash.com', 'actualdeals.com', 'actuallysheep.com', 'acuityads.com', 'acuty1adsrv.com', 'ad2flash.com', 'ad4game.com', 'adaction.de', 'adadvisor.net', 'adap.tv', 'adapt.tv', 'adbard.net', 'adblade.com', 'adbrite.com', 'adbrn.com', 'adbroker.de', 'adcash.com', 'adcell.de', 'adcentriconline.com', 'adcept.net', 'adcomplete.com', 'adconion.com', 'adcycle.com', 'addme.com', 'adecn.com', 'ademails.com', 'adengage.com', 'adflight.com', 'adforce.com', 'adformdsp.net', 'adgardener.com', 'adgoto.com', 'adgridwork.com', 'adhese.be', 'adhese.com', 'adimpact.com', 'adincube.com', 'adingo.jp', 'adinjector.net', 'adinterax.com', 'adisfy.com', 'adition.com', 'adition.de', 'adition.net', 'adizio.com', 'adjix.com', 'adjug.com', 'adjuggler.com', 'adjustnetwork.com', 'adk2.com', 'adland.ru', 'adlantic.nl', 'adledge.com', 'adlegend.com', 'adless.io', 'adloox.com', 'adlure.net', 'admagnet.net', 'admailtiser.com', 'admanagement.ch', 'admantx.com', 'admarketplace.net', 'admarvel.com', 'adminder.com', 'adminshop.com', 'admized.com', 'admob.com', 'admonitor.com', 'adnotch.com', 'adnxs.com', 'adocean.pl', 'adonspot.com', 'adoperator.com', 'adorigin.com', 'adotmob.com', 'adpenguin.biz', 'adpepper.dk', 'adpepper.nl', 'adperium.com', 'adpia.vn', 'adplus.co.id', 'adplxmd.com', 'adprofile.net', 'adprojekt.pl', 'adrazzi.com', 'adrenali.gq', 'adriver.ru', 'adrolays.de', 'adroll.com', 'adrotate.de', 'adrotator.se', 'adrta.com', 'adsafeprotected.com', 'adscale.de', 'adscholar.com', 'adscience.nl', 'adscpm.com', 'adsdaq.com', 'adsdk.com', 'adsend.de', 'adsensecustomsearchads.com', 'adside.com', 'adsk2.co', 'adskape.ru', 'adskeeper.co.uk', 'adsklick.de', 'adsnative.com', 'adsrevenue.net', 'adsrvr.org', 'adsstat.com', 'adstage.io', 'adsupply.com', 'adswizz.com', 'adsymptotic.com', 'adsynergy.com', 'adtdp.com', 'adtech.de', 'adtechjp.com', 'adtechus.com', 'adtegrity.net', 'adthis.com', 'adtiger.de', 'adtoll.com', 'adtology.com', 'adtoma.com', 'adtrace.org', 'adtrade.net', 'adtrading.de', 'adtrak.net', 'adtriplex.com', 'advariant.com', 'adventory.com', 'advertiserurl.com', 'advertising.com', 'advfromnwl.com', 'advg.jp', 'advnt.com', 'adwareremovergold.com', 'adwhirl.com', 'adwitserver.com', 'adworldnetwork.com', 'adyea.com', 'adz2you.com', 'adzbazar.com', 'adzerk.net', 'adzones.com', 'af-ad.co.uk', 'affbuzzads.com', 'affiliate-b.com', 'agkn.com', 'agreemand.com', 'ahalogy.com', 'aim4media.com', 'aistat.net', 'ajcryptominer.com', 'ajplugins.com', 'alenty.com', 'alipromo.com', 'all4spy.com', 'alladvantage.com', 'allosponsor.com', 'alphonso.tv', 'altavista.ovh', 'amaprop.net', 'amazingcounters.com', 'amazon-adsystem.com', 'ambitiousagreement.com', 'americash.com', 'amoad.com', 'amung.us', 'anahtars.com', 'analytics.blue', 'andlache.com', 'anxiousapples.com', 'apester.com', 'appelamule.com', 'appsflyer.com', 'apture.com', 'apusx.com', 'atdmt.com', 'atom-data.io', 'atwola.com', 'auctionads.com', 'auctionads.net', 'audience2media.com', 'audienceinsights.com', 'augur.io', 'authedmine.com', 'autohits.dk', 'avenuea.com', 'averoconnector.com', 'avocet.io', 'avres.net', 'avsads.com', 'avzadsrv.com', 'awempire.com', 'awin1.com', 'b0b1o.bid', 'bablace.com', 'backbeatmedia.com', 'baskettexture.com', 'bawdybeast.com', 'baypops.com', 'bbelements.com', 'beamincrease.com', 'beamkite.com', 'beemray.com', 'begun.ru', 'behavioralengine.com', 'belstat.com', 'belstat.nl', 'berateveng.ru', 'berp.com', 'bestsearch.net', 'bewaslac.com', 'bhzejltg.info', 'biberukalap.com', 'bidclix.com', 'bidclix.net', 'bidr.io', 'bidswitch.net', 'bidtrk.com', 'bidvertiser.com', 'bigbangmedia.com', 'billboard.cz', 'bitads.net', 'bitmedianetwork.com', 'bizographics.com', 'bizrate.com', 'blingbucks.com', 'blogads.com', 'blogherads.com', 'blogrush.com', 'blogtoplist.se', 'blogtopsites.com', 'blozoo.info', 'blueconic.net', 'bluekai.com', 'bluelithium.com', 'bluewhaleweb.com', 'bmnr.pw', 'bmst.pw', 'boilingbeetle.com', 'boldchat.com', 'boom.ro', 'boomads.com', 'boomtrain.com', 'boudja.com', 'bounceexchange.com', 'bowithow.com', 'bpath.com', 'braincash.com', 'brandreachsys.com', 'brassrule.com', 'bridgetrack.com', 'brightinfo.com', 'broadboundary.com', 'browsermine.com', 'bttrack.com', 'budsinc.com', 'butcalve.com', 'buyhitscheap.com', 'buysellads.com', 'c1exchange.com', 'calmfoot.com', 'caniamedia.com', 'capacitly.com', 'carambo.la', 'carbonads.com', 'carbonads.net', 'casalemedia.com', 'casalmedia.com', 'cbmall.com', 'cdn-code.host', 'cecash.com', 'centerpointmedia.com', 'cetrk.com', 'cfcdist.gdn', 'cfcdist.loan', 'cfcnet.gdn', 'cfcnet.top', 'chainblock.science', 'chameleon.ad', 'channel1vids.com', 'channelintelligence.com', 'chart.dk', 'chartbeat.com', 'chartbeat.net', 'checkm8.com', 'checkstat.nl', 'cherrythread.com', 'chestionar.ro', 'chiefcurrent.com', 'chinchickens.com', 'chitika.net', 'christingel.com', 'cieh.mx', 'cinstein.com', 'cj.com', 'cjbmanagement.com', 'cjlog.com', 'claria.com', 'clicktale.net', 'clicmanager.fr', 'clikerz.net', 'cliksolution.com', 'clixgalore.com', 'clkads.com', 'clkrev.com', 'clod.pw', 'cloudcoins.biz', 'clrstm.com', 'clustrmaps.com', 'cnomy.com', 'coin-have.com', 'coin-hive.com', 'coin-service.com', 'coiner.site', 'coinhive.com', 'coinpirate.cf', 'coinrail.io', 'colonize.com', 'commandwalk.com', 'commissionmonster.com', 'concernrain.com', 'connatix.com', 'connextra.com', 'consciouscabbage.com', 'contaxe.de', 'content.ad', 'contextweb.com', 'conversantmedia.com', 'conversionruler.com', 'copperchickens.com', 'copycarpenter.com', 'copyrightaccesscontrols.com', 'coremetrics.com', 'cottawa.info', 'counted.com', 'cpalead.com', 'cpays.com', 'cpmstar.com', 'cpu2cash.link', 'cpufan.club', 'cpx.to', 'cpxinteractive.com', 'crakmedia.com', 'crawlability.com', 'crawlclocks.com', 'crazypopups.com', 'credishe.com', 'crispads.com', 'criteo.com', 'criteo.net', 'critictruck.com', 'croissed.info', 'crowdgravity.com', 'crownclam.com', 'crwdcntrl.net', 'cryptaloot.pro', 'crypto-loot.com', 'crypto-webminer.com', 'cryptobara.com', 'cryptoloot.pro', 'ctnet2.in', 'ctnetwork.hu', 'cubics.com', 'curtaincows.com', 'cutecushion.com', 'cxense.com', 'cyberbounty.com', 'cybermonitor.com', 'd-ns.ga', 'd2cmedia.ca', 'danban.com', 'dapper.net', 'datasecu.download', 'datashreddergold.com', 'dbbsrv.com', 'de17a.com', 'dealdotcom.com', 'debtbusterloans.com', 'decibelinsight.net', 'decisiveducks.com', 'decknetwork.net', 'delightdriving.com', 'deloo.de', 'deloton.com', 'demandbase.com', 'demdex.net', 'deployads.com', 'dianomi.com', 'didnkinrab.com', 'didtheyreadit.com', 'differentdesk.com', 'digitalmerkat.com', 'digitru.st', 'digxmr.com', 'directivepub.com', 'directleads.com', 'directorym.com', 'directtrack.com', 'displayadsmedia.com', 'disqusads.com', 'dk4ywix.com', 'docksalmon.com', 'domaining.in', 'domainsponsor.com', 'domainsteam.de', 'domdex.com', 'doubleclick.net', 'doublepimp.com', 'doubtfulrainstorm.com', 'dragzebra.com', 'drumcash.com', 'dyntrk.com', 'dzizsih.ru', 'eadexchange.com', 'easyhits4u.com', 'ebocornac.com', 'ebuzzing.com', 'ecoupons.com', 'edgeio.com', 'edgeno.de', 'effectivemeasure.net', 'elasticchange.com', 'elephantqueue.com', 'elitetoplist.com', 'elthamely.com', 'emarketer.com', 'emediate.dk', 'emediate.eu', 'enginenetwork.com', 'enlarget.com', 'enquisite.com', 'ensighten.com', 'entercasino.com', 'eqads.com', 'estat.com', 'estream.to', 'etahub.com', 'etargetnet.com', 'etzbnfuigipwvs.ru', 'eurekster.com', 'eusta.de', 'evengparme.com', 'evergage.com', 'ewtuyytdf45.com', 'exchange.bg', 'exchangead.com', 'exchangeclicksonline.com', 'exclusivebrass.com', 'exelator.com', 'exit76.com', 'exitexchange.com', 'exitfuel.com', 'exogripper.com', 'experteerads.com', 'exponential.com', 'extractorandburner.com', 'eyeblaster.com', 'eyeota.net', 'eyereturn.com', 'eyeviewads.com', 'eyewonder.com', 'ezula.com', 'f5biz.com', 'fatisin.ru', 'feedbackresearch.com', 'feedjit.com', 'fimserve.com', 'findcommerce.com', 'findepended.com', 'findyourcasino.com', 'firstlightera.com', 'flashtalking.com', 'flavordecision.com', 'fleshlightcash.com', 'floodprincipal.com', 'flowgo.com', 'flurry.com', 'fout.jp', 'fpctraffic2.com', 'fqtag.com', 'freecontent.bid', 'freecontent.stream', 'freelogs.com', 'freeonlineusers.com', 'freepay.com', 'freeskreen.com', 'freestats.com', 'freestats.tv', 'fullstory.com', 'functionalclam.com', 'funklicks.com', 'funpageexchange.com', 'fusionads.net', 'fusionquest.com', 'futuristicfairies.com', 'fuzzyflavor.com', 'fxstyle.net', 'g-content.bid', 'ga87z2o.com', 'galaxien.com', 'gamehouse.com', 'gamesites100.net', 'gamesites200.com', 'gamesitestop100.com', 'gator.com', 'geovisite.com', 'getclicky.com', 'giddycoat.com', 'globalismedia.com', 'globaltakeoff.net', 'globe7.com', 'gmads.net', 'goingplatinum.com', 'goldstats.com', 'google-analytics.com', 'googleadservices.com', 'googlesyndication.com', 'gorgeousground.com', 'gostats.com', 'gpr.hu', 'grafstat.ro', 'graftpool.ovh', 'greetzebra.com', 'greystripe.com', 'gridiogrid.com', 'gtop100.com', 'guardedgovernor.com', 'guitarbelieve.com', 'gunggo.com', 'hallaert.online', 'harrenmedia.com', 'harrenmedianetwork.com', 'hashing.win', 'hatcalter.com', 'hatenablog-parts.com', 'hatevery.info', 'havamedia.net', 'hegrinhar.com', 'heias.com', 'hellobar.com', 'herbalaffiliateprogram.com', 'heyos.com', 'hgads.com', 'hhb123.tk', 'hightrafficads.com', 'hilariouszinc.com', 'histats.com', 'hit.bg', 'hit.ua', 'hitbox.com', 'hitcents.com', 'hitfarm.com', 'hitiz.com', 'hitlist.ru', 'hitlounge.com', 'hitometer.com', 'hits4me.com', 'hits4pay.com', 'hitslink.com', 'hittail.com', 'hjnbvg.ru', 'hk.rs', 'hodlers.party', 'hodling.faith', 'homepageking.de', 'hotjar.com', 'hotkeys.com', 'hotlog.ru', 'href.asia', 'htmlhubing.xyz', 'httpool.com', 'hurricanedigitalmedia.com', 'hydramedia.com', 'i1img.com', 'i1media.no', 'iadnet.com', 'iasds01.com', 'iconadserver.com', 'icptrack.com', 'identads.com', 'idtargeting.com', 'ientrymail.com', 'iesnare.com', 'illustriousoatmeal.com', 'imagecash.net', 'imarketservices.com', 'impact-ad.jp', 'imprese.cz', 'impressionmedia.cz', 'imrworldwide.com', 'inboxdollars.com', 'incognitosearches.com', 'incrediblesugar.com', 'indexstats.com', 'indexww.com', 'industrybrains.com', 'inetlog.ru', 'infinityads.com', 'infolinks.com', 'information.com', 'ingorob.com', 'inmobi.com', 'innovid.com', 'inringtone.com', 'insdrbot.com', 'insightexpress.com', 'insightexpressai.com', 'inspectlet.com', 'instantmadness.com', 'instinctiveads.com', 'intelliads.com', 'intellitxt.com', 'intergi.com', 'internetfuel.com', 'interreklame.de', 'interstat.hu', 'ioam.de', 'ip.ro', 'ip193.cn', 'iperceptions.com', 'ipro.com', 'ireklama.cz', 'itfarm.com', 'itop.cz', 'itsptp.com', 'ivwbox.de', 'ivykiosk.com', 'janrain.com', 'jcount.com', 'jewelcheese.com', 'jinkads.de', 'joetec.net', 'joneself.com', 'jquery-cdn.download', 'jquery-uim.download', 'jsecoin.com', 'juicyads.com', 'jumptap.com', 'justpremium.com', 'justrelevant.com', 'justwebads.com', 'jyhfuqoh.info', 'kalipasindra.online', 'kanoodle.com', 'kargo.com', 'karonty.com', 'kedtise.com', 'keymedia.hu', 'kindads.com', 'kissmetrics.com', 'kjli.fi', 'kliks.nl', 'kniverto.com', 'knorex.com', 'koinser.in', 'komoona.com', 'kompasads.com', 'kontera.com', 'l33tsite.info', 'lacerta.space', 'lakequincy.com', 'launchbit.com', 'lbn.ru', 'leadboltads.net', 'leadingedgecash.com', 'leadzupc.com', 'ledhenone.com', 'ledinund.com', 'levelrate.de', 'lfstmedia.com', 'liftdna.com', 'ligatus.com', 'ligatus.de', 'lightminer.co', 'lightningcast.net', 'lightspeedcash.com', 'lijit.com', 'limpingline.com', 'link4ads.com', 'linkadd.de', 'linkbuddies.com', 'linkexchange.com', 'linkprice.com', 'linkrain.com', 'linkreferral.com', 'linkshighway.com', 'linkstorms.com', 'linkswaper.com', 'linktarget.com', 'liqwid.net', 'listat.biz', 'liveadexchanger.com', 'liveintent.com', 'livelyoffers.club', 'liverail.com', 'lizardslaugh.com', 'lmodr.biz', 'loading321.com', 'loggly.com', 'logly.co.jp', 'logua.com', 'lop.com', 'lopsidedspoon.com', 'losital.ru', 'loudloss.com', 'lp3tdqle.com', 'lucidmedia.com', 'lucklayed.info', 'luckyorange.com', 'lumpyleaf.com', 'lzjl.com', 'm32.media', 'm4n.nl', 'macromill.com', 'madisonavenue.com', 'marchex.com', 'mastermind.com', 'mataharirama.xyz', 'matchcows.com', 'matchcraft.com', 'mathtag.com', 'maximumcash.com', 'mbuyu.nl', 'mdotm.com', 'measuremap.com', 'mebablo.com', 'media.net', 'media6degrees.com', 'mediaarea.eu', 'mediabridge.cc', 'mediageneral.com', 'mediaiqdigital.com', 'mediamath.com', 'mediaplazza.com', 'mediaplex.com', 'mediascale.de', 'mediatext.com', 'mediatrking.com', 'mediavine.com', 'mediavoice.com', 'medleyads.com', 'medyanetads.com', 'megacash.de', 'megastats.com', 'megawerbung.de', 'mepirtedic.com', 'metanetwork.com', 'methodcash.com', 'metrilo.com', 'mgid.com', 'miarroba.com', 'microad.jp', 'microad.net', 'microstatic.pl', 'microticker.com', 'midnightclicking.com', 'minero.cc', 'minescripts.info', 'minr.pw', 'misstrends.com', 'mixedreading.com', 'mixpanel.com', 'ml314.com', 'mlm.de', 'mmismm.com', 'mmtro.com', 'moatads.com', 'mobclix.com', 'mobileiconnect.com', 'mocean.mobi', 'moggattice.com', 'monerise.com', 'monerominer.rocks', 'monetate.net', 'moneyexpert.com', 'monsterpops.com', 'moonsade.com', 'mopub.com', 'moradu.com', 'moshimo.com', 'mouseflow.com', 'mowfruit.com', 'mpstat.us', 'mrskincash.com', 'msads.net', 'msg-2.me', 'mstrlytcs.com', 'mtree.com', 'mutuza.win', 'muwmedia.com', 'myadstats.com', 'myaffiliateprogram.com', 'mybloglog.com', 'mybuys.com', 'mymoneymakingapp.com', 'mypowermall.com', 'mystat.pl', 'mytrafficads.com', 'mzbcdn.net', 'n69.com', 'nablabee.com', 'naj.sk', 'nakanohito.jp', 'namimedia.com', 'nastydollars.com', 'nathetsof.com', 'navigator.io', 'navrcholu.cz', 'nbjmp.com', 'ncaudienceexchange.com', 'nddmcconmqsy.ru', 'ndparking.com', 'nebabrop.com', 'nedstat.com', 'nedstat.nl', 'nedstatbasic.net', 'nedstatpro.net', 'nend.net', 'nengu.jp', 'neoffic.com', 'nephritish.com', 'netagent.cz', 'netclickstats.com', 'netcommunities.com', 'netdirect.nl', 'netincap.com', 'netshelter.net', 'neudesicmediagroup.com', 'never.ovh', 'newbie.com', 'newnudecash.com', 'newstarads.com', 'newtopsites.com', 'nexage.com', 'nexttime.ovh', 'ningtoldrop.ru', 'norespar.ru', 'novem.pl', 'npttech.com', 'ns1p.net', 'ntv.io', 'nuggad.net', 'nullrefexcep.com', 'nuseek.com', 'nzaza.com', 'oclasrv.com', 'oewa.at', 'oewabox.at', 'offerforge.com', 'offermatica.com', 'ogrid.org', 'oinkinns.tk', 'okexysylgzo.ru', 'olivebrandresponse.com', 'omniture.com', 'onclasrv.com', 'onclickads.net', 'oneandonlynetwork.com', 'onenetworkdirect.com', 'onesignal.com', 'onestat.com', 'onestatfree.com', 'onlinecash.com', 'onlinecashmethod.com', 'onlinerewardcenter.com', 'openads.org', 'openx.com', 'openx.jp', 'openx.net', 'opienetwork.com', 'opinionstage.com', 'optimizely.com', 'optimost.com', 'optmd.com', 'ordingly.com', 'outbrain.com', 'ovalpigs.com', 'overture.com', 'owebmoney.ru', 'owneriq.net', 'oxado.com', 'oxcash.com', 'pagefair.com', 'pagefair.net', 'papoto.com', 'parsely.com', 'partnercash.de', 'paypopup.com', 'payserve.com', 'pbnet.ru', 'pbterra.com', 'peacepowder.com', 'pearno.com', 'peer39.com', 'pema.cl', 'pennyweb.com', 'pepperjamnetwork.com', 'percentmobile.com', 'perfectaudience.com', 'perfiliate.com', 'performancerevenue.com', 'performancerevenues.com', 'performancing.com', 'permutive.com', 'personagraph.com', 'petametrics.com', 'pgmediaserve.com', 'pgpartner.com', 'pheedo.com', 'photographpan.com', 'phpmyvisites.net', 'picadmedia.com', 'piet2eix3l.com', 'pietexture.com', 'pillscash.com', 'pimproll.com', 'pingdom.net', 'playhaven.com', 'playmobileads.com', 'plista.com', 'plugrush.com', 'pointroll.com', 'popads.net', 'popflawlessads.com', 'popin.cc', 'popub.com', 'popunder.ru', 'popupmoney.com', 'popupnation.com', 'porngraph.com', 'porntrack.com', 'possibleboats.com', 'postrelease.com', 'potenza.cz', 'practicetoothpaste.com', 'praddpro.de', 'prchecker.info', 'predictad.com', 'presetrabbits.com', 'primaryads.com', 'primetime.net', 'privatecash.com', 'privy.com', 'proext.com', 'profero.com', 'profitrumour.com', 'projectwonderful.com', 'promobenef.com', 'propellerads.com', 'provexia.com', 'provideplant.com', 'prsitecheck.com', 'ps7894.com', 'psstt.com', 'pubdirecte.com', 'pubmatic.com', 'puserving.com', 'pushcrew.com', 'pushengage.com', 'pzoifaum.info', 'qctop.com', 'qnsr.com', 'quaintcan.com', 'quantcast.com', 'quantserve.com', 'quantummetric.com', 'quarterserver.de', 'quicksandear.com', 'quigo.com', 'quinst.com', 'quisma.com', 'radarurl.com', 'radiate.com', 'rakuprop.net', 'rampidads.com', 'rankchamp.de', 'rankingchart.de', 'rankingscout.com', 'rankyou.com', 'rate.ru', 'reachjunction.com', 'reactx.com', 'readgoldfish.com', 'readserver.net', 'realcastmedia.com', 'realclever.com', 'realclix.com', 'realnetwrk.com', 'realtechnetwork.com', 'reasedoper.pw', 'receptiveink.com', 'redirectvoluum.com', 'reduxmedia.com', 'referralware.com', 'refunevent.com', 'regnow.com', 'reinvigorate.net', 'reklamcsere.hu', 'relevanz10.de', 'relmaxtop.com', 'remox.com', 'rencohep.com', 'renhertfo.com', 'retadint.com', 'retargeter.com', 'revcontent.com', 'revenue.net', 'revenuedirect.com', 'revsci.net', 'revstats.com', 'richmails.com', 'richwebmaster.com', 'rightstats.com', 'rineventrec.com', 'rintindown.com', 'rintinwa.com', 'rlcdn.com', 'rle.ru', 'roar.com', 'robotreplay.com', 'rocks.io', 'roia.biz', 'ron.si', 'rove.cl', 'rowherthat.ru', 'roxr.net', 'rpxnow.com', 'rtbpop.com', 'rtbpopd.com', 'rtmark.net', 'ru4.com', 'rubiconproject.com', 'rulerabbit.com', 'runads.com', 'rundsp.com', 's2d6.com', 'sageanalyst.net', 'salemove.com', 'samsungacr.com', 'samsungads.com', 'saysidewalk.com', 'scanscout.com', 'scarabresearch.com', 'scarcestream.com', 'scopelight.com', 'scorecardresearch.com', 'scratch2cash.com', 'scrubsky.com', 'scrubswim.com', 'searchfeast.com', 'searchmarketing.com', 'searchramp.com', 'sedoparking.com', 'semrush.com', 'separatesilver.com', 'serv0.com', 'servethis.com', 'sessioncam.com', 'sexinyourcity.com', 'sexlist.com', 'sexystat.com', 'shakesea.com', 'shakytaste.com', 'shareadspace.com', 'shareasale.com', 'sharepointads.com', 'sharethrough.com', 'shelterstraw.com', 'shinobi.jp', 'shinystat.com', 'shinystat.it', 'shiveringsail.com', 'shockingswing.com', 'shoppingads.com', 'sighash.info', 'silimbompom.com', 'simplisticnose.com', 'sinceresofa.com', 'sinoa.com', 'sitemeter.com', 'sitestat.com', 'siteverification.online', 'skimresources.com', 'skylink.vn', 'slopeaota.com', 'smart4ads.com', 'smartadserver.com', 'smartlook.com', 'smowtion.com', 'snakesort.com', 'snapads.com', 'sneaklevel.com', 'sneakystamp.com', 'snoobi.com', 'socialblade.com', 'socialspark.com', 'sonobi.com', 'sortable.com', 'spacash.com', 'sparechange.io', 'sparkstudios.com', 'specially4u.net', 'specificpop.com', 'spectacularsnail.com', 'speedomizer.com', 'speedshiftmedia.com', 'spezialreporte.de', 'spillvacation.com', 'sponsorads.de', 'sponsorpro.de', 'spot.im', 'spotxchange.com', 'spykemediatrack.co', 'spykemediatrack.com', 'spylog.com', 'spywarelabs.com', 'spywarenuker.com', 'spywords.com', 'squeamishscarecrow.com', 'srwww1.com', 'stack-sonar.com', 'starffa.com', 'stat24.com', 'statcounter.com', 'stati.bid', 'static-cnt.bid', 'staticsfs.host', 'statistic.date', 'statxpress.com', 'steelhouse.com', 'steelhousemedia.com', 'stickyadstv.com', 'storesurprise.com', 'stormyachiever.com', 'stormyshock.com', 'stormysponge.com', 'straightnest.com', 'strivesidewalk.com', 'structuresofa.com', 'succeedscene.com', 'sumo.com', 'sumome.com', 'superclix.de', 'superficialsink.com', 'superstats.com', 'supertop.ru', 'supertop100.com', 'swissadsolutions.com', 'switchadhub.com', 'swordfishdc.com', 'synconnector.com', 'taboola.com', 'tacoda.net', 'tagular.com', 'tailsweep.com', 'tailsweep.se', 'takru.com', 'tangerinenet.biz', 'tapad.com', 'tapinfluence.com', 'targad.de', 'targetingnow.com', 'targetnet.com', 'targetpoint.com', 'tcads.net', 'tdxio.com', 'teads.tv', 'teenrevenue.com', 'teliad.de', 'terethat.ru', 'terribleturkey.com', 'textads.biz', 'textlinks.com', 'tfag.de', 'tgknt.com', 'tgtvbngp.ru', 'thathislitt.ru', 'thatresha.com', 'theadhost.com', 'theads.me', 'thebugs.ws', 'therapistla.com', 'therichkids.com', 'thirdrespect.com', 'thrnt.com', 'throattrees.com', 'thruport.com', 'tidytrail.com', 'tinybar.com', 'tinypass.com', 'tizers.net', 'tlvmedia.com', 'tnkexchange.com', 'toftofcal.com', 'top123.ro', 'top20free.com', 'top90.ro', 'topacity.info', 'topbucks.com', 'topforall.com', 'topgamesites.net', 'toplist.cz', 'toplistcity.com', 'toprebates.com', 'topsafelist.net', 'topsearcher.com', 'topsir.com', 'topsite.lv', 'topstats.com', 'torrent.pw', 'totemcash.com', 'touchclarity.com', 'tpnads.com', 'tracedesire.com', 'trackalyzer.com', 'trackmysales.com', 'tradeadexchange.com', 'tradedoubler.com', 'traffic-gate-service.info', 'traffic-info-service.info', 'traffic-optical-service.info', 'traffic-service.info', 'traffic-tech-service.info', 'traffichaus.com', 'traffiq.com', 'trafic.ro', 'treasuredata.com', 'trekblue.com', 'trekdata.com', 'trendmd.com', 'trhunt.com', 'tribalfusion.com', 'trickycelery.com', 'tritetongue.com', 'trix.net', 'trmit.com', 'truehits.net', 'truste.com', 'tsyndicate.com', 'tubemogul.com', 'tulip18.com', 'turn.com', 'twittad.com', 'tyroo.com', 'uarating.com', 'ulnawoyyzbljc.ru', 'ultimateclixx.com', 'ultramercial.com', 'unarmedindustry.com', 'unknowntray.com', 'unrulymedia.com', 'unrummaged.com', 'untd.com', 'unusualtitle.com', 'urlcash.net', 'usapromotravel.com', 'userreplay.com', 'userreplay.net', 'valuead.com', 'valueclickmedia.com', 'valuecommerce.com', 'valuesponsor.com', 'ventivmedia.com', 'veritrol.com', 'verresof.com', 'vertadnet.com', 'veruta.com', 'vervewireless.com', 'vibrantmedia.com', 'videoadex.com', 'videoegg.com', 'vidora.com', 'view4cash.de', 'viewpoint.com', 'vilynx.com', 'visistat.com', 'visitbox.de', 'visualrevenue.com', 'voicefive.com', 'voicevegetable.com', 'vpon.com', 'vrs.cz', 'vungle.com', 'vzhjnorkudcxbiy.com', 'warlog.ru', 'watchingthat.com', 'waust.at', 'webangel.ru', 'webassembly.stream', 'webcash.nl', 'webgains.com', 'webmasterplan.com', 'webmasterplan.de', 'webmine.cz', 'webmine.pro', 'webminepool.com', 'webminepool.tk', 'webminerpool.com', 'weborama.fr', 'webpower.com', 'webreseau.com', 'websponsors.com', 'webtraxx.de', 'webtrendslive.com', 'wetrack.it', 'whaleads.com', 'whathyx.com', 'whenu.com', 'whispa.com', 'whoisonline.net', 'widdit.com', 'widespace.com', 'widgetbucks.com', 'wildianing.ru', 'witthethim.com', 'wlmarketing.com', 'wonderlandads.com', 'wondoads.de', 'woopra.com', 'wpnrtnmrewunrtok.xyz', 'wqgkainysj.ru', 'wronpeci.com', 'wtlive.com', 'wwwpromoter.com', 'xchange.ro', 'xertive.com', 'xg4ken.com', 'xiti.com', 'xmrm.pw', 'xmrminingproxy.com', 'xplusone.com', 'xponsor.com', 'xq1.net', 'xtendmedia.com', 'xtremetop100.com', 'xxxmyself.com', 'yabuka.com', 'yadro.ru', 'yesads.com', 'yieldads.com', 'yieldlab.net', 'yieldmanager.com', 'yieldmanager.net', 'yieldmo.com', 'yjtag.jp', 'yldbt.com', 'yoggrt.com', 'yomereba.com', 'yuyyio.com', 'z5x.net', 'zangocash.com', 'zanox.com', 'zdbb.net', 'zenkreka.com', 'zenzuu.com', 'zintext.com', 'ziyu.net', 'zmedia.com', 'zqtk.net', 'ebis.ne.jp', 'traffic-media.co.uk', 'amgload.net', 'smcheck.org', 'f-tra.com', 'rebel.ai', 's-onetag.com', '3gl.net', 'dpmsrv.com', 'adrecover.com', 'condenastdigital.com', 'omtrdc.net', 'adpopcon.com', 'pages06.net', 'consensu.org', 'im-apps.net', 'bigmining.com', 'oath.com', 'evidon.com', 'addroplet.com', 'getsentry.com', 'sentry.io', 'captifymedia.com', 'contentinsights.com'] : []; + tprq_unsocial = (w.myset_rqblbyesocial == 'y') ? 1 : 0; + tprq_dsocial_fqdn = (w.myset_rqblbyesocial == 'y') ? ['an.facebook.com', 'assets.pinterest.com', 'b.hatena.ne.jp', 'connect.facebook.net', 'connect.facebook.com', 'graph.facebook.com', 'graph.instagram.com', 'jsoon.digitiminimi.com', 'platform.instagram.com', 'platform.twitter.com', 's.hatena.ne.jp', 'seccdn.libravatar.org', 'static.evernote.com', 'platform.tumblr.com', 'px.srvcs.tumblr.com', 'jpn2.fukugan.com', 'static.mixi.jp', 'scdn.line-apps.com'] : []; + tprq_dsocial_dom = (w.myset_rqblbyesocial == 'y') ? ['addthis.com', 'blogmura.com', 'buzzfeed.com', 'disqus.com', 'feedly.com', 'flattr.com', 'gravatar.com', 'instawidget.net', 'pusher.com', 'st-hatena.com', 'with2.net', 'stacksocial.com', 'ghbtns.com'] : []; + tprq_geo4_loaded = false; + tprq_db_geo4 = {}; + if (tprq_popshowcc == 1) { + if (w.myset_rqbl_geo) { + tprq_db_geo4 = JSON.parse(w.myset_rqbl_geo); + if (Object.keys(tprq_db_geo4).length > 1000) { + tprq_geo4_loaded = true; + } + } + } + tprq_acln_x = (w.myset_autocln_vx) ? parseInt(w.myset_autocln_vx) : 5; + if (tprq_acln_x <= 0) { + tprq_acln_x = 5; + } + tprq_acln_y = (w.myset_autocln_vy) ? parseInt(w.myset_autocln_vy) : 3; + tprq_acln_y *= 60; + if (tprq_acln_y <= 0) { + tprq_acln_y = 180; + } + tprq_pop_sort = (w.myset_rqblprsort) ? parseInt(w.myset_rqblprsort) : 0; + if (tprq_pop_sort != 0 && tprq_pop_sort != 1 && tprq_pop_sort != 2 && tprq_pop_sort != 3) { + tprq_pop_sort = 0; + } + if (w.myset_rqblpcolor) { + switch (w.myset_rqblpcolor) { + case 1: + tprq_pop_bid = ['black', '#323234']; + break; + case 5: + tprq_pop_bid = ['tlarger', '#f9fafb']; + break; + default: + tprq_pop_bid = ['', '#fff']; + break; + } + } else { + tprq_pop_bid = ['', '#fff']; + } + if (w.myset_rqblmyicon) { + switch (w.myset_rqblmyicon) { + case 1: + tprq_flags[0] = 'icons/s/j_wht.png'; + tprq_flags[1] = 'icons/s/j_ylw.png'; + tprq_flags[2] = 'icons/s/j_red.png'; + break; + case 2: + tprq_flags[0] = 'icons/s/ob_grn.png'; + tprq_flags[1] = 'icons/s/ob_ylw.png'; + tprq_flags[2] = 'icons/s/ob_red.png'; + break; + default: + tprq_flags[0] = 'icons/icon-32.png'; + tprq_flags[1] = 'icons/i_ylw.png'; + tprq_flags[2] = 'icons/i_red.png'; + break; + } + } else { + tprq_flags[0] = 'icons/icon-32.png'; + tprq_flags[1] = 'icons/i_ylw.png'; + tprq_flags[2] = 'icons/i_red.png'; + } + tprq_mylang = { + "v": 0, + "unknown": "Unknown", + "offmode": "Add-on is disabled", + "no3pcon": "No third-party connection", + "dtthisfqdn": "This FQDN", + "dlg_apply": "Apply", + "dlg_bma": "BLK|~|ALW", + "dlg_bmas": "BLK|~|ALW|HTTPS", + "allsdom": "All domains", + "ardir_t": "Automatic redirection detected", + "ardir_s": "Source", + "ardir_d": "Destination", + "ardir_b": "Go Back", + "ardir_n": "I Accept", + "ctm_absite": "About this site", + "ctm_popup": "Open popup", + "ctm_cdom": "Add to blacklist", + "ctm_acfw": "Add to content filter whitelist", + "ctm_mitm": "Add to MITM ignore list", + "nf_dtmitm": "MITM detected", + "nf_acted": "The add-on stopped further connection to ", + "ctxa": "Context menu", + "ctxa_ae": "Already exist:", + "kbsa": "Keyboard Shortcut" + }; + browser.runtime.getPlatformInfo().then(function (i) { + if (i.os == 'android') { + tprq_amdroid = true; + tprq_showcntr = 0; + tprq_showicon = 0; + tprq_showxbtn = 0; + tprq_popstyle = 0; + tprq_poponoff = 0; + tprq_poponoff_ison = true; + if (tprq_pop_bid[0] == 'black') { + tprq_pop_bid[0] = 'broid'; + } else { + tprq_pop_bid[0] = 'droid'; + } + } + }); + if (!tprq_amdroid) { + browser.contextMenus.removeAll(); + browser.contextMenus.create({ + id: "tprb_mainmenuroot", + title: "TPRB: " + tprq_mylang['ctm_absite'], + contexts: ["page"] + }); + browser.contextMenus.create({ + id: "tprb_ctxmnu_pop", + parentId: "tprb_mainmenuroot", + title: tprq_mylang['ctm_popup'], + icons: { + "16": "icons/c/go_16.png" + }, + contexts: ["page"] + }); + browser.contextMenus.create({ + parentId: "tprb_mainmenuroot", + type: "separator", + contexts: ["page"] + }); + browser.contextMenus.create({ + id: "tprb_ctxmnu_addcdb", + parentId: "tprb_mainmenuroot", + title: tprq_mylang['ctm_cdom'], + icons: { + "16": "icons/c/cdb_16.png" + }, + contexts: ["page"] + }); + browser.contextMenus.create({ + parentId: "tprb_mainmenuroot", + type: "separator", + contexts: ["page"] + }); + browser.contextMenus.create({ + id: "tprb_ctxmnu_addcfw", + parentId: "tprb_mainmenuroot", + title: tprq_mylang['ctm_acfw'], + icons: { + "16": "icons/c/wpc_16.png" + }, + contexts: ["page"] + }); + if (tprq_scan_mitm >= 1) { + browser.contextMenus.create({ + parentId: "tprb_mainmenuroot", + type: "separator", + contexts: ["page"] + }); + browser.contextMenus.create({ + id: "tprb_ctxmnu_addmit", + parentId: "tprb_mainmenuroot", + title: tprq_mylang['ctm_mitm'], + icons: { + "16": "icons/c/mitm_16.png" + }, + contexts: ["page"] + }); + } + if (w.myset_rqblbgc == 1 && w.myset_rqblbgc_color != undefined) { + browser.browserAction.setBadgeBackgroundColor({ + color: w.myset_rqblbgc_color + }); + } else { + browser.browserAction.setBadgeBackgroundColor({ + color: [217, 0, 0, 255] + }); + } + if (w.myset_rqbl_kbrd == 'y') { + tprq_kb_act = w.myset_rqbl_kbda || 0; + } else { + tprq_kb_act = -1; + } + } + if (w.myset_rqblmyrecset == 'y') { + browser.privacy.websites.firstPartyIsolate.set({ + value: true + }); + browser.privacy.websites.hyperlinkAuditingEnabled.set({ + value: false + }); + browser.privacy.websites.referrersEnabled.set({ + value: true + }); + browser.privacy.websites.resistFingerprinting.set({ + value: true + }); + browser.privacy.network.networkPredictionEnabled.set({ + value: false + }); + browser.privacy.network.peerConnectionEnabled.set({ + value: false + }); + browser.privacy.network.webRTCIPHandlingPolicy.set({ + value: 'disable_non_proxied_udp' + }); + browser.privacy.services.passwordSavingEnabled.set({ + value: false + }); + browser.privacy.websites.cookieConfig.get({}).then((got) => { + if (got.value.behavior == 'reject_all') { + browser.privacy.websites.cookieConfig.set({ + value: { + 'behavior': 'reject_all', + 'nonPersistentCookies': true + } + }); + } else { + browser.privacy.websites.cookieConfig.set({ + value: { + 'behavior': 'reject_third_party', + 'nonPersistentCookies': true + } + }); + } + }); + } else { + browser.privacy.websites.firstPartyIsolate.clear({}); + browser.privacy.websites.hyperlinkAuditingEnabled.clear({}); + browser.privacy.websites.referrersEnabled.clear({}); + browser.privacy.websites.resistFingerprinting.clear({}); + browser.privacy.network.networkPredictionEnabled.clear({}); + browser.privacy.network.peerConnectionEnabled.clear({}); + browser.privacy.network.webRTCIPHandlingPolicy.clear({}); + browser.privacy.services.passwordSavingEnabled.clear({}); + browser.privacy.websites.cookieConfig.clear({}); + } + if (w.myset_rqblnonotifypop == 'y') { + browser.browserSettings.webNotificationsDisabled.set({ + value: true + }); + browser.browserSettings.allowPopupsForUserEvents.set({ + value: false + }); + } else { + browser.browserSettings.webNotificationsDisabled.clear({}); + browser.browserSettings.allowPopupsForUserEvents.clear({}); + } + if (w.myset_rqblnogifani == 'y') { + browser.browserSettings.imageAnimationBehavior.set({ + value: 'once' + }); + } else { + browser.browserSettings.imageAnimationBehavior.clear({}); + } + tprq_mustcleanup = false; + tprq_cleanup_what = {}; + tprq_tabcls_cnt = 0; + if (w.myset_rqblclnw_ckie == 'y') { + tprq_cleanup_what['cookie'] = true; + } + if (w.myset_rqblclnw_stor == 'y') { + tprq_cleanup_what['storage'] = true; + } + if (w.myset_rqblclnw_cace == 'y') { + tprq_cleanup_what['cache'] = true; + } + if (w.myset_rqblclnw_dwnl == 'y') { + tprq_cleanup_what['down'] = true; + } + if (!tprq_amdroid) { + if (w.myset_rqblclnw_fdta == 'y') { + tprq_cleanup_what['formd'] = true; + } + if (w.myset_rqblclnw_hist == 'y') { + tprq_cleanup_what['hist'] = true; + } + if (w.myset_rqblclnw_plug == 'y') { + tprq_cleanup_what['plug'] = true; + } + } + if (Object.keys(tprq_cleanup_what).length >= 1) { + tprq_mustcleanup = true; + } + browser.tabs.query({ + active: true, + currentWindow: true + }).then(function (t) { + tprq_updicon(t[0].id, t[0].url); + }, onError); //updateicon + console.log('TPRB: Settings loaded.'); + }, onError); +} + +function cleaning_service() { + tprq_tabcls_cnt += 1; + if (tprq_tabcls_cnt >= tprq_acln_x) { + if (Math.abs(Math.round((new Date()).getTime() / 1000) - tprq_acln_lastrun) >= tprq_acln_y) { + tprq_tabcls_cnt = -500000; + if (tprq_cleanup_what['cookie']) { + browser.browsingData.removeCookies({}).then(function () {}, onError); + } + if (tprq_cleanup_what['storage']) { + browser.browsingData.removeLocalStorage({}).then(function () {}, onError); + } + if (tprq_cleanup_what['cache']) { + browser.browsingData.removeCache({}).then(function () {}, onError); + } + if (tprq_cleanup_what['down']) { + browser.browsingData.removeDownloads({}).then(function () {}, onError); + } + if (tprq_cleanup_what['formd']) { + browser.browsingData.removeFormData({}).then(function () {}, onError); + browser.browsingData.removePasswords({}).then(function () {}, onError); + } + if (tprq_cleanup_what['hist']) { + browser.browsingData.removeHistory({}).then(function () {}, onError); + } + if (tprq_cleanup_what['plug']) { + browser.browsingData.removePluginData({}).then(function () {}, onError); + } + console.log('TPRB: Service: Cleanup done', (new Date)); + tprq_acln_lastrun = Math.round((new Date()).getTime() / 1000); + tprq_tabcls_cnt = 0; + } + } +} + +function is_ip_addr(w) { + if (/^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/.test(w) || w.startsWith('[')) { + return true; + } else { + return false; + } +} + +function get_realdomain(w) { + var wa = w.split('.'); + wa.reverse(); + var wa_l = wa.length; //net0,domain1,sub2 + if (wa_l <= 2) { + return w; + } + if (wa_l >= 3) { + if (wa[0] == 'by' || wa[0] == 'ki' || wa[0] == 'na' || wa[0] == 'tm' || wa[0] == 'vc') { + if (wa[1] == 'com') { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'af' || wa[0] == 'bz' || wa[0] == 'lb' || wa[0] == 'lc' || wa[0] == 'mm' || wa[0] == 'mt' || wa[0] == 'ng' || wa[0] == 'sb' || wa[0] == 'sc' || wa[0] == 'sl') { + if (wa[1] == 'com' || wa[1] == 'edu' || wa[1] == 'gov' || wa[1] == 'net' || wa[1] == 'org') { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'org') { + if (wa[1] == 'ae') { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'gg' || wa[0] == 'je') { + if (wa[1] == 'co' || wa[1] == 'net' || wa[1] == 'org') { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'name') { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + if (wa[0] == 'ag') { + if (['com', 'net', 'org', 'co', 'nom', 'edu', 'gov'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'ai') { + if (['off', 'com', 'net', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'ao') { + if (['co', 'ed', 'it', 'og', 'pb'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'ar') { + if (['com', 'edu', 'gov', 'gob', 'int', 'mil', 'net', 'org', 'tur'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'at') { + if (['gv', 'ac', 'co', 'or'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'au') { + if (['com', 'net', 'org', 'edu', 'gov', 'csiro', 'asn', 'id', 'act', 'nsw', 'nt', 'qld', 'sa', 'tas', 'vic', 'wa'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'az') { + if (['biz', 'com', 'edu', 'gov', 'info', 'int', 'mil', 'name', 'net', 'org', 'pp'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'ba') { + if (['com', 'co', 'rs'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'bd') { + if (['com', 'edu', 'ac', 'net', 'gov', 'org', 'mil'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'bh') { + if (['com', 'info', 'cc', 'edu', 'biz', 'net', 'org', 'gov'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'bi') { + if (['ac', 'co', 'com', 'edu', 'gouv', 'gov', 'int', 'mil', 'net', 'or', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'bn') { + if (['com', 'net', 'org', 'edu'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'bo') { + if (['com', 'edu', 'gob', 'gov', 'int', 'mil', 'net', 'org', 'tv'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'br') { + if (['adm', 'adv', 'agr', 'am', 'arq', 'art', 'ato', 'bio', 'blog', 'bmd', 'cim', 'cng', 'cnt', 'com', 'coop', 'ecn', 'edu', 'eng', 'esp', 'etc', 'eti', 'far', 'flog', 'fm', 'fnd', 'fot', 'fst', 'g12', 'ggf', 'gov', 'imb', 'ind', 'inf', 'jor', 'lel', 'mat', 'med', 'mil', 'mus', 'net', 'nom', 'not', 'ntr', 'odo', 'org', 'ppg', 'pro', 'psc', 'psi', 'qsl', 'rec', 'slg', 'srv', 'tmp', 'trd', 'tur', 'tv', 'vet', 'vlog', 'wiki', 'zlg'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'bw') { + if (['org', 'ac', 'co', 'gov'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'ci') { + if (['ac', 'co', 'com', 'ed', 'edu', 'go', 'int', 'net', 'or', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'ck') { + if (['biz', 'co', 'edu', 'gen', 'gov', 'info', 'net', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'cn') { + if (['ac', 'ah', 'bj', 'com', 'cq', 'edu', 'fj', 'gd', 'gov', 'gs', 'gx', 'gz', 'ha', 'hb', 'he', 'hi', 'hk', 'hl', 'hn', 'jl', 'js', 'jx', 'ln', 'mil', 'mo', 'net', 'nm', 'nx', 'org', 'qh', 'sc', 'sd', 'sh', 'sn', 'sx', 'tj', 'tw', 'xj', 'xz', 'yn', 'zj'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'co') { + if (['com', 'edu', 'gov', 'mil', 'net', 'nom', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'com') { + if (['ar', 'br', 'cn', 'de', 'eu', 'gr', 'hu', 'jpn', 'kr', 'no', 'qc', 'ru', 'sa', 'se', 'uk', 'us', 'uy', 'za'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'cr') { + if (['ac', 'co', 'ed', 'fi', 'go', 'or', 'sa'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'cu') { + if (['com', 'edu', 'org', 'net', 'gov', 'inf'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'cy') { + if (['ac', 'biz', 'com', 'ekloges', 'gov', 'ltd', 'name', 'net', 'org', 'parliament', 'press', 'pro', 'tm'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'do') { + if (['art', 'com', 'edu', 'gob', 'gov', 'mil', 'net', 'org', 'sld', 'web'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'dz') { + if (['art', 'asso', 'com', 'edu', 'gov', 'net', 'org', 'pol'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'ec') { + if (['com', 'info', 'net', 'fin', 'med', 'pro', 'org', 'edu', 'gob', 'gov', 'mil'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'ee') { + if (['com', 'pri', 'fie', 'med', 'edu', 'lib', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'eg') { + if (['com', 'edu', 'eun', 'gov', 'mil', 'name', 'net', 'org', 'sci'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'es') { + if (['com', 'nom', 'org', 'gob', 'edu'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'et') { + if (['com', 'gov', 'org', 'edu', 'net', 'biz', 'name', 'info'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'fj') { + if (['ac', 'biz', 'com', 'info', 'mil', 'name', 'net', 'org', 'pro'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'ge') { + if (['com', 'edu', 'gov', 'mil', 'net', 'org', 'pvt'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'gh') { + if (['com', 'edu', 'gov', 'org', 'mil'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'gi') { + if (['com', 'edu', 'gov', 'ltd', 'mod', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'gl') { + if (wa[1] == 'co' || wa[1] == 'com') { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'gr') { + if (['co', 'com', 'edu', 'gov', 'mil', 'mod', 'net', 'org', 'sch'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'gt') { + if (['com', 'edu', 'net', 'gob', 'org', 'mil', 'ind'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'gy') { + if (['co', 'com', 'edu', 'gov', 'net', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'hk') { + if (['com', 'edu', 'gov', 'idv', 'net', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'hn') { + if (['com', 'edu', 'gob', 'net', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'hr') { + if (wa[1] == 'com' || wa[1] == 'from') { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'hu') { + if (['2000', 'agrar', 'bolt', 'casino', 'city', 'co', 'erotica', 'erotika', 'film', 'forum', 'games', 'hotel', 'info', 'ingatlan', 'jogasz', 'konyvelo', 'lakas', 'media', 'news', 'org', 'priv', 'reklam', 'sex', 'shop', 'sport', 'suli', 'szex', 'tm', 'tozsde', 'utazas', 'video'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'id') { + if (['ac', 'co', 'go', 'mil', 'net', 'or', 'sch', 'web'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'il') { + if (['ac', 'co', 'gov', 'idf', 'k12', 'muni', 'net', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'im') { + if (['ac', 'co', 'com', 'gov', 'net', 'org', 'ro'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'in') { + if (['ac', 'co', 'edu', 'ernet', 'firm', 'gen', 'gov', 'ind', 'mil', 'net', 'org', 'res'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'it') { + if (['co', 'edu', 'gov'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'jm') { + if (['com', 'net', 'org', 'edu', 'gov', 'mil'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'jo') { + if (['com', 'edu', 'gov', 'mil', 'name', 'net', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'jp') { + if (['ac', 'ad', 'co', 'ed', 'go', 'gr', 'lg', 'ne', 'or'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'ke') { + if (['ac', 'co', 'go', 'ne', 'or', 'sc'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'kg') { + if (['com', 'edu', 'gov', 'mil', 'net', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'kh') { + if (['com', 'edu', 'gov', 'mil', 'net', 'org', 'per'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'kr') { + if (['ac', 'busan', 'chungbuk', 'chungnam', 'co', 'daegu', 'daejeon', 'es', 'gangwon', 'go', 'gwangju', 'gyeongbuk', 'gyeonggi', 'gyeongnam', 'hs', 'incheon', 'jeju', 'jeonbuk', 'jeonnam', 'kg', 'mil', 'ms', 'ne', 'or', 'pe', 're', 'sc', 'seoul', 'ulsan'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'kw') { + if (['edu', 'com', 'net', 'org', 'gov'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'kz') { + if (['com', 'edu', 'gov', 'mil', 'net', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'lk') { + if (['assn', 'com', 'edu', 'gov', 'grp', 'hotel', 'int', 'ltd', 'net', 'ngo', 'org', 'sch', 'soc', 'web'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'ls') { + if (['ac', 'co', 'gov', 'net', 'nul', 'org', 'parliament', 'quadrant'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'lv') { + if (['asn', 'com', 'conf', 'edu', 'gov', 'id', 'mil', 'net', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'ly') { + if (['com', 'edu', 'gov', 'id', 'med', 'net', 'org', 'plc', 'sch'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'ma') { + if (['ac', 'co', 'gov', 'net', 'org', 'press'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'mk') { + if (['com', 'edu', 'gov', 'inf', 'name', 'net', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'mu') { + if (['ac', 'co', 'com', 'gov', 'net', 'or', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'mx') { + if (['com', 'edu', 'gob', 'net', 'ngo', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'my') { + if (['com', 'edu', 'gov', 'mil', 'name', 'net', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'mz') { + if (['co', 'net', 'org', 'ac', 'gov', 'edu'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'net') { + if (['gb', 'se', 'uk', 'jp'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'nf') { + if (['com', 'net', 'arts', 'store', 'web', 'firm', 'info', 'other', 'per', 'rec'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'ni') { + if (['gob', 'co', 'com', 'ac', 'edu', 'org', 'nom', 'net', 'mil'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'np') { + if (['aero', 'asia', 'biz', 'com', 'coop', 'edu', 'gov', 'info', 'jobs', 'mil', 'mobi', 'museum', 'name', 'net', 'org', 'pro', 'travel'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'nr') { + if (['biz', 'com', 'edu', 'gov', 'info', 'net', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'nz') { + if (['ac', 'co', 'cri', 'geek', 'gen', 'govt', 'health', 'iwi', 'maori', 'mil', 'net', 'org', 'parliament', 'school'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'om') { + if (['co', 'com', 'edu', 'gov', 'med', 'museum', 'net', 'org', 'pro'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'pa') { + if (['abo', 'ac', 'com', 'edu', 'gob', 'ing', 'med', 'net', 'nom', 'org', 'sld'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'pe') { + if (['com', 'edu', 'gob', 'mil', 'net', 'nom', 'org', 'sld'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'pg') { + if (['com', 'net', 'ac', 'gov', 'mil', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'ph') { + if (['com', 'edu', 'gov', 'mil', 'net', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'pk') { + if (['biz', 'com', 'edu', 'fam', 'gob', 'gok', 'gon', 'gop', 'gos', 'gov', 'net', 'org', 'web'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'pl') { + if (['art', 'bialystok', 'biz', 'com', 'edu', 'gda', 'gdansk', 'gov', 'info', 'katowice', 'krakow', 'lodz', 'lublin', 'mil', 'net', 'ngo', 'olsztyn', 'org', 'poznan', 'radom', 'slupsk', 'szczecin', 'torun', 'warszawa', 'waw', 'wroc', 'wroclaw', 'zgora'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'pn') { + if (['in', 'co', 'eu', 'org', 'net', 'me'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'pr') { + if (['ac', 'biz', 'com', 'edu', 'est', 'gov', 'info', 'isla', 'name', 'net', 'org', 'pro', 'prof'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'pt') { + if (['com', 'edu', 'gov', 'int', 'net', 'nome', 'org', 'publ'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'py') { + if (['com', 'coop', 'edu', 'mil', 'gov', 'org', 'net', 'una'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'qa') { + if (['com', 'edu', 'sch', 'gov', 'mil', 'net', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'ru') { + if (['ac', 'adygeya', 'altai', 'amur', 'amursk', 'arkhangelsk', 'astrakhan', 'baikal', 'bashkiria', 'belgorod', 'bir', 'bryansk', 'buryatia', 'cap', 'cbg', 'chel', 'chelyabinsk', 'chita', 'chukotka', 'cmw', 'com', 'dagestan', 'e-burg', 'edu', 'fareast', 'gov', 'grozny', 'int', 'irkutsk', 'ivanovo', 'izhevsk', 'jamal', 'jar', 'joshkar-ola', 'k-uralsk', 'kalmykia', 'kaluga', 'kamchatka', 'karelia', 'kazan', 'kchr', 'kemerovo', 'khabarovsk', 'khakassia', 'khv', 'kirov', 'kms', 'koenig', 'komi', 'kostroma', 'krasnoyarsk', 'kuban', 'kurgan', 'kursk', 'kustanai', 'kuzbass', 'lipetsk', 'magadan', 'magnitka', 'mari', 'mari-el', 'marine', 'mil', 'mordovia', 'mos', 'mosreg', 'msk', 'murmansk', 'mytis', 'nakhodka', 'nalchik', 'net', 'nkz', 'nnov', 'norilsk', 'nov', 'novosibirsk', 'nsk', 'omsk', 'orenburg', 'org', 'oryol', 'oskol', 'palana', 'penza', 'perm', 'pp', 'pskov', 'ptz', 'pyatigorsk', 'rnd', 'rubtsovsk', 'ryazan', 'sakhalin', 'samara', 'saratov', 'simbirsk', 'smolensk', 'snz', 'spb', 'stavropol', 'stv', 'surgut', 'syzran', 'tambov', 'tatarstan', 'test', 'tlt', 'tom', 'tomsk', 'tsaritsyn', 'tsk', 'tula', 'tuva', 'tver', 'tyumen', 'udm', 'udmurtia', 'ulan-ude', 'vdonsk', 'vladikavkaz', 'vladimir', 'vladivostok', 'volgograd', 'vologda', 'voronezh', 'vrn', 'vyatka', 'yakutia', 'yamal', 'yaroslavl', 'yekaterinburg', 'yuzhno-sakhalinsk', 'zgrad'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'sa') { + if (['com', 'edu', 'gov', 'med', 'net', 'org', 'pub', 'sch'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'se') { + if (['a', 'ac', 'b', 'bd', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'k', 'l', 'm', 'n', 'o', 'org', 'p', 'parti', 'pp', 'press', 'r', 's', 't', 'tm', 'u', 'w', 'x', 'y', 'z'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'sg') { + if (['com', 'edu', 'gov', 'idn', 'net', 'org', 'per'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'sv') { + if (['edu', 'gov', 'com', 'org', 'red'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'th') { + if (['ac', 'co', 'go', 'in', 'mi', 'net', 'or'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'tj') { + if (['ac', 'aero', 'biz', 'co', 'com', 'coop', 'dyn', 'edu', 'go', 'gov', 'info', 'int', 'mil', 'museum', 'my', 'name', 'net', 'nic', 'org', 'per', 'pro', 'test', 'web'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'tn') { + if (['agrinet', 'com', 'defense', 'edunet', 'ens', 'fin', 'gov', 'ind', 'info', 'intl', 'mincom', 'nat', 'net', 'org', 'perso', 'rnrt', 'rns', 'rnu', 'tourism'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'tr') { + if (['av', 'bbs', 'bel', 'biz', 'com', 'dr', 'edu', 'gen', 'gov', 'info', 'k12', 'mil', 'name', 'nc', 'net', 'org', 'pol', 'tel', 'tv', 'web'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'tw') { + if (['club', 'com', 'ebiz', 'edu', 'game', 'gov', 'idv', 'mil', 'net', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'tz') { + if (['co', 'ac', 'go', 'or', 'mil', 'sc', 'ne', 'hotel', 'mobi', 'tv', 'info', 'me'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'ua') { + if (['at', 'cherkassy', 'chernigov', 'chernovtsy', 'ck', 'cn', 'co', 'com', 'crimea', 'cv', 'dn', 'dnepropetrovsk', 'donetsk', 'dp', 'edu', 'gov', 'if', 'in', 'ivano-frankivsk', 'kh', 'kharkov', 'kherson', 'khmelnitskiy', 'kiev', 'kirovograd', 'km', 'kr', 'ks', 'lg', 'lt', 'lugansk', 'lutsk', 'lviv', 'mk', 'net', 'nikolaev', 'od', 'odessa', 'org', 'pl', 'poltava', 'pp', 'rovno', 'rv', 'sebastopol', 'sumy', 'te', 'ternopil', 'uz', 'uzhgorod', 'vinnica', 'vn', 'yalta', 'zaporizhzhe', 'zhitomir', 'zp', 'zt'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'ug') { + if (['co', 'ac', 'sc', 'go', 'ne', 'or'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'uk') { + if (['ac', 'bl', 'british-library', 'co', 'gov', 'jcpc', 'jet', 'judiciary', 'ltd', 'me', 'mod', 'net', 'nhs', 'nic', 'nls', 'org', 'parliament', 'plc', 'police', 'sch', 'supremecourt'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'uy') { + if (['com', 'edu', 'gub', 'net', 'mil', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'uz') { + if (['co', 'com', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 've') { + if (['arts', 'co', 'com', 'edu', 'gob', 'gov', 'info', 'int', 'mil', 'net', 'org', 'radio', 'tec', 'web'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'vi') { + if (['co', 'org', 'com', 'net', 'k12'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'vn') { + if (['ac', 'biz', 'com', 'edu', 'gov', 'health', 'info', 'int', 'mil', 'name', 'net', 'org', 'pro'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'ws') { + if (['org', 'gov', 'edu', 'com'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'za') { + if (['ac', 'agric', 'alt', 'bourse', 'city', 'co', 'cybernet', 'db', 'edu', 'gov', 'grondar', 'iaccess', 'imt', 'inca', 'landesign', 'law', 'mil', 'ngo', 'nis', 'nom', 'olivetti', 'org', 'pix', 'school', 'tm', 'web'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'zm') { + if (['ac', 'co', 'com', 'edu', 'gov', 'net', 'org', 'sch'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa[0] == 'zw') { + if (['co', 'ac', 'org'].includes(wa[1])) { + return wa[2] + "." + wa[1] + "." + wa[0]; + } + } + if (wa_l == 4) { + if (/^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/.test(w)) { + return w; + } + } + } + return wa[1] + "." + wa[0]; +} + +function ipv4_to_num(ip) { + var a = ip.split('.'); + if (a.length != 4) { + return 0; + }; + return parseInt(a[0]) * 16777216 + parseInt(a[1]) * 65536 + parseInt(a[2]) * 256 + parseInt(a[3]); +} + +function get_geo_cc(ip) { + if (ip.startsWith('[')) { + return '--'; + } + if (!tprq_geo4_loaded) { + return '--'; + } + var inum = ipv4_to_num(ip); + if (inum < 1 || inum >= 4294967295) { + return '--'; + } + var fg_prev = 0; + for (var fg in tprq_db_geo4) { + if (fg >= inum) { + if (fg == inum) { + if (fg <= inum && inum <= tprq_db_geo4[fg][0]) { + return tprq_db_geo4[fg][1]; + } else { + return '--'; + } + } else { + if (fg_prev <= inum && inum <= tprq_db_geo4[fg_prev][0]) { + return tprq_db_geo4[fg_prev][1]; + } else { + return '--'; + } + } + break; + } + fg_prev = fg; + } + return '--'; +} + +function is_js_allowed(w, p) { //(0ng) (1tmpok) (2all|3tls) + if (tprq_jsak_wud == 1) { + if (/^(asset|assets(|([0-9]{1,2}))|cdn|content(|s|s-cache)|js(|c|([0-9]{1,2}))|scr|script|scripts|static(|([0-9]{1,2})|-files|-files([0-9]{1,2}))|([a-z0-9]{1,20})-cdn|([a-z0-9]{1,20})\.cdn|cdn-([a-z0-9]{1,20}))\.(.*)$/.test(w)) { + if (tprq_jsakreqhs == 0) { + return 2; + } else { + if (p == 'https:') { + return 3; + } + } + } + } + if (tprq_jsak_cdnf == 1) { + if (['stackpath.bootstrapcdn.com', 'maxcdn.bootstrapcdn.com', 'netdna.bootstrapcdn.com', 'ajax.aspnetcdn.com', 'ajax.googleapis.com', 'cdn.jsdelivr.net', 'cdnjs.cloudflare.com', 'code.jquery.com', 'lib.sinaapp.com', 'libs.baidu.com', 'u.jimcdn.com', 'upcdn.b0.upaiyun.com', 'yandex.st', 'yastatic.net', 'oss.maxcdn.com', 'cdn.shopify.com', 'js.stripe.com', 'cdn.bootcss.com'].includes(w)) { + if (tprq_jsakreqhs == 0) { + return 2; + } else { + if (p == 'https:') { + return 3; + } + } + } + } + if (tprq_jsak_cdnd == 1) { + if (/^([a-z0-9-\.]{3,80})\.(akamaihd\.net|akamaized\.net|cloudfront\.net|vo\.msecnd\.net|core\.windows\.net|servicebus\.windows\.net|s3\.amazonaws\.com|ssl\.fastly\.net|storage\.googleapis\.com|netdna-cdn\.com|netdna-ssl\.com|idcfcloud\.com|azureedge\.net|rawgit\.com|cdn\.softlayer\.net|stream\.ne\.jp|geekzu\.org)$/.test(w)) { + if (tprq_jsakreqhs == 0) { + return 2; + } else { + if (p == 'https:') { + return 3; + } + } + } + } + if (tprq_oklist_js.includes('!' + w)) { + if (p == 'https:') { + return 3; + } else { + return 0; + } + } // !F + if (tprq_oklist_js.includes(w)) { + return 2; + } // F + if (tprq_tmpok_js.includes(w)) { + return 1; + } // F temp + var wb = get_realdomain(w); + if (tprq_oklist_js.includes('!.' + wb)) { + if (p == 'https:') { + return 3; + } else { + return 0; + } + } // !.D + if (tprq_oklist_js.includes('.' + wb)) { + return 2; + } // .D + return 0; +} + +function add_js_history(w) { + if (tprq_history_js.length > 300) { + tprq_history_js.shift(); + tprq_history_js.shift(); + } + if (!tprq_history_js.includes(w)) { + tprq_history_js.push(w); + } +} + +function is_3p_allowed(s, d) { //[used by main] + var s_base = '.' + get_realdomain(s); + var d_base = '.' + get_realdomain(d); + if (tprq_allowsubdom == 1) { + if (s_base == d_base) { + return [true, true]; + } + } + if (tprq_allowwidedm == 1) { + if (/^(asset|assets(|([0-9]{1,2}))|cdn|content(|s|s-cache)|thumbs(|([0-9]{1,2}))|media|mediaproxy|video|vid|img|image|images|static(|([0-9]{1,2})|-files|-files([0-9]{1,2}))|([a-z0-9]{1,10})-(imgs|images)-([a-z0-9]{1,10})|([a-z0-9]{1,20})-images|([a-z0-9]{1,20})-cdn|([a-z0-9]{1,20})\.cdn|cdn-([a-z0-9]{1,20}))\.(.*)$/.test(d)) { + return [true, true]; + } + } + if (tprq_allowcdnf == 1) { + if (['stackpath.bootstrapcdn.com', 'maxcdn.bootstrapcdn.com', 'netdna.bootstrapcdn.com', 'ajax.aspnetcdn.com', 'ajax.googleapis.com', 'cdn.jsdelivr.net', 'cdnjs.cloudflare.com', 'code.jquery.com', 'i.imgur.com', 'i.redditmedia.com', 'i.ytimg.com', 'image.jimcdn.com', 'lib.sinaapp.com', 'libs.baidu.com', 'u.jimcdn.com', 'upcdn.b0.upaiyun.com', 'us.v-cdn.net', 'images.v-cdn.net', 'yandex.st', 'yastatic.net', 'oss.maxcdn.com', 'i.gyazo.com', 'cdn.discordapp.com', 'img.youtube.com', 'cdn.shopify.com', 'js.stripe.com', 'cdn.bootcss.com'].includes(d)) { + return [true, true]; + } + } + if (tprq_allowcdnd == 1) { + if (/^([a-z0-9-\.]{3,80})\.(akamaihd\.net|akamaized\.net|cloudfront\.net|vo\.msecnd\.net|core\.windows\.net|servicebus\.windows\.net|s3\.amazonaws\.com|ssl\.fastly\.net|storage\.googleapis\.com|netdna-cdn\.com|netdna-ssl\.com|idcfcloud\.com|azureedge\.net|rawgit\.com|cdn\.softlayer\.net|stream\.ne\.jp|geekzu\.org)$/.test(d)) { + return [true, true]; + } + } + if (tprq_alloweytb == 1) { + if (/^((.*)\.gstatic|(.*)\.googlevideo|(i|s)\.ytimg|(.*)\.youtube|(.*)\.youtube-nocookie)\.com$/.test(d)) { + return [true, true]; + } + } + if (tprq_whitelist['*'] != undefined) { + if (tprq_whitelist['*'].includes(d)) { + return [true, true]; + } // *|F + if (tprq_whitelist['*'].includes(d_base)) { + return [true, true]; + } // *|.D + if (tprq_fmtdstrxp == 1) { + for (var i = 0; i < tprq_whitelist['*'].length; i++) { + if (tprq_whitelist['*'][i].startsWith('/')) { + if ((new RegExp(tprq_whitelist['*'][i].replace(/^\//g, ''))).test(d)) { + return [true, true]; + } + } + } + } + } + if (tprq_whitelist[s] != undefined) { + if (tprq_whitelist[s].includes(d)) { + return [true, true]; + } // F|F + if (tprq_whitelist[s].includes('*')) { + return [true, true]; + } // F|* + if (tprq_whitelist[s].includes(d_base)) { + return [true, true]; + } // F|.D + if (tprq_fmtdstrxp == 1) { + for (var i = 0; i < tprq_whitelist[s].length; i++) { + if (tprq_whitelist[s][i].startsWith('/')) { + if ((new RegExp(tprq_whitelist[s][i].replace(/^\//g, ''))).test(d)) { + return [true, true]; + } + } + } + } + } + if (tprq_whitelist[s_base] != undefined) { + if (tprq_whitelist[s_base].includes(d)) { + return [true, true]; + } // .D|F + if (tprq_whitelist[s_base].includes('*')) { + return [true, true]; + } // .D|* + if (tprq_whitelist[s_base].includes(d_base)) { + return [true, true]; + } // .D|.D + if (tprq_fmtdstrxp == 1) { + for (var i = 0; i < tprq_whitelist[s_base].length; i++) { + if (tprq_whitelist[s_base][i].startsWith('/')) { + if ((new RegExp(tprq_whitelist[s_base][i].replace(/^\//g, ''))).test(d)) { + return [true, true]; + } + } + } + } + } + if (tprq_whitetemp[s] != undefined) { + if (tprq_whitetemp[s].includes(d)) { + return [true, false]; + } + } //temporary + return [false, true]; +} + +function update_pair_data(_a, _d, _f, _p) { + var aB = _a; + var iFound = 0; + for (var p = 0; p < aB.length; p++) { + if (aB[p][0] == _d) { + aB[p][1] = _f; + aB[p][2] = _p; + iFound = 1; + break; + } + } + if (iFound == 0) { + aB.push([_d, _f, true]); + } //Dst, Allowed, WriteAllowed + return aB; +} + +function get_3p_rela_level(id, h) { + if (tprq_tab_dst[id] != undefined) { + if (tprq_tab_dst[id][h] != undefined) { + var _tda = tprq_tab_dst[id][h]; + var _tdl = _tda.length; + if (_tdl > 0) { //has TP + if (tprq_whitelist[h] != undefined) { + if (tprq_whitelist[h].includes('*')) { + return [0, tprq_flags[1]]; + } + } // FQDN * + var h_base = '.' + get_realdomain(h); + if (tprq_whitelist[h_base] != undefined) { + if (tprq_whitelist[h_base].includes('*')) { + return [0, tprq_flags[1]]; + } + } // .DOMAIN * + var _tac = _tdl; + for (var n = 0; n < _tdl; n++) { + if (_tda[n][1]) { + _tac -= 1; + } + } + if (_tac != _tdl) { + return [_tac, tprq_flags[1]]; + } else { + return [_tdl, tprq_flags[2]]; + } + } + } + } + return [0, tprq_flags[0]]; +} + +function is_mitm_host(x) { + if (/^((.*)\.|)(cloudflare\.com|incapsula\.com|withgoogle\.com|google\.com|sucuri\.net)$/.test(x)) { + return false; + } + if (tprq_mitmoklist.includes(x)) { + return false; + } + if (tprq_mitmoklist.includes('.' + get_realdomain(x))) { + return false; + } + return true; +} + +function get_decrtd(w, d, i) { //sub,dom,1 + if (w == d) { + return w; + } + var t_w = w.split("").reverse().join(""); + var t_d = d.split("").reverse().join(""); + if (i == 1) { + return t_w.replace(t_d + ".", ">u/<" + t_d + ">u<.").split("").reverse().join(""); + } + return t_w.replace(t_d + ".", ">b/<" + t_d + ">b<.").split("").reverse().join(""); +} + +function getpopline_js(_jslv, _fqdn, _label) { + var tmpchk_blk, tmpchk_mix, tmpval_mix, tmpchk_alw, tmpval_alw, tmpchk_https, tmpval_https, _res; + if (_jslv == 0) { + tmpchk_blk = ' checked'; + tmpchk_mix = ''; + tmpval_mix = 0; + tmpchk_alw = ''; + tmpval_alw = 0; + tmpchk_https = ''; + tmpval_https = 0; + } + if (_jslv == 1) { + tmpchk_blk = ''; + tmpchk_mix = ' checked'; + tmpval_mix = 1; + tmpchk_alw = ''; + tmpval_alw = 0; + tmpchk_https = ''; + tmpval_https = 0; + } + if (_jslv == 2) { + tmpchk_blk = ''; + tmpchk_mix = ''; + tmpval_mix = 0; + tmpchk_alw = ' checked'; + tmpval_alw = 1; + tmpchk_https = ''; + tmpval_https = 0; + } + if (_jslv == 3) { + tmpchk_blk = ''; + tmpchk_mix = ''; + tmpval_mix = 0; + tmpchk_alw = ' checked'; + tmpval_alw = 1; + tmpchk_https = ' checked'; + tmpval_https = 1; + } + if (tprq_popstyle != 2) { + _res = "<tr><td><input name=\"js_" + _fqdn + "\" type=\"radio\" value=\"x\"" + tmpchk_blk + "><input name=\"js_" + _fqdn + "\" data-usvxt=\"" + tmpval_mix + "\" type=\"radio\" data-wild=1 value=\"b\"" + tmpchk_mix + "><input name=\"js_" + _fqdn + "\" id=\"jsf_" + _fqdn + "\" data-usv=\"" + tmpval_alw + "\" type=\"radio\" value=\"c\"" + tmpchk_alw + ">"; + if (tprq_pophtps_js == 1) { + _res += "<input id=\"htps_js_" + _fqdn + "\" type=\"checkbox\" data-prev=\"" + tmpval_https + "\" data-wild=1 " + tmpchk_https + ">"; + } + _res += " <label for=\"jsf_" + _fqdn + "\" title=\"" + _fqdn + "\">" + _label + "</label></td></tr>"; + } else { + _res = "<tr><td><span class=\"switch-toggle switch-3 switch-candy\"><input id=\"tjs1_" + _fqdn + "\" name=\"js_" + _fqdn + "\" type=\"radio\" value=\"x\"" + tmpchk_blk + "><label for=\"tjs1_" + _fqdn + "\" class=\"ignr\">00</label><input id=\"tjs2_" + _fqdn + "\" name=\"js_" + _fqdn + "\" type=\"radio\" value=\"b\" data-usvxt=\"" + tmpval_mix + "\" data-wild=1" + tmpchk_mix + "><label for=\"tjs2_" + _fqdn + "\" class=\"ignr\">00</label><input id=\"jsf_" + _fqdn + "\" name=\"js_" + _fqdn + "\" type=\"radio\" value=\"c\" data-usv=\"" + tmpval_alw + "\"" + tmpchk_alw + "><label for=\"jsf_" + _fqdn + "\" class=\"ignr\">00</label><a></a></span>"; + if (tprq_pophtps_js == 1) { + _res += "<span class=\"switch-toggle switch-1 switch-candy\"><input id=\"htps_js_" + _fqdn + "\" type=\"checkbox\" data-prev=\"" + tmpval_https + "\" data-wild=1 " + tmpchk_https + "><label for=\"htps_js_" + _fqdn + "\" class=\"ignr\">00</label><a></a></span>"; + } + _res += " <span title=\"" + _fqdn + "\">" + _label + "</span></td></tr>"; + } + return _res; +} + +function getpop_extra(w, t) { + if (t == 1) { + if (tprq_popshowcc == 1 && tprq_popshowsubs == 1) { + if (tprq_dnspair[w]) { + return "<small>[" + tprq_dnspair[w][1] + "] </small>"; + } else { + return "<small>[--] </small>"; + } + } else { + return ''; + } + } + if (t == 2) { + if (tprq_popshowip == 1 && tprq_popshowsubs == 1) { + if (tprq_dnspair[w]) { + return w + ' (' + tprq_dnspair[w][0] + ')'; + } else { + return w + ' (' + tprq_mylang['unknown'] + ')'; + } + } else { + return w; + } + } +} + +function tprq_make_popup(xid, xhost, xprot) { + var xdomain = ''; + var xdotdom = '/'; + var xlabel = 'TPRB'; + var xicon = []; + var _res_sd = ''; + var _tmpSDck1 = []; + var _tmpSDck0 = []; + var _res_etc = ''; + var txx_line = ''; + var _tmpETck1 = []; + var _tmpETck0 = []; + var _res_js = ''; + var _tmpJSck1 = []; + var _tmpJSck0 = []; + var tmp_x_chk = ''; + var tmp_t_chk = ''; + var tmp_a_chk = ''; + var tmp_t_val = 0; + var tmp_a_val = 0; + var tmp_3pdom; + var _tmpJSlv; + var _dombasket = []; + var _res = '<table border="0" cellspacing="1" cellpadding="1">'; + if (xhost.length >= 2 && (xprot == 'http:' || xprot == 'https:')) { + xdomain = get_realdomain(xhost); + xdotdom = '.' + xdomain; + if (xdomain.endsWith('.onion')) { + xlabel = 'Tor Onion Service'; + } else { + xlabel = get_decrtd(xhost, xdomain, 0); + if (xlabel.length >= ((tprq_popshowip == 1) ? 38 : 50)) { + if (xdomain != xhost) { + xlabel = '~.<b>' + xdomain + '</b>'; + } + } + if (!is_ip_addr(xhost)) { + if (tprq_popshowcc == 1) { + if (tprq_dnspair[xhost]) { + xlabel += '<small> [' + tprq_dnspair[xhost][1] + ']</small>'; + } else { + xlabel += '<small> [--]</small>'; + } + } + if (tprq_popshowip == 1) { + if (tprq_dnspair[xhost]) { + xlabel += '<small> (<i>' + tprq_dnspair[xhost][0] + '</i>)</small>'; + } else { + xlabel += '<small> (' + tprq_mylang['unknown'] + ')</small>'; + } + } + } + } + if (tprq_showicon == 1) { + if (!is_ip_addr(xhost)) { + xicon = tprq_myuis; + } + } + } + if (tprq_tab_dst[xid] == undefined) { + tprq_tab_dst[xid] = []; + } + if ((tprq_poponoff == 1) ? tprq_poponoff_ison : true) { + if (tprq_tab_dst[xid] != undefined && xdomain != '') { + var _label_js = (tprq_pophtps_js == 1) ? '<span data-what="dlg_bmas"></span> <i>JS</i>' : '<span data-what="dlg_bma"></span> <i>JS</i>'; + if (tprq_jsfilter == 1) { + var _xjs = is_js_allowed(xhost, 'https:'); + if (_xjs > 0 && !tprq_history_js.includes(xhost)) { + add_js_history(xhost); + } + if (tprq_history_js.includes(xhost)) { + _res_js = getpopline_js(_xjs, xhost, '<u><span data-what="dtthisfqdn"></span></u>'); + } + } + var txx = (tprq_tab_dst[xid][xhost] != undefined) ? tprq_tab_dst[xid][xhost] : []; + if (txx.length > 0) { + if (tprq_showtemp != 1) { + for (var m in txx) { + if (txx[m][1]) { + tmp_a_chk = ' checked'; + tmp_a_val = 1; + } else { + tmp_a_chk = ''; + tmp_a_val = 0; + } + if (txx[m][0].endsWith(xdotdom)) { + if (tprq_showdotf == 1) { + if (!_dombasket.includes(xdomain)) { + _dombasket.push(xdomain); + } + } + txx_line = (tprq_popstyle == 2) ? "<tr><td><span class=\"switch-toggle switch-1 switch-candy\"><input id=\"idf_" + txx[m][0] + "\" name=\"f_" + txx[m][0] + "\" data-usv=\"" + tmp_a_val + "\" type=\"checkbox\"" + tmp_a_chk + "><label for=\"idf_" + txx[m][0] + "\" class=\"ignr\">00</label><a></a></span> <span title=\"" + getpop_extra(txx[m][0], 2) + "\">" + getpop_extra(txx[m][0], 1) + get_decrtd(txx[m][0], xdomain, 1) + "</span></td></tr>" : "<tr><td><input id=\"idf_" + txx[m][0] + "\" name=\"f_" + txx[m][0] + "\" data-usv=\"" + tmp_a_val + "\" type=\"checkbox\"" + tmp_a_chk + "> <label for=\"idf_" + txx[m][0] + "\" title=\"" + getpop_extra(txx[m][0], 2) + "\">" + getpop_extra(txx[m][0], 1) + get_decrtd(txx[m][0], xdomain, 1) + "</label></td></tr>"; + if (tmp_a_val == 0) { + _tmpSDck0.push([txx[m][0], txx_line]); + } else { + _tmpSDck1.push([txx[m][0], txx_line]); + } + if (tprq_jsfilter == 1 && txx[m][1]) { + if (tprq_history_js.includes(txx[m][0])) { + _tmpJSlv = is_js_allowed(txx[m][0], 'https:'); + if (_tmpJSlv == 0) { + _tmpJSck0.push([txx[m][0], getpopline_js(_tmpJSlv, txx[m][0], get_decrtd(txx[m][0], xdomain, 1))]); + } else { + _tmpJSck1.push([txx[m][0], getpopline_js(_tmpJSlv, txx[m][0], get_decrtd(txx[m][0], xdomain, 1))]); + } + } + } + } else { + if (tprq_showdotf == 1) { + tmp_3pdom = get_realdomain(txx[m][0]); + if (!_dombasket.includes(tmp_3pdom)) { + _dombasket.push(tmp_3pdom); + } + } + txx_line = (tprq_popstyle == 2) ? "<tr><td><span class=\"switch-toggle switch-1 switch-candy\"><input id=\"idf_" + txx[m][0] + "\" name=\"f_" + txx[m][0] + "\" data-usv=\"" + tmp_a_val + "\" type=\"checkbox\"" + tmp_a_chk + "><label for=\"idf_" + txx[m][0] + "\" class=\"ignr\">00</label><a></a></span> <span title=\"" + getpop_extra(txx[m][0], 2) + "\">" + getpop_extra(txx[m][0], 1) + txx[m][0] + "</span></td></tr>" : "<tr><td><input id=\"idf_" + txx[m][0] + "\" name=\"f_" + txx[m][0] + "\" data-usv=\"" + tmp_a_val + "\" type=\"checkbox\"" + tmp_a_chk + "> <label for=\"idf_" + txx[m][0] + "\" title=\"" + getpop_extra(txx[m][0], 2) + "\">" + getpop_extra(txx[m][0], 1) + txx[m][0] + "</label></td></tr>"; + if (tmp_a_val == 0) { + _tmpETck0.push([txx[m][0], txx_line]); + } else { + _tmpETck1.push([txx[m][0], txx_line]); + } + if (tprq_jsfilter == 1 && txx[m][1]) { + if (tprq_history_js.includes(txx[m][0])) { + _tmpJSlv = is_js_allowed(txx[m][0], 'https:'); + if (_tmpJSlv == 0) { + _tmpJSck0.push([txx[m][0], getpopline_js(_tmpJSlv, txx[m][0], txx[m][0])]); + } else { + _tmpJSck1.push([txx[m][0], getpopline_js(_tmpJSlv, txx[m][0], txx[m][0])]); + } + } + } + } + } + } else { + _res_sd = "<tr><td><span class=\"minortxt\"><small><span data-what=\"dlg_bma\"></span></small></span></td></tr>"; + for (var m in txx) { + if (txx[m][1]) { + if (txx[m][2]) { + tmp_x_chk = ''; + tmp_a_chk = ' checked'; + tmp_a_val = 1; + tmp_t_chk = ''; + tmp_t_val = 0; + } else { + tmp_x_chk = ''; + tmp_a_chk = ''; + tmp_a_val = 0; + tmp_t_chk = ' checked'; + tmp_t_val = 1; + } + } else { + tmp_x_chk = ' checked'; + tmp_a_chk = ''; + tmp_a_val = 0; + tmp_t_chk = ''; + tmp_t_val = 0; + } + if (txx[m][0].endsWith(xdotdom)) { + if (tprq_showdotf == 1) { + if (!_dombasket.includes(xdomain)) { + _dombasket.push(xdomain); + } + } + txx_line = (tprq_popstyle == 2) ? "<tr><td><span class=\"switch-toggle switch-3 switch-candy\"><input id=\"txf1_" + txx[m][0] + "\" name=\"f_" + txx[m][0] + "\" type=\"radio\" value=\"x\"" + tmp_x_chk + "><label for=\"txf1_" + txx[m][0] + "\" class=\"ignr\">00</label><input id=\"txf2_" + txx[m][0] + "\" name=\"f_" + txx[m][0] + "\" data-usvxt=\"" + tmp_t_val + "\" type=\"radio\" value=\"b\"" + tmp_t_chk + "><label for=\"txf2_" + txx[m][0] + "\" class=\"ignr\">00</label><input id=\"idf_" + txx[m][0] + "\" name=\"f_" + txx[m][0] + "\" data-usv=\"" + tmp_a_val + "\" type=\"radio\" value=\"c\"" + tmp_a_chk + "><label for=\"idf_" + txx[m][0] + "\" class=\"ignr\">00</label><a></a></span> <span title=\"" + getpop_extra(txx[m][0], 2) + "\">" + getpop_extra(txx[m][0], 1) + get_decrtd(txx[m][0], xdomain, 1) + "</span></td></tr>" : "<tr><td><input name=\"f_" + txx[m][0] + "\" type=\"radio\" value=\"x\"" + tmp_x_chk + "><input name=\"f_" + txx[m][0] + "\" data-usvxt=\"" + tmp_t_val + "\" type=\"radio\" value=\"b\"" + tmp_t_chk + "><input id=\"idf_" + txx[m][0] + "\" name=\"f_" + txx[m][0] + "\" data-usv=\"" + tmp_a_val + "\" type=\"radio\" value=\"c\"" + tmp_a_chk + "> <label for=\"idf_" + txx[m][0] + "\" title=\"" + getpop_extra(txx[m][0], 2) + "\">" + getpop_extra(txx[m][0], 1) + get_decrtd(txx[m][0], xdomain, 1) + "</label></td></tr>"; + if (tmp_a_val == 0 && tmp_t_val == 0) { + _tmpSDck0.push([txx[m][0], txx_line]); + } else { + _tmpSDck1.push([txx[m][0], txx_line]); + } + if (tprq_jsfilter == 1 && txx[m][1]) { + if (tprq_history_js.includes(txx[m][0])) { + _tmpJSlv = is_js_allowed(txx[m][0], 'https:'); + if (_tmpJSlv == 0) { + _tmpJSck0.push([txx[m][0], getpopline_js(_tmpJSlv, txx[m][0], get_decrtd(txx[m][0], xdomain, 1))]); + } else { + _tmpJSck1.push([txx[m][0], getpopline_js(_tmpJSlv, txx[m][0], get_decrtd(txx[m][0], xdomain, 1))]); + } + } + } + } else { + if (tprq_showdotf == 1) { + tmp_3pdom = get_realdomain(txx[m][0]); + if (!_dombasket.includes(tmp_3pdom)) { + _dombasket.push(tmp_3pdom); + } + } + txx_line = (tprq_popstyle == 2) ? "<tr><td><span class=\"switch-toggle switch-3 switch-candy\"><input id=\"txf1_" + txx[m][0] + "\" name=\"f_" + txx[m][0] + "\" type=\"radio\" value=\"x\"" + tmp_x_chk + "><label for=\"txf1_" + txx[m][0] + "\" class=\"ignr\">00</label><input id=\"txf2_" + txx[m][0] + "\" name=\"f_" + txx[m][0] + "\" data-usvxt=\"" + tmp_t_val + "\" type=\"radio\" value=\"b\"" + tmp_t_chk + "><label for=\"txf2_" + txx[m][0] + "\" class=\"ignr\">00</label><input id=\"idf_" + txx[m][0] + "\" name=\"f_" + txx[m][0] + "\" data-usv=\"" + tmp_a_val + "\" type=\"radio\" value=\"c\"" + tmp_a_chk + "><label for=\"idf_" + txx[m][0] + "\" class=\"ignr\">00</label><a></a></span> <span title=\"" + getpop_extra(txx[m][0], 2) + "\">" + getpop_extra(txx[m][0], 1) + txx[m][0] + "</span></td></tr>" : "<tr><td><input name=\"f_" + txx[m][0] + "\" type=\"radio\" value=\"x\"" + tmp_x_chk + "><input name=\"f_" + txx[m][0] + "\" data-usvxt=\"" + tmp_t_val + "\" type=\"radio\" value=\"b\"" + tmp_t_chk + "><input id=\"idf_" + txx[m][0] + "\" name=\"f_" + txx[m][0] + "\" data-usv=\"" + tmp_a_val + "\" type=\"radio\" value=\"c\"" + tmp_a_chk + "> <label for=\"idf_" + txx[m][0] + "\" title=\"" + getpop_extra(txx[m][0], 2) + "\">" + getpop_extra(txx[m][0], 1) + txx[m][0] + "</label></td></tr>"; + if (tmp_a_val == 0 && tmp_t_val == 0) { + _tmpETck0.push([txx[m][0], txx_line]); + } else { + _tmpETck1.push([txx[m][0], txx_line]); + } + if (tprq_jsfilter == 1 && txx[m][1]) { + if (tprq_history_js.includes(txx[m][0])) { + _tmpJSlv = is_js_allowed(txx[m][0], 'https:'); + if (_tmpJSlv == 0) { + _tmpJSck0.push([txx[m][0], getpopline_js(_tmpJSlv, txx[m][0], txx[m][0])]); + } else { + _tmpJSck1.push([txx[m][0], getpopline_js(_tmpJSlv, txx[m][0], txx[m][0])]); + } + } + } + } + } + } + if (tprq_pop_sort == 2 || tprq_pop_sort == 3) { + _tmpSDck1 = _tmpSDck1.sort(function (a, b) { + if (a[0] < b[0]) { + return -1; + } else { + if (a[0] > b[0]) { + return 1; + } + }; + return 0; + }); + _tmpSDck0 = _tmpSDck0.sort(function (a, b) { + if (a[0] < b[0]) { + return -1; + } else { + if (a[0] > b[0]) { + return 1; + } + }; + return 0; + }); + _tmpETck1 = _tmpETck1.sort(function (a, b) { + if (a[0] < b[0]) { + return -1; + } else { + if (a[0] > b[0]) { + return 1; + } + }; + return 0; + }); + _tmpETck0 = _tmpETck0.sort(function (a, b) { + if (a[0] < b[0]) { + return -1; + } else { + if (a[0] > b[0]) { + return 1; + } + }; + return 0; + }); + _tmpJSck1 = _tmpJSck1.sort(function (a, b) { + if (a[0] < b[0]) { + return -1; + } else { + if (a[0] > b[0]) { + return 1; + } + }; + return 0; + }); + _tmpJSck0 = _tmpJSck0.sort(function (a, b) { + if (a[0] < b[0]) { + return -1; + } else { + if (a[0] > b[0]) { + return 1; + } + }; + return 0; + }); + } + if (tprq_pop_sort == 0 || tprq_pop_sort == 2) { + _res_sd += (_tmpSDck1.concat(_tmpSDck0)).map(function (v, i) { + return v[1]; + }).join(''); + _res_etc = (_tmpETck1.concat(_tmpETck0)).map(function (v, i) { + return v[1]; + }).join(''); + _res_js += (_tmpJSck1.concat(_tmpJSck0)).map(function (v, i) { + return v[1]; + }).join(''); + } + if (tprq_pop_sort == 1 || tprq_pop_sort == 3) { + _res_sd += (_tmpSDck0.concat(_tmpSDck1)).map(function (v, i) { + return v[1]; + }).join(''); + _res_etc = (_tmpETck0.concat(_tmpETck1)).map(function (v, i) { + return v[1]; + }).join(''); + _res_js += (_tmpJSck0.concat(_tmpJSck1)).map(function (v, i) { + return v[1]; + }).join(''); + } + if (_res_js != '') { + _res_js = '<tr><td><br></td></tr><tr><td><span class="minortxt"><small>' + _label_js + '</small></span></td></tr>' + _res_js; + } + if (tprq_showdotf == 1) { + var _res_wcd = ''; + var _tmpWDck1 = []; + var _tmpWDck0 = []; + var a_must = false; + var _twlst_xh = tprq_whitelist[xhost]; + var _twlst_dm = tprq_whitelist[xdotdom]; + var _twlst_ak = tprq_whitelist['*']; + for (var f = 0; f < _dombasket.length; f++) { + if (is_ip_addr(_dombasket[f])) { + continue; + } //ignore IP + a_must = false; + if (_twlst_xh != undefined) { + if (_twlst_xh.includes('.' + _dombasket[f])) { + a_must = true; + } + } + if (!a_must) { + if (_twlst_dm != undefined) { + if (_twlst_dm.includes('.' + _dombasket[f])) { + a_must = true; + } + } + } + if (!a_must) { + if (_twlst_ak != undefined) { + if (_twlst_ak.includes('.' + _dombasket[f])) { + a_must = true; + } + } + } + if (a_must) { + tmp_a_chk = ' checked'; + tmp_a_val = 1; + } else { + tmp_a_chk = ''; + tmp_a_val = 0; + } + txx_line = (tprq_popstyle == 2) ? "<tr><td><span class=\"switch-toggle switch-1 switch-candy\"><input id=\"idf_." + _dombasket[f] + "\" name=\"f_." + _dombasket[f] + "\" data-usv=\"" + tmp_a_val + "\" data-wild=1 type=\"checkbox\"" + tmp_a_chk + "><label for=\"idf_." + _dombasket[f] + "\" class=\"ignr\">00</label><a></a></span> <span title=\"*." + _dombasket[f] + "\"><b>*.</b>" + _dombasket[f] + "</span></td></tr>" : "<tr><td><input id=\"idf_." + _dombasket[f] + "\" name=\"f_." + _dombasket[f] + "\" data-usv=\"" + tmp_a_val + "\" data-wild=1 type=\"checkbox\"" + tmp_a_chk + "> <label for=\"idf_." + _dombasket[f] + "\" title=\"*." + _dombasket[f] + "\"><b>*.</b>" + _dombasket[f] + "</label></td></tr>"; + if (tmp_a_val == 0) { + _tmpWDck0.push([_dombasket[f], txx_line]); + } else { + _tmpWDck1.push([_dombasket[f], txx_line]); + } + } + if (tprq_pop_sort == 2 || tprq_pop_sort == 3) { + _tmpWDck1 = _tmpWDck1.sort(function (a, b) { + if (a[0] < b[0]) { + return -1; + } else { + if (a[0] > b[0]) { + return 1; + } + }; + return 0; + }); + _tmpWDck0 = _tmpWDck0.sort(function (a, b) { + if (a[0] < b[0]) { + return -1; + } else { + if (a[0] > b[0]) { + return 1; + } + }; + return 0; + }); + } + if (tprq_pop_sort == 0 || tprq_pop_sort == 2) { + _res_wcd = (_tmpWDck1.concat(_tmpWDck0)).map(function (v, i) { + return v[1]; + }).join(''); + } + if (tprq_pop_sort == 1 || tprq_pop_sort == 3) { + _res_wcd = (_tmpWDck0.concat(_tmpWDck1)).map(function (v, i) { + return v[1]; + }).join(''); + } + if (tprq_showtemp == 1 && _res_wcd != '') { + _res_wcd = "<tr><td><span class=\"minortxt\"><small><span data-what=\"allsdom\"></span></small></span></td></tr>" + _res_wcd; + } + if (!tprq_amdroid) { + _res += '<tr><td valign="top"><table border="0" cellspacing="1" cellpadding="1">' + _res_sd + _res_etc + _res_js + '</table></td><td valign="top"><table border="0" cellspacing="1" cellpadding="1">' + _res_wcd + '</table></td></tr></table>'; + } else { + _res += _res_sd + _res_etc + _res_js + '<tr><td><br></td></tr>' + _res_wcd + '</table>'; + } + } else { + _res += _res_sd + _res_etc + _res_js + '</table>'; + } + } else { + if (_res_js == '') { + _res += '<tr><td align="center"><i><span data-what="no3pcon"></span></i></td></tr></table>'; + } else { + _res += '<tr><td><span class="minortxt"><small>' + _label_js + '</small></span></td></tr>' + _res_js + '</table>'; + } + } + } else { + _res += '<tr><td align="center"><i><span data-what="no3pcon"></span></i></td></tr></table>'; + } //not domain + } else { + _res += '<tr><td align="center"><i><span data-what="offmode"></span></i></td></tr></table>'; + } + return [tprq_mylang, xlabel, _res, xicon, tprq_showxbtn, tprq_pop_bid, tprq_poponoff, tprq_popstyle, [tprq_poprclk, tprq_poplbla], [0, 0]]; +} + +function tprq_updicon(tid, url) { + if (tprq_poponoff == 1) { + if (!tprq_poponoff_ison) { + browser.browserAction.setTitle({ + tabId: tid, + title: "TPRB (OFF)" + }); + browser.browserAction.setBadgeText({ + tabId: tid, + text: "OFF!" + }); + browser.browserAction.setIcon({ + tabId: tid, + path: 'icons/icon-32.png' + }); + return; + } + } + var tmp_iu = new URL(url); + if ((tmp_iu.protocol != 'http:' && tmp_iu.protocol != 'https:') || tmp_iu.hostname.length < 1) { + browser.browserAction.setTitle({ + tabId: tid, + title: "TPRB" + }); + browser.browserAction.setBadgeText({ + tabId: tid, + text: "" + }); + browser.browserAction.setIcon({ + tabId: tid, + path: tprq_flags[0] + }); + return; + } //local resource. + var gl = get_3p_rela_level(tid, tmp_iu.hostname); + browser.browserAction.setTitle({ + tabId: tid, + title: "TPRB (" + gl[0].toString() + ")" + }); + if (tprq_showcntr == 1 && gl[0] >= 1) { + if (gl[0] < 1000) { + browser.browserAction.setBadgeText({ + tabId: tid, + text: gl[0].toString() + }); + } else { + browser.browserAction.setBadgeText({ + tabId: tid, + text: "1K+" + }); + } + } else { + browser.browserAction.setBadgeText({ + tabId: tid, + text: "" + }); + } + browser.browserAction.setIcon({ + tabId: tid, + path: gl[1] + }); + return; +} + +function tprq_modwl_add(s, d, tid, okwrite) { + if (tprq_whitelist[s] == undefined) { + tprq_whitelist[s] = []; + } + if (tprq_whitetemp[s] == undefined) { + tprq_whitetemp[s] = []; + } + if (okwrite) { + if (!tprq_whitelist[s].includes(d)) { + tprq_whitelist[s].push(d); + } + } else { + if (!tprq_whitetemp[s].includes(d)) { + tprq_whitetemp[s].push(d); + } + } + if (!d.startsWith('.')) { + tprq_tab_dst[tid][s] = update_pair_data(tprq_tab_dst[tid][s], d, true, okwrite); + } else { + var tdwu = []; + var tdts = tprq_tab_dst[tid][s]; + if (tdts.length > 0) { + for (var g in tdts) { + if (tdts[g][0].endsWith(d)) { + tdwu.push(tdts[g][0]); + } + } + } + for (var h = 0; h < tdwu.length; h++) { + if (tprq_whitelist[s].includes(tdwu[h])) { + if (tprq_whitelist[s].indexOf(tdwu[h]) > -1) { + tprq_whitelist[s].splice(tprq_whitelist[s].indexOf(tdwu[h]), 1); + } + } + if (tprq_whitetemp[s].includes(tdwu[h])) { + if (tprq_whitetemp[s].indexOf(tdwu[h]) > -1) { + tprq_whitetemp[s].splice(tprq_whitetemp[s].indexOf(tdwu[h]), 1); + } + } + tprq_tab_dst[tid][s] = update_pair_data(tprq_tab_dst[tid][s], tdwu[h], true, okwrite); + } + } +} + +function tprq_modwl_remove(s, d, tid, okwrite) { + if (tprq_whitelist[s] == undefined) { + tprq_whitelist[s] = []; + } + if (tprq_whitetemp[s] == undefined) { + tprq_whitetemp[s] = []; + } + if (okwrite) { + if (tprq_whitelist[s].includes(d)) { + if (tprq_whitelist[s].indexOf(d) > -1) { + tprq_whitelist[s].splice(tprq_whitelist[s].indexOf(d), 1); + } + } + } + if (tprq_whitetemp[s].includes(d)) { + if (tprq_whitetemp[s].indexOf(d) > -1) { + tprq_whitetemp[s].splice(tprq_whitetemp[s].indexOf(d), 1); + } + } + if (!d.startsWith('.')) { + tprq_tab_dst[tid][s] = update_pair_data(tprq_tab_dst[tid][s], d, false, okwrite); + } else { + var tdwu = []; + var tdts = tprq_tab_dst[tid][s]; + if (tdts.length > 0) { + for (var g in tdts) { + if (tdts[g][0].endsWith(d)) { + tdwu.push(tdts[g][0]); + } + } + } + for (var h = 0; h < tdwu.length; h++) { + if (tprq_whitelist[s].includes(tdwu[h])) { + if (tprq_whitelist[s].indexOf(tdwu[h]) > -1) { + tprq_whitelist[s].splice(tprq_whitelist[s].indexOf(tdwu[h]), 1); + } + } + if (tprq_whitetemp[s].includes(tdwu[h])) { + if (tprq_whitetemp[s].indexOf(tdwu[h]) > -1) { + tprq_whitetemp[s].splice(tprq_whitetemp[s].indexOf(tdwu[h]), 1); + } + } //just in case + tprq_tab_dst[tid][s] = update_pair_data(tprq_tab_dst[tid][s], tdwu[h], false, okwrite); + } + } +} + +function tprq_modjs_add(d, okwrite, ishttps) { + if (okwrite) { + if (ishttps) { + if (tprq_oklist_js.includes(d)) { + if (tprq_oklist_js.indexOf(d) > -1) { + tprq_oklist_js.splice(tprq_oklist_js.indexOf(d), 1); + } + }; + if (!tprq_oklist_js.includes('!' + d)) { + tprq_oklist_js.push('!' + d); + } + } else { + if (tprq_oklist_js.includes('!' + d)) { + if (tprq_oklist_js.indexOf('!' + d) > -1) { + tprq_oklist_js.splice(tprq_oklist_js.indexOf('!' + d), 1); + } + }; + if (!tprq_oklist_js.includes(d)) { + tprq_oklist_js.push(d); + } + } + } else { + if (!tprq_tmpok_js.includes(d)) { + tprq_tmpok_js.push(d); + } + } +} + +function tprq_modjs_remove(d, okwrite) { + if (okwrite) { + if (tprq_oklist_js.includes(d)) { + if (tprq_oklist_js.indexOf(d) > -1) { + tprq_oklist_js.splice(tprq_oklist_js.indexOf(d), 1); + } + }; + if (tprq_oklist_js.includes('!' + d)) { + if (tprq_oklist_js.indexOf('!' + d) > -1) { + tprq_oklist_js.splice(tprq_oklist_js.indexOf('!' + d), 1); + } + } + } + if (tprq_tmpok_js.includes(d)) { + if (tprq_tmpok_js.indexOf(d) > -1) { + tprq_tmpok_js.splice(tprq_tmpok_js.indexOf(d), 1); + } + } +} + +function set_cspvalue(x, h, diejs, ijsallow) { + var ssmode = (tprq_jslineok == 1) ? "'unsafe-inline'" : "'none'"; + var x_src = (diejs) ? false : true; + var x_reporthost = (diejs) ? h : '0'; + var x_uri = false; + var y_man = false; + var y_bamc = (tprq_mixignore == 0) ? false : true; + var x_worker = (tprq_noworker == 1 && ijsallow == 0) ? false : true; + var v_font = (tprq_blockfnt == 1) ? false : true; + var v_object = (tprq_blockobj == 1) ? false : true; + var v_media = (tprq_blockmid == 1) ? false : true; + var v_image = (tprq_blockimg == 1) ? false : true; + var xxxi; + var xx = x.split(';'); + for (var xi = 0; xi < xx.length; xi++) { + xxxi = xx[xi].trim().toLowerCase(); + if (xxxi.startsWith('report-uri')) { + x_uri = true; + xx[xi] = "report-uri https://0.0.0.0/tprb_csp/" + x_reporthost; + continue; + } + if (xxxi.startsWith('report-to')) { + xx[xi] = ''; + continue; + } + if (xxxi.startsWith('script-src') && !x_src) { + x_src = true; + xx[xi] = "script-src " + ssmode; + continue; + } + if (xxxi.startsWith('worker-src') && !x_worker) { + x_worker = true; + xx[xi] = "worker-src 'none'"; + continue; + } + if (xxxi.startsWith('font-src') && !v_font) { + v_font = true; + xx[xi] = "font-src 'none'"; + continue; + } + if (xxxi.startsWith('object-src') && !v_object) { + v_object = true; + xx[xi] = "object-src 'none'"; + continue; + } + if (xxxi.startsWith('media-src') && !v_media) { + v_media = true; + xx[xi] = "media-src 'none'"; + continue; + } + if (xxxi.startsWith('img-src') && !v_image) { + v_image = true; + xx[xi] = "img-src 'none'"; + continue; + } + if (xxxi.startsWith('manifest-src')) { + y_man = true; + xx[xi] = "manifest-src 'none'"; + continue; + } + if (xxxi.startsWith('block-all-mixed-content') && !y_bamc) { + y_bamc = true; + xx[xi] = "block-all-mixed-content"; + continue; + } + } + if (!x_src) { + xx.push("script-src " + ssmode); + } + if (!x_uri) { + xx.push("report-uri https://0.0.0.0/tprb_csp/" + x_reporthost); + } + if (!x_worker) { + xx.push("worker-src 'none'"); + } + if (!v_font) { + xx.push("font-src 'none'"); + } + if (!v_object) { + xx.push("object-src 'none'"); + } + if (!v_media) { + xx.push("media-src 'none'"); + } + if (!v_image) { + xx.push("img-src 'none'"); + } + if (!y_man) { + xx.push("manifest-src 'none'"); + } + if (!y_bamc) { + xx.push("block-all-mixed-content"); + } + return xx.filter(v => v != '').join(';'); +} +if (tprq_init == 0) { + tprq_init = 1; + rqbl_loadcfg(); + tprq_init = 2; +} +//=== +browser.webRequest.onBeforeRequest.addListener(function (reqinfo) { + if (tprq_poponoff == 1) { + if (!tprq_poponoff_ison) { + return; + } + } + var rqlink_dst = document.createElement('a'); + rqlink_dst.setAttribute('href', reqinfo.url); + var rq_dst_host = rqlink_dst.hostname; + var rq_dst_prot = rqlink_dst.protocol; + var rq_dst_path = rqlink_dst.pathname; + var rq_dst_srch = rqlink_dst.search; + rqlink_dst = null; + var rq_dst_inet = ['http:', 'https:', 'ws:', 'wss:'].includes(rq_dst_prot); + if (rq_dst_prot == 'ftp:') { + return; + } + if (rq_dst_inet) { + if (!/^((([a-z0-9_]{1})([a-z0-9_.-]{1,})([a-z]{1}))|(([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3}))|(\[([a-z0-9:\.]{4,45})\]))$/.test(rq_dst_host)) { + console.log('TPRB: Blocked: Abnormal:', rq_dst_host); + return { + cancel: true + }; + } + } + var rq_dst_what = ''; + if (tprq_jsnoxss == 1) { + if (rq_dst_inet) { + if (rq_dst_srch.length > 5) { + rq_dst_what = rq_dst_srch; + } //GET + if (reqinfo.requestBody != undefined) { + if (reqinfo.requestBody['formData'] != undefined) { + var tmp_rrfd = JSON.stringify(reqinfo.requestBody['formData']); + if (tmp_rrfd.length > 11) { + rq_dst_what += tmp_rrfd; + } + } + } //POST + rq_dst_what = rq_dst_what.toLowerCase(); + } + } + //JSBlocking + if (tprq_jsfilter == 1) { + if (reqinfo.type == 'csp_report') { + if (reqinfo.url.startsWith('https://0.0.0.0/tprb_csp/')) { + var _csp_domain = reqinfo.url.replace('https://0.0.0.0/tprb_csp/', ''); + if (/^([0-9a-z.*_\[\]\:-]{2,})$/.test(_csp_domain)) { + add_js_history(_csp_domain); + } + } + return { + cancel: true + }; + } + } + if (tprq_jsnoxss == 1) { + if (rq_dst_what != '') { + var _xss_found = 0; + for (var le = 0; le < tprq_db_xss1.length; le++) { + if (rq_dst_what.includes(tprq_db_xss1[le])) { + _xss_found += 1; + break; + } + } + if (_xss_found >= 1) { + for (var le = 0; le < tprq_db_xss2.length; le++) { + if (rq_dst_what.includes(tprq_db_xss2[le])) { + _xss_found += 1; + break; + } + } + for (var le = 0; le < tprq_db_xss3.length; le++) { + if (rq_dst_what.includes(tprq_db_xss3[le])) { + _xss_found += 1; + break; + } + } + if (_xss_found >= 3) { + console.log('TPRB: Blocked: XSS:', reqinfo.url); + return { + cancel: true + }; + } + } + } + } + //badURL + if (rq_dst_host == '0.0.0.0' || rq_dst_host == 'noscript-csp.invalid') { + return { + cancel: true + }; + } + if (tprq_denypuny == 1) { + if (/^(xn--|([0-9a-z_.-]{1,60})\.xn--)(.*)$/.test(rq_dst_host)) { + console.log('TPRB: Blocked: Punycode domain:', rq_dst_host); + return { + cancel: true + }; + } + } + if (tprq_redir2htps == 1) { + if (!rq_dst_host.endsWith('.onion') && !rq_dst_host.endsWith('.i2p')) { + if (rq_dst_prot == 'http:') { + console.log('TPRB: Redirect: to https:', rq_dst_host); + return { + redirectUrl: reqinfo.url.replace('http://', 'https://') + }; + } + if (rq_dst_prot == 'ws:') { + console.log('TPRB: Redirect: to wss:', rq_dst_host); + return { + redirectUrl: reqinfo.url.replace('ws://', 'wss://') + }; + } + } + } + if (tprq_secureonly == 1) { + if (rq_dst_prot == 'http:' || rq_dst_prot == 'ws:') { + if (!rq_dst_host.endsWith('.onion') && !rq_dst_host.endsWith('.i2p')) { + console.log('TPRB: Blocked: Insecure:', reqinfo.url); + return { + cancel: true + }; + } + } + } + if (tprq_onlygp == 1) { + if (reqinfo.method != undefined && reqinfo.method != 'GET' && reqinfo.method != 'POST') { + console.log('TPRB: Blocked: Method:', reqinfo.method); + return { + cancel: true + }; + } + } + if (tprq_denysocks == 1) { + if (rq_dst_prot == 'ws:' || rq_dst_prot == 'wss:') { + if (rq_dst_host != '127.0.0.1') { + console.log('TPRB: Blocked: WebSocket:', reqinfo.url); + return { + cancel: true + }; + } + } + } + var rq_dst_hbase = get_realdomain(rq_dst_host); + if (tprq_fwdom >= 1) { + if (tprq_black_nrml.includes(rq_dst_host)) { + console.log('TPRB: Blocked: Blacklist:', rq_dst_host); + if (reqinfo.type == 'image') { + return { + redirectUrl: 'data:image/gif;base64,' + tprq_bl_img + }; + } else { + return { + cancel: true + }; + } + } + if (tprq_black_nrml.includes('.' + rq_dst_hbase)) { + console.log('TPRB: Blocked: Blacklist:', rq_dst_host); + if (reqinfo.type == 'image') { + return { + redirectUrl: 'data:image/gif;base64,' + tprq_bl_img + }; + } else { + return { + cancel: true + }; + } + } + if (tprq_fwdom == 2) { + for (var i = 0; i < tprq_black_regx.length; i++) { + if ((new RegExp(tprq_black_regx[i].replace(/^\//g, ''))).test(rq_dst_host)) { + console.log('TPRB: Blocked: Blacklist:', rq_dst_host); + if (reqinfo.type == 'image') { + return { + redirectUrl: 'data:image/gif;base64,' + tprq_bl_img + }; + } else { + return { + cancel: true + }; + } + } + } + } + } + if (reqinfo.type == 'main_frame') { + if (tprq_cleanparam == 1) { + if (rq_dst_srch.length > 7) { + var _clnprm_must = false; + var _clnprm = rq_dst_srch.replace('?', '').split('&'); + var _cm_tv; + for (var _cm = 0; _cm < _clnprm.length; _cm++) { + _cm_tv = _clnprm[_cm].split('=', 2); + if (_cm_tv.length != 2 || _cm_tv[0].length < 2) { + continue; + } + if (/^(action_|algo_|fb_|ga_|hmb_|pd_rd_|pf_rd_|utm_)(.*)$/.test(_cm_tv[0])) { + _clnprm_must = true; + _clnprm[_cm] = ''; + continue; + } + if (_cm_tv[0] == 'sid') { + if (_cm_tv[1] != undefined) { + if (_cm_tv[1].length >= 32) { + _clnprm_must = true; + _clnprm[_cm] = ''; + continue; + } + } + } + if (['aspxerrorpath', 'aff_id', 'a_aid', 'btsid', 'cvid', 'feature', 'from', 'gclid', 'gs_l', 'gws_rd', 'ie', 'mbid', 'phpsessid', 'pvid', 'ref_', 'ref_src', 'referer', 'sc', 'sdsrc', 'smid', 'snr', 'spm', 'sr', 'sr_source', 'src', 'trackingid', 'trk', 'ved', 'yclid'].includes(_cm_tv[0].toLowerCase())) { + _clnprm_must = true; + _clnprm[_cm] = ''; + continue; + } + } + if (_clnprm_must) { + _clnprm = '?' + (_clnprm.filter(v => v != '').join('&')); + if (rq_dst_srch != _clnprm) { + if (_clnprm == '?') { + _clnprm = ''; + }; + console.log('TPRB: Redirect: Dirty query:', reqinfo.url); + return { + redirectUrl: rq_dst_prot + '//' + rq_dst_host + rq_dst_path + _clnprm + }; + } + } + } + } + } + if (tprq_scan_mitm == 1) { + if (tprq_bkt_mitms.includes(rq_dst_host)) { + if (is_mitm_host(rq_dst_host)) { + browser.tabs.executeScript(reqinfo.tabId, { + matchAboutBlank: true, + runAt: 'document_end', + code: 'window.stop();alert("TPRB: %%WRN_TITLE%%\\n\\n%%WRN_ACTN%%\\n%%WRN_DST%%");'.replace('%%WRN_TITLE%%', tprq_mylang['nf_dtmitm']).replace('%%WRN_ACTN%%', tprq_mylang['nf_acted']).replace('%%WRN_DST%%', rq_dst_host) + }); + console.log('TPRB: Known MITM Blocked:', rq_dst_host); + return { + cancel: true + }; + } + } + } + //Allow_1P + var rq_tab_id = reqinfo.tabId; + if (reqinfo.type == 'main_frame') { + if (tprq_tab_dst[rq_tab_id] != undefined) { // Remove old DST array + var _firstkey = ''; + var _rti_cnt = 0; + for (var o in tprq_tab_dst[rq_tab_id]) { + if (_firstkey == '') { + _firstkey = o; + }; + _rti_cnt += 1; + if (_rti_cnt >= 6) { + break; + } + } + if (_rti_cnt >= 6 && _firstkey.length >= 2) { + if (tprq_tab_dst[rq_tab_id][_firstkey] != undefined) { + tprq_tab_dst[rq_tab_id][_firstkey] = []; + delete tprq_tab_dst[rq_tab_id][_firstkey]; + } + } + } + return; + } + var rqlink_src = document.createElement('a'); + var rqlink_resolve_src = 0; + if (reqinfo.frameAncestors != undefined) { + if (reqinfo.frameAncestors[0] != undefined) { + if (reqinfo.frameAncestors[reqinfo.frameAncestors.length - 1].url != undefined) { + rqlink_resolve_src = 1; + rqlink_src.setAttribute('href', reqinfo.frameAncestors[reqinfo.frameAncestors.length - 1].url); + } + } + } + if (rqlink_resolve_src == 0) { + if (reqinfo.documentUrl) { + rqlink_src.setAttribute('href', reqinfo.documentUrl); + } else { + rqlink_src.setAttribute('href', reqinfo.originUrl); + } + } //FX52(orgU,A-B|B-C) or FX59+(docU,A-B=C) + var rq_src_host = rqlink_src.hostname; + var rq_src_prot = rqlink_src.protocol; + rqlink_src = null; + var rq_src_inet = ['http:', 'https:', 'ws:', 'wss:'].includes(rq_src_prot); + if (rq_src_inet && rq_dst_prot == 'file:') { + console.log('TPRB: Blocked: I2L'); + return { + cancel: true + }; + } + if (rq_dst_inet && rq_src_prot == 'file:') { + if (tprq_l2iignore == 0) { + console.log('TPRB: Blocked: L2I'); + return { + cancel: true + }; + } else { + return; + } + } + if (rq_src_prot == 'https:' && (rq_dst_prot == 'http:' || rq_dst_prot == 'ws:')) { + if (tprq_mixignore == 0) { + console.log('TPRB: Blocked: HTTPS-to-insecure'); + return { + cancel: true + }; + } + } + if (!rq_dst_inet || rq_dst_host.length < 2) { + return; + } + //datatype + if (tprq_blockfnt == 1) { + if (['beacon', 'csp_report', 'font', 'ping'].includes(reqinfo.type)) { + console.log('TPRB: Blocked: bad resource type:', reqinfo.url); + return { + cancel: true + }; + } + if (['fonts.googleapis.com', 'use.typekit.net', 'use.typekit.com', 'use.edgefonts.net', 'fast.fonts.net', 'use.fontawesome.com', 'use.fortawesome.com', 'use.fonticons.com', 'hello.myfonts.net'].includes(rq_dst_host)) { + console.log('TPRB: Blocked: Web Fonts'); + return { + cancel: true + }; + } + if (reqinfo.type == 'stylesheet') { + if (/^(.*)\/(font-awesome|MyFontsWebfontsKit|fonts\.css)(.*)$/.test(rq_dst_path)) { + console.log('TPRB: Blocked: Fonts CSS'); + return { + cancel: true + }; + } + } + if (reqinfo.type == 'script') { + if (rq_dst_path.includes('/webfont')) { + console.log('TPRB: Blocked: Fonts JS'); + return { + cancel: true + }; + } + } + } + if (tprq_blockmid == 1) { + if (reqinfo.type == 'media') { + console.log('TPRB: Blocked: media:', reqinfo.url); + return { + cancel: true + }; + } + } + if (tprq_blockimg == 1) { + if (reqinfo.type == 'image' || reqinfo.type == 'imageset') { + return { + redirectUrl: 'data:image/gif;base64,' + tprq_bl_img + }; + } + } + if (tprq_blockobj == 1) { + if (reqinfo.type == 'object' || reqinfo.type == 'object_subrequest') { + console.log('TPRB: Blocked: object:', reqinfo.url); + return { + cancel: true + }; + } + } + if (tprq_jsfilter == 1) { + var _isScrRsc = ['script', 'xbl', 'xslt'].includes(reqinfo.type); + if (rq_src_host == rq_dst_host && _isScrRsc) { + add_js_history(rq_dst_host); + if (is_js_allowed(rq_dst_host, rq_dst_prot) == 0) { + return { + cancel: true + }; + } + } + } + //rule + if (rq_src_host == rq_dst_host) { + return; + } //same origin + if (tprq_separdark == 1) { + if (rq_src_inet) { + var _sIsDNET = rq_src_host.endsWith('.onion') || rq_src_host.endsWith('.i2p'); + var _dIsDNET = rq_dst_host.endsWith('.onion') || rq_dst_host.endsWith('.i2p'); + if ((_sIsDNET && !_dIsDNET) || (!_sIsDNET && _dIsDNET)) { + console.log('TPRB: Blocked: Clearnet+Onion:', rq_dst_host); + return { + cancel: true + }; + } + } + } + if (tprq_allowcss == 1) { + if (reqinfo.type == 'stylesheet') { + return; + } + } + if (tprq_usedntme == 1) { + if (tprq_dblack_fqdn.includes(rq_dst_host)) { + console.log('TPRB: Blocked: known FQDN:', rq_dst_host); + return { + cancel: true + }; + } + if (tprq_dblack_dom.includes(rq_dst_hbase)) { + console.log('TPRB: Blocked: known DOMAIN:', rq_dst_host); + return { + cancel: true + }; + } + if (!rq_src_host.includes('amazon') && rq_src_host != 'www.imdb.com') { + if (rq_dst_host.endsWith('.images-amazon.com') || rq_dst_host.endsWith('.ssl-images-amazon.com')) { + console.log('TPRB: Blocked: CallAmazonFromNonAmazon:', rq_dst_host); + return { + cancel: true + }; + } + } + } + if (tprq_unsocial == 1) { + if (tprq_dsocial_fqdn.includes(rq_dst_host)) { + console.log('TPRB: Blocked: known FQDN:', rq_dst_host); + return { + cancel: true + }; + } + if (tprq_dsocial_dom.includes(rq_dst_hbase)) { + console.log('TPRB: Blocked: known DOMAIN:', rq_dst_host); + return { + cancel: true + }; + } + if (reqinfo.url.includes('://www.facebook.com/plugins/') || reqinfo.url.includes('://www.facebook.com/tr?') || reqinfo.url.includes('://apis.google.com/js/platform.js') || reqinfo.url.includes('://apis.google.com/js/plusone.js')) { + console.log('TPRB: Blocked: FB-GP1'); + return { + cancel: true + }; + } + } + //main + if (rq_src_inet && rq_src_host.length >= 2) { + if (tprq_tab_dst[rq_tab_id] == undefined) { + tprq_tab_dst[rq_tab_id] = []; + } // new tabID Array + if (tprq_tab_dst[rq_tab_id][rq_src_host] == undefined) { + tprq_tab_dst[rq_tab_id][rq_src_host] = []; + } // tabid->src->[f,ok] + var rq_3p_allowed = is_3p_allowed(rq_src_host, rq_dst_host); + if (tprq_fmtdsturl == 1 && !rq_3p_allowed[0]) { //dst_URL rule + var _tmpsrcbase = '.' + get_realdomain(rq_src_host); + var _tmpdstburl = rq_dst_prot + '//' + rq_dst_host + rq_dst_path; + if (tprq_whitelist['*'] != undefined) { + if (tprq_whitelist['*'].includes(_tmpdstburl)) { + return; + } + } + if (tprq_whitelist[rq_src_host] != undefined) { + if (tprq_whitelist[rq_src_host].includes(_tmpdstburl)) { + return; + } + } + if (tprq_whitelist[_tmpsrcbase] != undefined) { + if (tprq_whitelist[_tmpsrcbase].includes(_tmpdstburl)) { + return; + } + } + } + tprq_tab_dst[rq_tab_id][rq_src_host] = update_pair_data(tprq_tab_dst[rq_tab_id][rq_src_host], rq_dst_host, rq_3p_allowed[0], rq_3p_allowed[1]); //Record TP status + if (tprq_jsfilter == 1) { + if (_isScrRsc) { + add_js_history(rq_dst_host); + if (is_js_allowed(rq_dst_host, rq_dst_prot) == 0) { + return { + cancel: true + }; + } + } + } //Record|Block TP JS + if (!rq_3p_allowed[0]) { + console.log('TPRB: Blocked:', rq_src_host, '->', rq_dst_host); + if (reqinfo.type == 'image') { + return { + redirectUrl: 'data:image/gif;base64,' + tprq_bl_img + }; + } + return { + cancel: true + }; + } + } + return; +}, { + urls: ['http://*/*', 'https://*/*', 'ws://*/*', 'wss://*/*', 'file:///*', 'ftp://*/*'] +}, ['blocking', 'requestBody']); +//=== +browser.webRequest.onHeadersReceived.addListener(function (reqinfo) { + if (tprq_poponoff == 1) { + if (!tprq_poponoff_ison) { + return; + } + } + if (reqinfo.url == undefined) { + return; + } + var rqlink_dst = document.createElement('a'); + rqlink_dst.setAttribute('href', reqinfo.url); + var rq_dst_host = rqlink_dst.hostname; + var rq_dst_prot = rqlink_dst.protocol; + rqlink_dst = null; + if (rq_dst_prot != 'http:' && rq_dst_prot != 'https:') { + return; + } + var resphead = reqinfo.responseHeaders; + var r_isJSallowed = is_js_allowed(rq_dst_host, rq_dst_prot); + var r_isJSmustdie = (tprq_jsfilter == 1 && r_isJSallowed == 0) ? true : false; + var r_csp_updated = false; + var r_xsp_updated = false; + var r_mitm_found = false; + var r_name, r_value, _twsv, _tmpCKIE; + var _blockscr = ''; + for (var i = 0; i < resphead.length; i++) { + r_name = resphead[i]['name'].toLowerCase(); + if (tprq_scan_mitm >= 1) { + if (r_name == 'cf-ray' || r_name == 'cf-cache-status' || r_name == 'cf-chl-bypass') { + r_mitm_found = true; + continue; + } + if (tprq_nomitm_inc == 1) { + if (r_name == 'x-iinfo' || (r_name.includes('incap_') && !r_name.includes('x-archive-'))) { + r_mitm_found = true; + continue; + } + } + if (tprq_nomitm_ggl == 1) { + if (r_name == 'x-shield-request-id') { + r_mitm_found = true; + continue; + } + } + if (tprq_nomitm_scu == 1) { + if (r_name == 'x-sucuri-cache' || r_name == 'x-sucuri-id') { + r_mitm_found = true; + continue; + } + } + } + if (r_name == 'content-security-policy') { + resphead[i]['value'] = set_cspvalue(resphead[i]['value'], rq_dst_host, r_isJSmustdie, r_isJSallowed); + r_csp_updated = true; + continue; + } + if (r_name == 'content-security-policy-report-only') { + resphead[i]['value'] = ''; + continue; + } + if (r_name == 'x-xss-protection') { + if (tprq_jsnoxss == 1) { + resphead[i]['value'] = '1; mode=block'; + r_xsp_updated = true; + }; + continue; + } + if (r_name == 'alt-svc' || r_name == 'alternate-protocol') { + if (tprq_ignh_altsvc == 1) { + resphead[i]['value'] = 'clear'; + continue; + } + } + if (r_name == 'etag') { + if (tprq_ignh_etag == 1) { + resphead[i]['value'] = ''; + continue; + } + } + if (r_name == 'expect-ct') { + if (tprq_ignh_expct == 1) { + resphead[i]['value'] = 'max-age=300'; + continue; + } + } + if (r_name == 'x-dns-prefetch-control') { + if (tprq_ignh_xdnspf == 1) { + resphead[i]['value'] = 'off'; + continue; + } + } + if (r_name == 'content-type') { + r_value = resphead[i]['value'].toLowerCase(); + if (tprq_mime_av == 1) { + if (r_value.startsWith('video/') || r_value.startsWith('audio/') || r_value == 'application/ogg' || r_value == 'text/vtt') { + console.log('TPRB: MIME Blocked:', r_value, reqinfo.url); + return { + cancel: true + }; + break; + } + } + if (tprq_mime_pdf == 1) { + if (r_value == 'application/pdf') { + console.log('TPRB: MIME Blocked:', r_value, reqinfo.url); + return { + cancel: true + }; + break; + } + } + if (tprq_mime_office == 1) { + if (/^application\/(msaccess|msexcel|mspowerpoint|msword|vnd\.(ms-excel|ms-office|ms-powerpoint|ms-word|oasis\.opendocument|openofficeorg|openxmlformats-officedocument|stardivision|sun\.xml)(.*))$/.test(r_value)) { + console.log('TPRB: MIME Blocked:', r_value, reqinfo.url); + return { + cancel: true + }; + break; + } + } + if (tprq_jsfilter == 1) { + if (reqinfo.type == 'script' || r_value.includes('javascript') || r_value.includes('ecmascript')) { + add_js_history(rq_dst_host); + if (r_isJSallowed == 0) { + return { + cancel: true + }; + break; + } + } + } + continue; + } + if (r_name == 'location' || r_name == 'refresh') { + if (tprq_scan_shortu >= 1 && reqinfo.type == 'main_frame') { + if (tprq_scan_shortu == 1) { + if (!['0oo.jp', '1drv.ms', '3w.to', '5i5.co', '7.ly', 'adfoc.us', 'admy.link', 'al.ly', 'amzn.to', 'b1t.io', 'bc.vc', 'be.cm', 'bit.do', 'bit.ly', 'bitly.com', 'budurl.com', 'cli.gs', 'clicky.me', 'cur.lv', 'cutt.us', 'djmp.jp', 'doiop.com', 'elbo.in', 'fave.co', 'fb.me', 'flic.kr', 'fur.ly', 'g.co', 'git.io', 'goo.gl', 'hec.su', 'inf.to', 'is.gd', 'ity.im', 'j.mp', 'kl.am', 'lc.chat', 'libr.ae', 'lnked.in', 'mcaf.ee', 'nico.ms', 'nn.bb', 'num.to', 'onl.li', 'onl.social', 'ouo.io', 'ow.ly', 'ph.dog', 'plu.sh', 'po2.red', 'prt.nu', 'qr.net', 'r10.to', 'redd.it', 's.id', 'safe.mn', 'sh.st', 'shar.es', 'shrinkurl.in', 'soo.gd', 'sptfy.com', 'su.pr', 't.co', 'thinfi.com', 'tiny.cc', 'tinyurl.com', 'tldrify.com', 'tr.im', 'u.nu', 'u.to', 'urlr.in', 'urx.blue', 'urx.nu', 'ustre.am', 'v.gd', 'waa.ai', 'xtw.me', 'y2u.be', 'yep.it', 'youtu.be', 'zi.ma', 'zzb.bz', 'mzl.la', 'dlvr.it'].includes(rq_dst_host)) { + continue; + } + } + r_value = resphead[i]['value']; + if (r_name == 'refresh') { + if (r_value.includes(';url=http')) { + r_value = r_value.split(';url=', 2)[1]; + } else { + continue; + } + } + if (r_value.startsWith('http://') || r_value.startsWith('https://')) { + if (tprq_aured_ignr == 3) { + if (get_realdomain((new URL(r_value)).hostname) == get_realdomain(rq_dst_host)) { + continue; + } + } + if (tprq_aured_ignr == 4) { + if (get_realdomain((new URL(r_value)).hostname).split('.')[0] == get_realdomain(rq_dst_host).split('.')[0]) { + continue; + } + } + var _tmp_ufrm = (reqinfo.originUrl != undefined) ? encodeURI(reqinfo.originUrl) : 'about:blank'; + if (!_tmp_ufrm.startsWith('http')) { + _tmp_ufrm = 'about:blank'; + } + if (tprq_aured_confirm) { + _blockscr = 'window.stop();if (confirm("TPRB: %%SHURL_TITLE%%\\n\\n%%SHURL_OSRC%%:\\n%%SHURL_SRC%%\\n\\n%%SHURL_ODST%%:\\n%%SHURL_DST%%")){setTimeout(function(){location.href=\'%%SHURL_DST%%\';return false;},1);}else{setTimeout(function(){location.href=\'%%SHURL_ORG%%\';return false;},1);}'.replace('%%SHURL_TITLE%%', tprq_mylang['ardir_t']).replace('%%SHURL_OSRC%%', tprq_mylang['ardir_s']).replace('%%SHURL_ODST%%', tprq_mylang['ardir_d']).replace('%%SHURL_SRC%%', encodeURI(reqinfo.url)).replace('%%SHURL_DST%%', encodeURI(r_value)).replace('%%SHURL_DST%%', encodeURI(r_value)).replace('%%SHURL_ORG%%', _tmp_ufrm); + } else { + _blockscr = '<html id="resetall"><head><meta charset="utf-8"><title>TPRB:[Alert]</title><meta name="viewport" content="width=device-width,initial-scale=1"><style>#resetall {all:revert}body,td{font:13px Verdana;background-color:#f9f9fa;overflow:hidden}td{vertical-align:middle;text-align:center;word-break:break-all;white-space:normal;max-width:350px;width:350px}a,a:visited,a:hover,a:active{color:inherit;text-decoration:none}</style></head><body><div align="center"><br><br><h3>ℹ %%SHURL_TITLE%%</h3><br><table border="1" cellspacing="1" cellpadding="1"><tr><td>%%SHURL_SRC%%</td><td>%%SHURL_DST%%</td></tr></table><br><br><a href="%%SHURL_ORG%%" rel="noreferrer"><b>× [</b> %%SHURL_BACK%% <b>]</b></a> <a href="%%SHURL_DST%%" rel="noreferrer"><b>✓ [</b> %%SHURL_GONOW%% <b>]</b></a></div></body></html>'.replace('%%SHURL_TITLE%%', tprq_mylang['ardir_t']).replace('%%SHURL_BACK%%', tprq_mylang['ardir_b']).replace('%%SHURL_GONOW%%', tprq_mylang['ardir_n']).replace('%%SHURL_SRC%%', encodeURI(reqinfo.url)).replace('%%SHURL_DST%%', encodeURI(r_value)).replace('%%SHURL_DST%%', encodeURI(r_value)).replace('%%SHURL_ORG%%', _tmp_ufrm); + _blockscr = 'window.stop();document.documentElement.innerHTML=decodeURIComponent(Array.prototype.map.call(atob(\'' + btoa(encodeURIComponent(_blockscr).replace(/%([0-9A-F]{2})/g, function (match, p1) { + return String.fromCharCode(parseInt(p1, 16)) + })) + '\'),function(c){return \'%\' + (\'00\' + c.charCodeAt(0).toString(16)).slice(-2);}).join(\'\'));window.stop();'; + } + resphead[i]['value'] = ''; + continue; + } + } + } + } + //_Action + if (r_mitm_found) { + if (is_mitm_host(rq_dst_host)) { + if (tprq_bkt_mitms.length > 30) { + tprq_bkt_mitms.shift(); + } + if (!tprq_bkt_mitms.includes(rq_dst_host)) { + tprq_bkt_mitms.push(rq_dst_host); + } + if (tprq_scan_mitm == 1) { + browser.tabs.executeScript(reqinfo.tabId, { + matchAboutBlank: true, + runAt: 'document_end', + code: 'window.stop();alert("TPRB: %%WRN_TITLE%%\\n\\n%%WRN_ACTN%%\\n%%WRN_DST%%");'.replace('%%WRN_TITLE%%', tprq_mylang['nf_dtmitm']).replace('%%WRN_ACTN%%', tprq_mylang['nf_acted']).replace('%%WRN_DST%%', rq_dst_host) + }); + console.log('TPRB: Blocked: MITM:', rq_dst_host); + return { + cancel: true + }; + } else { + if (tprq_nomitm_s403 == 0 || (tprq_nomitm_s403 == 1 && reqinfo.statusCode == 403)) { + console.log('TPRB: MITM Detected:', rq_dst_host); + return { + redirectUrl: 'https://web.archive.org/web/' + reqinfo.url + }; + } + } + } + } + if (!r_xsp_updated && tprq_jsnoxss == 1) { + resphead.push({ + 'name': 'X-XSS-Protection', + 'value': '1; mode=block' + }); + } + if (!r_csp_updated) { + resphead.push({ + 'name': 'Content-Security-Policy', + 'value': set_cspvalue('', rq_dst_host, r_isJSmustdie, r_isJSallowed) + }); + } + if (tprq_scan_shortu >= 1 && _blockscr != '') { + browser.tabs.executeScript(reqinfo.tabId, { + matchAboutBlank: true, + runAt: 'document_end', + code: _blockscr + }); + console.log('TPRB: Redirection detected:', reqinfo.url); + } + return { + responseHeaders: resphead + }; +}, { + urls: ['http://*/*', 'https://*/*'] +}, ['blocking', 'responseHeaders']); +//=== +browser.webRequest.onBeforeSendHeaders.addListener(function (reqinfo) { + if (tprq_poponoff == 1) { + if (!tprq_poponoff_ison) { + return; + } + } + if (reqinfo.url == undefined) { + return; + } + if (tprq_smartref == 0) { + return; + } + var rqlink_dst = document.createElement('a'); + rqlink_dst.setAttribute('href', reqinfo.url); + var rq_dst_host = rqlink_dst.hostname; + var rq_dst_prot = rqlink_dst.protocol; + rqlink_dst = null; + if (rq_dst_prot != 'http:' && rq_dst_prot != 'https:') { + return; + } + var reqshead = reqinfo.requestHeaders; + var r_name, r_value; + for (var i = 0; i < reqshead.length; i++) { + r_name = reqshead[i]['name'].toLowerCase(); + if (r_name == 'referer') { + if (tprq_smartref == 1) { + var rqlink_src = document.createElement('a'); + rqlink_src.setAttribute('href', reqshead[i]['value']); + var rq_src_host = rqlink_src.hostname; + var rq_src_prot = rqlink_src.protocol; + var rq_src_path = rqlink_src.pathname; + rqlink_src = null; + if (rq_src_prot != 'http:' && rq_src_prot != 'https:') { + continue; + } //abnormal + if (rq_src_host == rq_dst_host) { + continue; + } //same webmaster + if (get_realdomain(rq_src_host).split('.', 2)[0] == get_realdomain(rq_dst_host).split('.', 2)[0]) { + continue; + } //probably same domain owner(moz.com-moz.net) + if (rq_src_prot != rq_dst_prot) { + reqshead[i]['value'] = ''; + continue; + } //switching protocol + if (reqinfo.type == 'main_frame') { + reqshead[i]['value'] = ''; + } else { + if (rq_src_path != '/') { + reqshead[i]['value'] = rq_src_prot + '//' + rq_src_host + '/'; + } + } + }; + continue; + } + } + return { + requestHeaders: reqshead + }; +}, { + urls: ['http://*/*', 'https://*/*'] +}, ['blocking', 'requestHeaders']); +//=== +browser.webRequest.onCompleted.addListener(function (reqinfo) { // collect DNS + if (tprq_popshowip == 0 && tprq_popshowcc == 0) { + return; + } + if (reqinfo.type != 'main_frame') { + if (tprq_popshowsubs == 0) { + return; + } + } + if (reqinfo.ip == null || reqinfo.url == undefined) { + return; + } + if (tprq_usednsapi == 1 && reqinfo.url == tprq_dnsapi_url) { + return; + } + var rqlink_dst = document.createElement('a'); + rqlink_dst.setAttribute('href', reqinfo.url); + var rq_dst_host = rqlink_dst.hostname; + rqlink_dst = null; + if (is_ip_addr(rq_dst_host) || /^(.*)\.(i2p|invalid|localhost|onion|setup|test)$/.test(rq_dst_host)) { + return; + } + if (tprq_dnspair[rq_dst_host] == undefined) { + if (reqinfo.proxyInfo == null) { + if (is_ip_addr(reqinfo.ip)) { + tprq_dnspair[rq_dst_host] = []; + tprq_dnspair[rq_dst_host][0] = reqinfo.ip; + tprq_dnspair[rq_dst_host][1] = get_geo_cc(reqinfo.ip); + } + } else { + if (tprq_usednsapi == 1) { + try { + fetch(tprq_dnsapi_url, { + method: 'POST', + mode: 'cors', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' + }, + referrer: '', + body: 'f=' + rq_dst_host + }).then(function (_g0) { + return _g0.json(); + }).then(function (_g) { + if (_g[0]) { + if (is_ip_addr(_g[1])) { + tprq_dnspair[rq_dst_host] = []; + tprq_dnspair[rq_dst_host][0] = _g[1]; + tprq_dnspair[rq_dst_host][1] = get_geo_cc(_g[1]); + } + } else { + console.log('TPRB: DNSAPI: BadResponse:', rq_dst_host, _g); + } + }).catch(function (e) { + console.log('TPRB: DNSAPI: Error2:', e); + }); + } catch (_e) { + console.log('TPRB: DNSAPI: Error1:', _e); + } + } + } + if (Object.keys(tprq_dnspair).length >= 230) { + for (var k in tprq_dnspair) { + break; + }; + if (k != '' && tprq_dnspair[k] != undefined) { + tprq_dnspair[k] = null; + delete tprq_dnspair[k]; + } + } + } + return; +}, { + urls: ['http://*/*', 'https://*/*', 'ws://*/*', 'wss://*/*', 'ftp://*/*'] +}); +//=== +browser.runtime.onMessage.addListener(function (r, s, sr) { + if (r[0] == 'pop') { + if (tprq_init == 2) { + if (!tprq_amdroid) { + sr(tprq_make_popup(r[1], r[2], r[3])); + tprq_updicon(r[1], r[4]); + } else { + sr(tprq_make_popup(r[1], r[2], r[3])); + } + } else { + sr(null); + } + } + if (r[0] == 'rld') { + rqbl_loadcfg(); + sr(['ok']); + } // from options + if (r[0] == 'upd') { + var tmp_rul = r[2]; + var tmp_rul_len = tmp_rul.length; + if (tmp_rul_len > 0) { + for (var j = 0; j < tmp_rul_len; j++) { + if (tmp_rul[j][0].length >= 1 && tmp_rul[j][1].length >= 1) { + if (tmp_rul[j][2]) { + tprq_modwl_add(tmp_rul[j][0], tmp_rul[j][1], r[1], tmp_rul[j][3]); + } else { + tprq_modwl_remove(tmp_rul[j][0], tmp_rul[j][1], r[1], tmp_rul[j][3]); + } + } + } + } + tmp_rul = r[3]; + tmp_rul_len = tmp_rul.length; + if (tmp_rul_len > 0) { + for (var j = 0; j < tmp_rul_len; j++) { + if (tmp_rul[j][0].length >= 1) { + if (tmp_rul[j][1]) { + tprq_modjs_add(tmp_rul[j][0], tmp_rul[j][2], tmp_rul[j][3]); + } else { + tprq_modjs_remove(tmp_rul[j][0], tmp_rul[j][2]); + } + } + } + } + //junk cleanup + for (var t in tprq_whitelist) { + if (tprq_whitelist[t].length == 0) { + tprq_whitelist[t] = []; + delete tprq_whitelist[t]; + } + } + var _twtk = ''; + var _twti = 0; + for (var t in tprq_whitetemp) { + if (_twtk == '') { + _twtk = t; + } + _twti += 1; + if (_twti == 19) { + if (tprq_whitetemp[_twtk] != undefined && _twtk != '') { + tprq_whitetemp[_twtk] = []; + delete tprq_whitetemp[_twtk]; + } + } // keep 19 templist + if (tprq_whitetemp[t].length == 0) { + tprq_whitetemp[t] = []; + delete tprq_whitetemp[t]; + } + } + if (tprq_tmpok_js.length > 190) { + tprq_tmpok_js.shift(); + tprq_tmpok_js.shift(); + } + //save + browser.storage.local.set({ + myset_rqblwhitelist: array2text(tprq_whitelist) + }); + browser.storage.local.set({ + myset_rqbljsoklist: tprq_oklist_js.join("\n") + }); + sr(['ok', (tprq_popnarld != 1 || (r[2].length >= 1 || r[3].length >= 1)) ? true : false]); + } + if (r[0] == 'onf') { + if (tprq_poponoff == 1) { + tprq_tab_dst[r[1]] = []; + if (tprq_poponoff_ison) { + tprq_poponoff_ison = false; + browser.browserAction.setTitle({ + tabId: r[1], + title: "TPRB (OFF)" + }); + browser.browserAction.setBadgeText({ + tabId: r[1], + text: "OFF!" + }); + browser.browserAction.setIcon({ + tabId: r[1], + path: 'icons/icon-32.png' + }); + } else { + tprq_poponoff_ison = true; + browser.browserAction.setTitle({ + tabId: r[1], + title: "TPRB" + }); + browser.browserAction.setBadgeText({ + tabId: r[1], + text: "" + }); + browser.browserAction.setIcon({ + tabId: r[1], + path: tprq_flags[0] + }); + } + } else { + tprq_poponoff_ison = true; + } + sr(['ok']); + } + if (r[0] == 'ison') { + var tmpisJSActv = (tprq_jsfilter == 1) ? false : true; + if (!tmpisJSActv) { + if (tprq_jslineok == 1 || is_js_allowed(r[1], r[2]) > 0) { + tmpisJSActv = true; + } + } + sr([(tprq_poponoff == 1) ? tprq_poponoff_ison : true, (tprq_tac_ignlst.includes(r[1]) || tprq_tac_ignlst.includes('.' + get_realdomain(r[1]))) ? false : true, tprq_bkt_mitms.includes(r[1]), tmpisJSActv]); + } + return true; +}); +browser.tabs.onCreated.addListener(function (t) { + if (tprq_newtab_mute) { + browser.tabs.update(t.id, { + muted: true + }); + } +}); +browser.tabs.onActivated.addListener(function (i) { + browser.tabs.query({ + active: true, + currentWindow: true + }).then(function (t) { + tprq_updicon(t[0].id, t[0].url); + }, onError); +}); +browser.tabs.onRemoved.addListener(function (t, r) { + tprq_tab_dst[t] = []; + delete tprq_tab_dst[t]; + if (tprq_mustcleanup) { + cleaning_service(); + } +}); +browser.tabs.onUpdated.addListener(function (td, ci, ti) { + if (ti.active) { + tprq_updicon(ti.id, ti.url); + } +}); +browser.webNavigation.onDOMContentLoaded.addListener(function (d) { + browser.tabs.query({ + active: true, + currentWindow: true + }).then(function (t) { + if (t[0]) { + tprq_updicon(t[0].id, t[0].url); + } + }, onError); +}); +browser.webNavigation.onCompleted.addListener(function (d) { + browser.tabs.query({ + active: true, + currentWindow: true + }).then(function (t) { + if (t[0]) { + tprq_updicon(t[0].id, t[0].url); + } + }, onError); +}); +browser.downloads.onCreated.addListener(function (i) { + if (tprq_poponoff == 0 || (tprq_poponoff == 1 && tprq_poponoff_ison)) { + if ((tprq_nodlact == 2 && !i.url.startsWith('blob:' + browser.extension.getURL(''))) || (tprq_nodlact == 1 && (i.url.startsWith('http://') || i.url.startsWith('https://')))) { + browser.downloads.cancel(i.id).then(function () { + console.log('TPRB: Download Canceled:', i.url); + }, onError); + } + } +}); +if (!tprq_amdroid) { + browser.contextMenus.onClicked.addListener(function (i, t) { + if (t.active && t.id) { + var _tuurl = new URL(t.url); + if ((_tuurl.protocol == 'http:' || _tuurl.protocol == 'https:') && _tuurl.hostname.length >= 2) { + if (i.menuItemId == 'tprb_ctxmnu_pop') { + browser.tabs.query({ + title: 'TPRB' + }).then(function (qt) { + var _isopen = false; + if (qt.length >= 1) { + for (var _i = 0; _i < qt.length; _i++) { + if (/^moz-extension:\/\/(.*)\/tprb_dlg\.html\?=ctx\/([0-9]{1,})$/.test(qt[_i].url)) { + _isopen = true; + break; + } + } + } + if (!_isopen) { + browser.tabs.create({ + active: true, + url: browser.extension.getURL('tprb_dlg.html?=ctx/' + t.id) + }); + } else { + browser.tabs.update(qt[_i].id, { + active: true, + url: browser.extension.getURL('tprb_dlg.html?=ctx/' + t.id) + }); + } + }, onError); + } + if (i.menuItemId == 'tprb_ctxmnu_addcdb') { + if (!tprq_black_nrml.includes(_tuurl.hostname)) { + tprq_black_nrml.push(_tuurl.hostname); + browser.storage.local.set({ + myset_rqblblacklist: tprq_black_regx.concat(tprq_black_nrml).join("\n") + }); + console.log('TPRB: CTX: added:', _tuurl.hostname); + if (tprq_fwdom == 0) { + tprq_fwdom = 1; + }; + browser.tabs.executeScript(t.id, { + matchAboutBlank: true, + runAt: 'document_end', + code: 'history.go(-1);' + }); + } else { + browser.tabs.executeScript(t.id, { + matchAboutBlank: true, + runAt: 'document_end', + code: 'window.stop();alert("TPRB: %%NTC_TITLE%%\\n\\n%%NTC_MSG%%\\n%%NTC_DST%%");'.replace('%%NTC_TITLE%%', tprq_mylang['ctxa']).replace('%%NTC_MSG%%', tprq_mylang['ctxa_ae']).replace('%%NTC_DST%%', _tuurl.hostname) + }); + } + } + if (i.menuItemId == 'tprb_ctxmnu_addcfw') { + if (!tprq_tac_ignlst.includes(_tuurl.hostname)) { + tprq_tac_ignlst.push(_tuurl.hostname); + browser.storage.local.set({ + myset_rqblcftrwhite: tprq_tac_ignlst.join("\n") + }); + console.log('TPRB: CTX: added:', _tuurl.hostname); + browser.tabs.reload(t.id, { + bypassCache: true + }); + } else { + browser.tabs.executeScript(t.id, { + matchAboutBlank: true, + runAt: 'document_end', + code: 'window.stop();alert("TPRB: %%NTC_TITLE%%\\n\\n%%NTC_MSG%%\\n%%NTC_DST%%");'.replace('%%NTC_TITLE%%', tprq_mylang['ctxa']).replace('%%NTC_MSG%%', tprq_mylang['ctxa_ae']).replace('%%NTC_DST%%', _tuurl.hostname) + }); + } + } + if (i.menuItemId == 'tprb_ctxmnu_addmit') { + if (!tprq_mitmoklist.includes(_tuurl.hostname)) { + tprq_mitmoklist.push(_tuurl.hostname); + browser.storage.local.set({ + myset_rqblmitmoklist: tprq_mitmoklist.join("\n") + }); + console.log('TPRB: CTX: added:', _tuurl.hostname); + browser.tabs.reload(t.id, { + bypassCache: true + }); + } else { + browser.tabs.executeScript(t.id, { + matchAboutBlank: true, + runAt: 'document_end', + code: 'window.stop();alert("TPRB: %%NTC_TITLE%%\\n\\n%%NTC_MSG%%\\n%%NTC_DST%%");'.replace('%%NTC_TITLE%%', tprq_mylang['ctxa']).replace('%%NTC_MSG%%', tprq_mylang['ctxa_ae']).replace('%%NTC_DST%%', _tuurl.hostname) + }); + } + } + } + } + }); + browser.commands.onCommand.addListener(function (c) { + if (tprq_kb_act >= 0) { + browser.tabs.query({ + active: true, + currentWindow: true + }).then(function (t) { + if (t[0]) { + var _tuurl = new URL(t[0].url); + if ((_tuurl.protocol == 'http:' || _tuurl.protocol == 'https:') && _tuurl.hostname.length >= 2) { + if (tprq_kb_act == 0) { + browser.tabs.query({ + title: 'TPRB' + }).then(function (qt) { + var _isopen = false; + if (qt.length >= 1) { + for (var _i = 0; _i < qt.length; _i++) { + if (/^moz-extension:\/\/(.*)\/tprb_dlg\.html\?=ctx\/([0-9]{1,})$/.test(qt[_i].url)) { + _isopen = true; + break; + } + } + } + if (!_isopen) { + browser.tabs.create({ + active: true, + url: browser.extension.getURL('tprb_dlg.html?=ctx/' + t[0].id) + }); + } else { + browser.tabs.update(qt[_i].id, { + active: true, + url: browser.extension.getURL('tprb_dlg.html?=ctx/' + t[0].id) + }); + } + }, onError); + } + if (tprq_kb_act == 1) { + if (!tprq_tac_ignlst.includes(_tuurl.hostname)) { + tprq_tac_ignlst.push(_tuurl.hostname); + browser.storage.local.set({ + myset_rqblcftrwhite: tprq_tac_ignlst.join("\n") + }); + console.log('TPRB: CTX: added:', _tuurl.hostname); + browser.tabs.reload(t[0].id, { + bypassCache: true + }); + } else { + browser.tabs.executeScript(t[0].id, { + matchAboutBlank: true, + runAt: 'document_end', + code: 'window.stop();alert("TPRB: %%NTC_TITLE%%\\n\\n%%NTC_MSG%%\\n%%NTC_DST%%");'.replace('%%NTC_TITLE%%', tprq_mylang['kbsa']).replace('%%NTC_MSG%%', tprq_mylang['ctxa_ae']).replace('%%NTC_DST%%', _tuurl.hostname) + }); + } + } + } + if (tprq_kb_act == 2) { + if (tprq_poponoff == 1) { + tprq_poponoff_ison = !tprq_poponoff_ison; + browser.tabs.reload(t[0].id, { + bypassCache: true + }); + } else { + tprq_poponoff_ison = true; + } + } + } + }, onError); + } + }); +} diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/tprb_cs.js b/data/extensions/tprb.addon@searxes.danwin1210.me/tprb_cs.js new file mode 100644 index 0000000..8680b37 --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/tprb_cs.js @@ -0,0 +1,375 @@ +var _mycssqsl = ''; + +function onError(e) { + console.log(`TPRB_CS: Error:${e}`); +} + +function cleanup_mycss_cqsl() { + try { + var _hostiles_ = document.querySelectorAll(_mycssqsl); + for (var i = 0; i < _hostiles_.length; i++) { + if (_hostiles_[i]) { + if (_hostiles_[i].style) { + _hostiles_[i].style.display = 'none'; + }; + _hostiles_[i].innerHTML = ''; + _hostiles_[i].outerHTML = ''; + } + } + } catch (z) { + console.log(z); + console.log('TPRB_CS: Check your CSS selectors!'); + _mycssqsl = ''; + } +} + +function remove0WidthChars() { + if (document.body) { + var _twv; + var _tw = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT, null, false); + while (_tw.nextNode()) { + _twv = encodeURIComponent(_tw.currentNode.nodeValue); + if (_twv) { + if (/^(.*)(%E2%80%8B|%E2%80%8C|%E2%80%8D|%E2%81%A0|%E2%81%A2|%E2%81%A3|%E2%81%A4|%EF%BB%BF)(.*)$/.test(_twv)) { + _tw.currentNode.nodeValue = decodeURIComponent(_twv.replace(/(%E2%80%8B|%E2%80%8C|%E2%80%8D|%E2%81%A0|%E2%81%A2|%E2%81%A3|%E2%81%A4|%EF%BB%BF)/g, '')); + } + } + } + } +} + +browser.runtime.sendMessage(['ison', location.hostname, location.protocol]).then(function (rr) { + if (rr[0]) { + browser.storage.local.get(['myset_rqbl_ah_0wchr', 'myset_rqbl_ah_keys', 'myset_rqbl_ah_mmove', 'myset_rqbl_ah_rclk', 'myset_rqbl_ah_scrl', 'myset_rqbl_ah_touch', 'myset_rqbl_csmadqs', 'myset_rqbl_mitmxmark', 'myset_rqblblockimg', 'myset_rqblblockmid', 'myset_rqblblockobj', 'myset_rqblcftagcanvas', 'myset_rqblcqsrlist', 'myset_rqbldieframe', 'myset_rqblnstag', 'myset_rqblrdr_mitm']).then(function (r) { + var _qsa; + if (rr[1]) { //not in cfw + if (r.myset_rqbl_csmadqs == 'y') { + _mycssqsl = (r.myset_rqblcqsrlist) ? decodeURIComponent(Array.prototype.map.call(atob(r.myset_rqblcqsrlist), function (c) { + return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2); + }).join('')).split("\n").join(',') : ''; + } + if (r.myset_rqblnstag == 2) { + if (rr[3]) { + r.myset_rqblnstag = 1; + } else { + _qsa = document.querySelectorAll('noscript'); + for (var i = 0; i < _qsa.length; i++) { + if (_qsa[i]) { + _qsa[i].outerHTML = _qsa[i].innerHTML; + } + }; + _qsa = null; + } + } + if (r.myset_rqblnstag == 1) { + _qsa = document.querySelectorAll('noscript'); + for (var i = 0; i < _qsa.length; i++) { + if (_qsa[i]) { + if (_qsa[i].style) { + _qsa[i].style.display = 'none'; + }; + _qsa[i].outerHTML = ''; + } + }; + _qsa = null; + } + if (r.myset_rqblblockobj == 'y') { + _qsa = document.querySelectorAll('object,embed,applet'); + for (var i = 0; i < _qsa.length; i++) { + if (_qsa[i]) { + if (_qsa[i].style) { + _qsa[i].style.display = 'none'; + }; + _qsa[i].outerHTML = ''; + } + }; + _qsa = null; + } + if (r.myset_rqblblockmid == 'y') { + _qsa = document.querySelectorAll("video,audio,track,source[src*='.']"); + for (var i = 0; i < _qsa.length; i++) { + if (_qsa[i]) { + if (_qsa[i].style) { + _qsa[i].style.display = 'none'; + }; + _qsa[i].outerHTML = ''; + } + }; + _qsa = null; + } + if (r.myset_rqblblockimg == 'y') { + _qsa = document.querySelectorAll('img'); + for (var i = 0; i < _qsa.length; i++) { + if (_qsa[i]) { + if (_qsa[i].style) { + _qsa[i].style.display = 'none'; + }; + _qsa[i].outerHTML = ''; + } + }; + _qsa = null; + } + if (r.myset_rqbl_ah_rclk == 'y') { + window.oncontextmenu = null; + document.oncontextmenu = null; + document.addEventListener('contextmenu', function (e) { + e.stopImmediatePropagation(); + }, true); + } + if (r.myset_rqbl_ah_keys == 'y') { + document.onkeydown = null; + document.onkeypress = null; + document.onkeyup = null; + document.addEventListener('keydown', function (e) { + e.stopImmediatePropagation(); + }, true); + document.addEventListener('keypress', function (e) { + e.stopImmediatePropagation(); + }, true); + document.addEventListener('keyup', function (e) { + e.stopImmediatePropagation(); + }, true); + } + if (r.myset_rqbl_ah_scrl == 'y') { + window.onscroll = null; + window.onwheel = null; + document.onscroll = null; + document.onwheel = null; + document.addEventListener('scroll', function (e) { + e.stopImmediatePropagation(); + }, true); + document.addEventListener('wheel', function (e) { + e.stopImmediatePropagation(); + }, true); + } + if (r.myset_rqbl_ah_mmove == 'y') { + window.onmousemove = null; + window.onmouseenter = null; + window.onmouseleave = null; + window.onmouseover = null; + window.onmouseout = null; + window.onmouseup = null; + window.onmousedown = null; + document.onmousemove = null; + document.onmouseenter = null; + document.onmouseleave = null; + document.onmouseover = null; + document.onmouseout = null; + document.onmouseup = null; + document.onmousedown = null; + document.addEventListener('mousemove', function (e) { + e.stopImmediatePropagation(); + }, true); + document.addEventListener('mouseenter', function (e) { + e.stopImmediatePropagation(); + }, true); + document.addEventListener('mouseleave', function (e) { + e.stopImmediatePropagation(); + }, true); + document.addEventListener('mouseover', function (e) { + e.stopImmediatePropagation(); + }, true); + document.addEventListener('mouseout', function (e) { + e.stopImmediatePropagation(); + }, true); + document.addEventListener('mouseup', function (e) { + e.stopImmediatePropagation(); + }, true); + document.addEventListener('mousedown', function (e) { + e.stopImmediatePropagation(); + }, true); + } + if (r.myset_rqbl_ah_touch == 'y') { + document.addEventListener('touchstart', function (e) { + e.stopImmediatePropagation(); + }, true); + document.addEventListener('touchend', function (e) { + e.stopImmediatePropagation(); + }, true); + document.addEventListener('touchmove', function (e) { + e.stopImmediatePropagation(); + }, true); + document.addEventListener('touchcancel', function (e) { + e.stopImmediatePropagation(); + }, true); + } + if (r.myset_rqbl_ah_0wchr == 'y') { + remove0WidthChars(); + } + if (r.myset_rqblcftagcanvas == 'y') { + _qsa = document.querySelectorAll('canvas'); + for (var i = 0; i < _qsa.length; i++) { + if (_qsa[i]) { + if (_qsa[i].style) { + _qsa[i].style.display = 'none'; + }; + _qsa[i].outerHTML = ''; + } + }; + _qsa = null; + } + if (r.myset_rqbldieframe == 'y') { + if (location.hostname != 'twitter.com') { + _qsa = document.querySelectorAll('iframe'); + for (var i = 0; i < _qsa.length; i++) { + if (_qsa[i]) { + if (_qsa[i].style) { + _qsa[i].style.display = 'none'; + }; + _qsa[i].outerHTML = ''; + } + }; + _qsa = null; + } + } + if (_mycssqsl != '') { + cleanup_mycss_cqsl(); + } + //_TryAgain + function tprb_time_a() { + if (_mycssqsl != '') { + cleanup_mycss_cqsl(); + } + if (r.myset_rqblcftagcanvas == 'y') { + _qsa = document.querySelectorAll('canvas'); + for (var i = 0; i < _qsa.length; i++) { + if (_qsa[i]) { + if (_qsa[i].style) { + _qsa[i].style.display = 'none'; + }; + _qsa[i].outerHTML = ''; + } + }; + _qsa = null; + } + if (r.myset_rqbldieframe == 'y') { + if (location.hostname != 'twitter.com') { + _qsa = document.querySelectorAll('iframe'); + for (var i = 0; i < _qsa.length; i++) { + if (_qsa[i]) { + if (_qsa[i].style) { + _qsa[i].style.display = 'none'; + }; + _qsa[i].outerHTML = ''; + } + }; + _qsa = null; + } + } + if (r.myset_rqbl_ah_0wchr == 'y') { + remove0WidthChars(); + } + if (rr[3]) { + setTimeout(tprb_time_a, 1590); + } + } + + function tprb_time_b() { + if (r.myset_rqbl_ah_rclk == 'y') { + window.oncontextmenu = null; + document.oncontextmenu = null; + document.addEventListener('contextmenu', function (e) { + e.stopImmediatePropagation(); + }, true); + } + if (r.myset_rqbl_ah_keys == 'y') { + document.onkeydown = null; + document.onkeypress = null; + document.onkeyup = null; + document.addEventListener('keydown', function (e) { + e.stopImmediatePropagation(); + }, true); + document.addEventListener('keypress', function (e) { + e.stopImmediatePropagation(); + }, true); + document.addEventListener('keyup', function (e) { + e.stopImmediatePropagation(); + }, true); + } + if (r.myset_rqbl_ah_scrl == 'y') { + window.onscroll = null; + window.onwheel = null; + document.onscroll = null; + document.onwheel = null; + document.addEventListener('scroll', function (e) { + e.stopImmediatePropagation(); + }, true); + document.addEventListener('wheel', function (e) { + e.stopImmediatePropagation(); + }, true); + } + if (r.myset_rqbl_ah_mmove == 'y') { + window.onmousemove = null; + window.onmouseenter = null; + window.onmouseleave = null; + window.onmouseover = null; + window.onmouseout = null; + window.onmouseup = null; + window.onmousedown = null; + document.onmousemove = null; + document.onmouseenter = null; + document.onmouseleave = null; + document.onmouseover = null; + document.onmouseout = null; + document.onmouseup = null; + document.onmousedown = null; + document.addEventListener('mousemove', function (e) { + e.stopImmediatePropagation(); + }, true); + document.addEventListener('mouseenter', function (e) { + e.stopImmediatePropagation(); + }, true); + document.addEventListener('mouseleave', function (e) { + e.stopImmediatePropagation(); + }, true); + document.addEventListener('mouseover', function (e) { + e.stopImmediatePropagation(); + }, true); + document.addEventListener('mouseout', function (e) { + e.stopImmediatePropagation(); + }, true); + document.addEventListener('mouseup', function (e) { + e.stopImmediatePropagation(); + }, true); + document.addEventListener('mousedown', function (e) { + e.stopImmediatePropagation(); + }, true); + } + if (r.myset_rqbl_ah_touch == 'y') { + document.addEventListener('touchstart', function (e) { + e.stopImmediatePropagation(); + }, true); + document.addEventListener('touchend', function (e) { + e.stopImmediatePropagation(); + }, true); + document.addEventListener('touchmove', function (e) { + e.stopImmediatePropagation(); + }, true); + document.addEventListener('touchcancel', function (e) { + e.stopImmediatePropagation(); + }, true); + } + if (rr[3]) { + setTimeout(tprb_time_b, 4720); + } + } + tprb_time_a(); + tprb_time_b(); + } + if (rr[2]) { + if (r.myset_rqblrdr_mitm == 2 && r.myset_rqbl_mitmxmark == 'y') { //is MITM webpage + var _tmp_title = document.title; + + function tprb_time_c() { + if (!document.title.startsWith('[!!') && !document.title.includes('!!]')) { + document.title = '[!!MITM!!]' + _tmp_title; + } + document.body.style = "border:4px dashed #" + ["e74c3c", "9b59b6", "3498db", "17a589", "196f3d", "f4d03f", "f39c12", "d35400"][Math.floor(Math.random() * 8)] + " !important"; + setTimeout(tprb_time_c, 6190); + } + tprb_time_c(); + } + } + }, onError); + } +}, onError); diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/tprb_dlg.html b/data/extensions/tprb.addon@searxes.danwin1210.me/tprb_dlg.html new file mode 100644 index 0000000..2838edd --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/tprb_dlg.html @@ -0,0 +1,25 @@ +<html> + <head> + <meta charset="utf-8"> + <title>TPRB</title> + <meta name="viewport" content="width=device-width,initial-scale=1"> + <link rel="stylesheet" href="style.css"> + <link rel="stylesheet" href="style_tgl.css"> + </head> + <body style="display:none"> + <form autocomplete="off"> + <div align="center"><span id="d_fqdn"></span><span style="float:right"><span id="d_icon"></span><span id="d_closeme" style="display:none;float:right"> <input type="button" class="prmbtn" id="closeMe" value="[×]"> </span></span></div> + <hr> + <div id="d_res"></div> + <span id="pfb"> + <hr> + <br> + </span> + <div id="pfoot" align="center"> + <input type="button" class="prmbtn" id="tglckAll" value="[✓]"> <button type="button" class="prmbtn" id="apply">[ <span data-what="dlg_apply"></span> ]</button> <input type="button" class="prmbtn" id="openOptn" value="[ℹ]"><span id="d_onoff" style="display:none"><input type="button" class="prmbtn" id="tglOnOff" value="[☣]"></span><br> + <div id="ysp"></div> + </div> + <script src="tprb_dlg.js"></script> + </form> + </body> +</html> diff --git a/data/extensions/tprb.addon@searxes.danwin1210.me/tprb_dlg.js b/data/extensions/tprb.addon@searxes.danwin1210.me/tprb_dlg.js new file mode 100644 index 0000000..351cdbb --- /dev/null +++ b/data/extensions/tprb.addon@searxes.danwin1210.me/tprb_dlg.js @@ -0,0 +1,305 @@ +var current_src = ''; +var current_tid = 0; +var current_cktgl = 0; +var _isDroid = false; +var _isctxmenu = false; + +function onError(e) { + console.log(`TPRB_DLG: Error:${e}`); + window.close(); +} +document.addEventListener('DOMContentLoaded', function () { + var _tabquery; + if (location.search.startsWith('?=ctx/')) { + current_tid = parseInt(location.search.replace('?=ctx/', '')) || 0; + if (current_tid <= 0) { + throw new Error('!'); + } + _isctxmenu = true; + _tabquery = browser.tabs.get(current_tid); + } else { + _tabquery = browser.tabs.query({ + active: true, + currentWindow: true + }); + } + _tabquery.then(function (tabs) { + if (_isctxmenu) { + var _tt = []; + _tt.push(tabs); + tabs = _tt; + } + current_tid = tabs[0].id; + var tmp_iu = new URL(tabs[0].url); + current_src = tmp_iu.hostname; + browser.runtime.sendMessage(['pop', current_tid, current_src, tmp_iu.protocol, tmp_iu.href]).then(function (rr) { + if (!rr) { + close_popup(); + return; + } + document.body.id = rr[5][0]; + document.getElementById('pfoot').style.backgroundColor = rr[5][1]; + document.getElementById('d_fqdn').innerHTML = rr[1]; + document.getElementById('d_res').innerHTML = rr[2]; + var _muis = rr[3]; + var _muis_len = (!_isctxmenu) ? _muis.length : 0; + if (_muis_len > 0) { + var _muis_res = ' '; + for (var i = 0; i < _muis_len; i++) { + _muis_res += ' <img src="icons/u/' + _muis[i][0] + '.gif" data-url="' + _muis[i][1] + '" width=16 height=16>' + "\n"; + }; + document.getElementById('d_icon').innerHTML = _muis_res; + } else { + document.getElementById('d_icon').style.display = 'none'; + } + if (!_isctxmenu) { + if (rr[4] == 1) { + document.getElementById('d_closeme').style.display = 'inline'; + }; + if (rr[6] == 1) { + document.getElementById('d_onoff').style.display = 'inline'; + } + } else { + document.getElementById('openOptn').style.display = 'none'; + } + if (rr[7] == 1) { + for (var _qs of document.querySelectorAll("input[type='checkbox'],input[type='radio']")) { + _qs.className = 'lgr'; + } + } + if (rr[5][0] == 'droid' || rr[5][0] == 'broid') { + document.getElementById('openOptn').style.display = 'none'; + _isDroid = true; + } + for (var _qs of document.querySelectorAll('span[data-what]')) { + _qs.appendChild(document.createTextNode(rr[0][_qs.dataset.what])); + } + if (rr[9][0] == 1) { + for (var _qs of document.querySelectorAll('span.minortxt')) { + _qs.style.display = 'none'; + } + } + if (rr[9][1] == 1) { + for (var _qs of document.querySelectorAll('div#pfoot,span#pfb')) { + _qs.style.display = 'none'; + } + } + document.body.style.display = 'block'; + current_cktgl = 0; + if (_muis_len > 0) { + for (var _z of document.querySelectorAll('img[data-url]')) { + _z.addEventListener('click', function () { + browser.tabs.create({ + active: true, + url: this.dataset.url.replace('%%TPRB_HOST%%', current_src).replace('%%TPRB_ERL%%', encodeURIComponent(tmp_iu.href)).replace('%%TPRB_URL%%', tmp_iu.href) + }); + window.close(); + }); + } + } + var _za = (!_isDroid) ? rr[8][0] : 0; + document.addEventListener('contextmenu', function (z) { + if (_za == 1) { + setallChecked(); + }; + if (_za == 2) { + saveRule(); + }; + z.preventDefault(); + }); + if (!_isDroid) { + var _zl = (current_src.includes('.')) ? rr[8][1].toString() : '0'; + if (_zl.startsWith('http')) { + _zl = _zl.replace('%F%', current_src).replace('%E%', encodeURIComponent(tmp_iu.href)).replace('%U%', tmp_iu.href); + } + if (_zl != '0') { + document.getElementById('d_fqdn').addEventListener('click', function (z) { + if (_zl == '1') { + var _fr = []; + var _fl = document.querySelectorAll("label[for^='idf_'],span[title]"); + for (var _fk = 0; _fk < _fl.length; _fk++) { + if (_fl[_fk].title) { + if (!_fl[_fk].title.startsWith('*') && _fl[_fk].title != current_src) { + _fr.push((_fl[_fk].title.split(' '))[0]); + } + } + } + _fr = (_fr.slice().sort(function (a, b) { + return a > b + }).reduce(function (a, b) { + if (a.slice(-1)[0] !== b) { + a.push(b); + }; + return a; + }, [])).filter(v => v != '').join("\n"); + if (_fr != '') { + browser.tabs.create({ + active: true, + url: 'about:blank' + }).then(function (t) { + browser.tabs.executeScript(t.id, { + matchAboutBlank: true, + code: "document.documentElement.innerHTML='<html><head><title>TPRB:[Data]</title></head><body><pre>'+atob('" + btoa(current_src + " (" + _fr.split("\n").length + ")\n<hr>" + _fr) + "')+'</pre></body></html>';window.stop();" + }).then(function (e) { + window.close(); + }, function () { + window.close(); + }); + }, function () { + window.close(); + }); + } + } + if (_zl.startsWith('http')) { + browser.tabs.create({ + active: true, + url: _zl + }); + window.close(); + } + }); + } + } + }, onError); + }, onError); +}); + +function close_popup() { + if (!_isDroid) { + if (_isctxmenu) { + browser.tabs.query({ + active: true, + currentWindow: true + }).then(function (t) { + browser.tabs.update(current_tid, { + active: true + }); + browser.tabs.remove(t[0].id); + }, onError); + } else { + window.close(); + } + } else { + browser.tabs.update({ + active: true + }); + } +} + +function setallChecked() { + var _ckbx = document.querySelectorAll("input[type='checkbox'],input[type='radio'][value='b']"); + if (_ckbx.length == 0) { + close_popup(); + } else { + var _ckbx_b = true; + if (current_cktgl == 0) { + current_cktgl = 1; + } else { + _ckbx_b = false; + current_cktgl = 0; + } + for (var i = 0; i < _ckbx.length; i++) { + if (_ckbx[i].dataset.wild) { + continue; + }; + _ckbx[i].checked = _ckbx_b; + } + if (!_ckbx_b) { + _ckbx = document.querySelectorAll("input[type='radio'][value='x']"); + for (var i = 0; i < _ckbx.length; i++) { + _ckbx[i].checked = true; + } + } //if false, then set all tempmenu=block + } +} + +function saveRule() { + var ei = document.querySelectorAll("input[type='checkbox'],input[type='radio']"); + if (ei.length == 0) { + close_popup(); + } else { + document.getElementById('apply').disabled = true; + var ei_n; + var eiO_tmp1 = []; + var eiO_tmp2 = []; + var eiO_tmp3 = []; + var eiO_tmp4 = []; + var bJSHTTPS = false; + for (var o = 0; o < ei.length; o++) { + ei_n = ei[o].name; + if (ei_n.startsWith('f_')) { + if (ei[o].dataset.usv != undefined) { + if ((ei[o].dataset.usv == 0 && ei[o].checked) || (ei[o].dataset.usv == 1 && !ei[o].checked)) { + eiO_tmp1.push([current_src, ei_n.replace('f_', ''), ei[o].checked, true]); + } + } else { + if (ei[o].dataset.usvxt != undefined) { + if ((ei[o].dataset.usvxt == 0 && ei[o].checked) || (ei[o].dataset.usvxt == 1 && !ei[o].checked)) { + eiO_tmp2.push([current_src, ei_n.replace('f_', ''), ei[o].checked, false]); + } + } + } + } + if (ei_n.startsWith('js_')) { + if (ei[o].dataset.usv != undefined) { + if (document.getElementById('htps_' + ei_n)) { + bJSHTTPS = document.getElementById('htps_' + ei_n).checked; + if (ei[o].dataset.usv == 1 && ei[o].checked) { + if ((document.getElementById('htps_' + ei_n).dataset.prev == 0 && bJSHTTPS) || (document.getElementById('htps_' + ei_n).dataset.prev == 1 && !bJSHTTPS)) { + eiO_tmp3.push([ei_n.replace('js_', ''), true, true, bJSHTTPS]); + continue; + } + } + if ((ei[o].dataset.usv == 0 && ei[o].checked) || (ei[o].dataset.usv == 1 && !ei[o].checked)) { + eiO_tmp3.push([ei_n.replace('js_', ''), ei[o].checked, true, bJSHTTPS]); + } + } else { + if ((ei[o].dataset.usv == 0 && ei[o].checked) || (ei[o].dataset.usv == 1 && !ei[o].checked)) { + eiO_tmp3.push([ei_n.replace('js_', ''), ei[o].checked, true, false]); + } + } // no https cbx + } else { + if (ei[o].dataset.usvxt != undefined) { + if ((ei[o].dataset.usvxt == 0 && ei[o].checked) || (ei[o].dataset.usvxt == 1 && !ei[o].checked)) { + eiO_tmp4.push([ei_n.replace('js_', ''), ei[o].checked, false, false]); + } + } + } // temp + } + } + browser.runtime.sendMessage(['upd', current_tid, eiO_tmp1.concat(eiO_tmp2), eiO_tmp3.concat(eiO_tmp4)]).then(function (r) { + if (r[1]) { + browser.tabs.reload(current_tid, { + bypassCache: true + }); + }; + close_popup(); + }, function () { + close_popup(); + }); + } +} +document.getElementById('tglckAll').addEventListener('click', setallChecked); +document.getElementById('apply').addEventListener('click', saveRule); +document.getElementById('closeMe').addEventListener('click', function () { + window.close(); +}); +document.getElementById('openOptn').addEventListener('click', function () { + this.disabled = true; + browser.runtime.openOptionsPage().then(function () { + window.close(); + }, function () { + window.close(); + }); +}); +document.getElementById('tglOnOff').addEventListener('click', function () { + this.disabled = true; + browser.runtime.sendMessage(['onf', current_tid]).then(function (r) { + browser.tabs.reload(current_tid, { + bypassCache: true + }); + window.close(); + }, function () { + window.close(); + }); +}); |