Skip to content

Commit da58f84

Browse files
authored
Update troubleshooter.js
1 parent 755a455 commit da58f84

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

scratchpad-scripts/troubleshooter.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@
176176

177177
if (aDbg.length == 1) return alert("narrowed it down to:\n\n"+aDbg[0].name+"\n");
178178
if (aDbg.length == aALL.length) {
179-
let msg = "Failed to narrow it down beyond the initial "+aALL.length+" prefs. The problem is most likely caused by at least 2 prefs!\n\n";
180-
msg += "Either those prefs are too far apart in the list or there are exactly 2 culprits and they just happen to be at the wrong place.\n\n";
181-
msg += "In case it's the latter, the script can add a dummy pref and you can try again - Try again?";
179+
const msg = "Failed to narrow it down beyond the initial "+aALL.length+" prefs. The problem is most likely caused by at least 2 prefs!\n\n" +
180+
"Either those prefs are too far apart in the list or there are exactly 2 culprits and they just happen to be at the wrong place.\n\n" +
181+
"In case it's the latter, the script can add a dummy pref and you can try again - Try again?";
182182
if (confirm(msg)) return _main([...aALL, oFILLER]);
183183
} else if (aDbg.length > 10 && confirm("Narrowed it down to "+aDbg.length+" prefs. Try narrowing it down further?")) {
184184
return _main(aDbg.reverse());
@@ -194,14 +194,18 @@
194194

195195
const aBAK = getMyList(aPREFS);
196196
//console.log(aBAK.length, "user-set prefs from our list detected and their values stored.");
197+
198+
const sMsg = "all detected prefs reset.\n\n" +
199+
"!! KEEP THIS PROMPT OPEN AND TEST THE SITE IN ANOTHER TAB !!\n\n" +
200+
"IF the problem still exists, this script can't help you - click Cancel to re-apply your values and exit.\n\n" +
201+
"Click OK if your problem is fixed.";
197202

198203
focus();
199204
myreset(aBAK);
200-
if (!confirm("all detected prefs reset.\n\n!! KEEP THIS PROMPT OPEN AND TEST THE SITE IN ANOTHER TAB !!\n\nIF the problem still exists, this script can't help you - click cancel to re-apply your values and exit.\n\nClick OK if your problem is fixed.")) {
205+
if (!confirm(sMsg)) {
201206
reapply(aBAK);
202207
return;
203208
}
204-
205209
_main(aBAK);
206210

207211
})();

0 commit comments

Comments
 (0)