aboutsummaryrefslogtreecommitdiff
path: root/firefox/extensions
diff options
context:
space:
mode:
authorYuchen Pei <id@ypei.org>2023-08-26 13:27:25 +1000
committerYuchen Pei <id@ypei.org>2023-08-26 13:29:32 +1000
commitd9fe650f83bc77e640dddf85cad953a1f0a86e9a (patch)
treebd5293403fa609203e1d37044913be7072f926c5 /firefox/extensions
parent8e6322c898fa057c367f534b632c37d2261c4600 (diff)
Add limit-tabs firefox extension.
A patch to apply deployment preference Build with zip -r ./* limit-tabs.xpi Then move the xpi to the firefox distribution directory as specified in policies.json i.e. /usr/lib/firefox-developer-edition/distribution/extensions/limit-tabs.xpi
Diffstat (limited to 'firefox/extensions')
-rw-r--r--firefox/extensions/custom-limit-tabs.patch105
m---------firefox/extensions/limit-tabs0
2 files changed, 105 insertions, 0 deletions
diff --git a/firefox/extensions/custom-limit-tabs.patch b/firefox/extensions/custom-limit-tabs.patch
new file mode 100644
index 0000000..f69b2e2
--- /dev/null
+++ b/firefox/extensions/custom-limit-tabs.patch
@@ -0,0 +1,105 @@
+From ad157747ee2225c7c16dd800444a92f98f714824 Mon Sep 17 00:00:00 2001
+From: Yuchen Pei <id@ypei.org>
+Date: Sat, 26 Aug 2023 13:20:47 +1000
+Subject: [PATCH] Customise extension settings
+
+tablimit=15
+close by lru
+no sound
+---
+ limittabsto2.js | 4 ++--
+ manifest.json | 4 ++--
+ options.js | 12 ++++++------
+ 3 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/limittabsto2.js b/limittabsto2.js
+index 228bc8c..27f063d 100644
+--- a/limittabsto2.js
++++ b/limittabsto2.js
+@@ -48,8 +48,8 @@
+ // Use cleanjs.sh to remove comments before submission
+ //********************************************
+
+-var TABLIMIT = 2;
+-var DEFAULTTABLIMIT = 2;
++var TABLIMIT = 15;
++var DEFAULTTABLIMIT = TABLIMIT;
+ var SOUND_LAST_PLAYED = Date.now()-2000;
+ var limitEnabled = true;
+ var currentonly = true;
+diff --git a/manifest.json b/manifest.json
+index de5853d..eb0e4ff 100644
+--- a/manifest.json
++++ b/manifest.json
+@@ -8,7 +8,7 @@
+ "description": "For my autistic son. Limits tabs to maintain system responsiveness",
+ "manifest_version": 2,
+ "name": "Limit Tabs",
+- "version": "2.2.6",
++ "version": "2.2.6-custom",
+ "background": {
+ "scripts": [
+ "limittabsto2.js"
+@@ -25,4 +25,4 @@
+ "32": "icons/enabled.png"
+ }
+ }
+-}
+\ No newline at end of file
++}
+diff --git a/options.js b/options.js
+index 9432b2d..5a9c389 100644
+--- a/options.js
++++ b/options.js
+@@ -1,6 +1,6 @@
+ // 2.2.2 27May2021. Play the sound selected. See playsound()
+
+-var DEFAULTTABLIMIT = 2;
++var DEFAULTTABLIMIT = 15;
+ var currentonly = true;
+ var resetmax = false;
+ var SOUND_LAST_PLAYED = Date.now()-1000;
+@@ -134,7 +134,7 @@ function restoreOptions() {
+
+ function setmaxtabs(result) {
+ // console.log ("restoreOptions().setmaxtabs() called " + result.maxtabs);
+- document.querySelector("#maxtabs").value = result.maxtabs || 2;
++ document.querySelector("#maxtabs").value = result.maxtabs || DEFAULTTABLIMIT;
+ }
+
+ function setcurrentonly(result) {
+@@ -146,11 +146,11 @@ function restoreOptions() {
+ }
+
+ function setnewest(result) {
+- document.getElementById("newest").checked = result.newest || true;
++ document.getElementById("newest").checked = result.newest;
+ }
+
+ function setlru(result) {
+- document.getElementById("lru").checked = result.lru;
++ document.getElementById("lru").checked = result.lru || true;
+ }
+
+ function setleft(result) {
+@@ -162,7 +162,7 @@ function restoreOptions() {
+ }
+
+ function setbuzzer(result) {
+- document.getElementById("buzzer").checked = result.buzzer || true;
++ document.getElementById("buzzer").checked = result.buzzer;
+ }
+
+ function setdoorbell(result) {
+@@ -178,7 +178,7 @@ function restoreOptions() {
+ }
+
+ function setnosound(result) {
+- document.getElementById("nosound").checked = result.nosound;
++ document.getElementById("nosound").checked = result.nosound || true;
+ }
+
+ function setToggle(result) {
+--
+2.41.0
+
diff --git a/firefox/extensions/limit-tabs b/firefox/extensions/limit-tabs
new file mode 160000
+Subproject b72fe68bf964fe386f76897296c87ea3b1fdf14