summaryrefslogtreecommitdiff
path: root/searx/static/themes/oscar/js/searx_src/toggleall.js
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2020-05-31 23:40:49 +0200
committerGitHub <noreply@github.com>2020-05-31 23:40:49 +0200
commitda02e0b8d89fb664786e7bb8f1050fad0c86db6a (patch)
tree9b0e86eb437c13c2fe0e6e8687d82240ab8656b5 /searx/static/themes/oscar/js/searx_src/toggleall.js
parente974bbc17a6a659b14b7ab071d5cc2d72a4d6504 (diff)
parentd7d89369cb3f9d33855749f13c410fb444a81104 (diff)
Merge pull request #1979 from kvch/feature-toggle-all-buttons
Add "Allow all" and "Disable all" to engines tab of Oscar preferences
Diffstat (limited to 'searx/static/themes/oscar/js/searx_src/toggleall.js')
-rw-r--r--searx/static/themes/oscar/js/searx_src/toggleall.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/searx/static/themes/oscar/js/searx_src/toggleall.js b/searx/static/themes/oscar/js/searx_src/toggleall.js
new file mode 100644
index 000000000..b6c484e3e
--- /dev/null
+++ b/searx/static/themes/oscar/js/searx_src/toggleall.js
@@ -0,0 +1,10 @@
+$(document).ready(function(){
+ $("#allow-all-engines").click(function() {
+ $(".onoffswitch-checkbox").each(function() { this.checked = false;});
+ });
+
+ $("#disable-all-engines").click(function() {
+ $(".onoffswitch-checkbox").each(function() { this.checked = true;});
+ });
+});
+