1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
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
|