aboutsummaryrefslogtreecommitdiff
path: root/firefox
diff options
context:
space:
mode:
Diffstat (limited to 'firefox')
-rw-r--r--firefox/extensions/custom-limit-tabs.patch105
m---------firefox/extensions/limit-tabs0
-rw-r--r--firefox/policies.json2
3 files changed, 106 insertions, 1 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
diff --git a/firefox/policies.json b/firefox/policies.json
index 94314f7..37d61b6 100644
--- a/firefox/policies.json
+++ b/firefox/policies.json
@@ -51,7 +51,7 @@
},
"rudolf.fernandes@gmail.com": {
"installation_mode": "normal_installed",
- "install_url": "https://addons.mozilla.org/firefox/downloads/latest/rudolf-fernandes/latest.xpi"
+ "install_url": "file:///usr/lib/firefox-developer-edition/distribution/extensions/limit-tabs.xpi"
},
"uBlock0@raymondhill.net": {
"installation_mode": "normal_installed",