forked from icpantsparti/firefox-user.js-tool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
userjs-tool.html
1802 lines (1530 loc) · 83.9 KB
/
userjs-tool.html
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="height=device-height, width=device-width,
initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,
user-scalable=no, target-densitydpi=device-dpi, shrink-to-fit=no">
<!-- <style>* {-webkit-text-size-adjust: none}</style> -->
<!-- *************************************
Interactive view, compare, and more for Firefox user.js
Name : userjs-tool.html
Project : https://github.com/icpantsparti2/firefox-user.js-tool
Version : 2022.04.08
File : https://raw.githubusercontent.com/icpantsparti2/firefox-user.js-tool/master/userjs-tool.html
On-line : https://icpantsparti2.github.io/firefox-user.js-tool/userjs-tool.html
License (MIT): https://raw.githubusercontent.com/icpantsparti2/firefox-user.js-tool/master/LICENSE
Disclaimer : Use with care at your own risk, and verify any results
Open on-line or save for off-line use.
Visit the project page for updates/issues/etc.
Other sources: shown in the code (libraries/functions)
************************************* -->
<title>userjs-tool.html</title>
<script type="text/javascript">
var date_time_stamp;
// keep track of the section selected to help overcome focus loss
var section_focus, return_to_panel;
var arkenfoxRepoMode = "";
</script>
<link rel="stylesheet" href="css/userjs-tool.css" />
<link rel="stylesheet" type="text/css" href="css/userjs-tool-themes.css" />
<link rel="stylesheet" type="text/css" href="css/userjs-tool-af-mode.css" />
<link rel="stylesheet" type="text/css" href="css/userjs-tool-userjs-table-view.css" />
<!-- 3rd party JavaScript library (used when saving textarea contents to a file) -->
<script type="text/javascript" src="js/download.js"></script>
<!-- 3rd party JavaScript library (used to show text differences between two user.js) -->
<script type="text/javascript" src="js/jsdiff-modified.js"></script>
<script type="text/javascript" src="js/userjs-tool.js"></script>
<script type="text/javascript" src="js/userjs-tool-common.js"></script>
<script type="text/javascript" src="js/userjs-tool-userjs-viewer.js"></script>
<script type="text/javascript" src="js/userjs-tool-userjs-compare.js"></script>
<script type="text/javascript" src="js/userjs-tool-userjs-table-view.js"></script>
<script type="text/javascript" src="js/userjs-tool-userjs-append.js"></script>
<script type="text/javascript" src="js/userjs-tool-userjs-reduce.js"></script>
<script type="text/javascript" src="js/userjs-tool-userjs-to-value-groups.js"></script>
<script type="text/javascript" src="js/userjs-tool-collect-mode.js"></script>
<script type="text/javascript" src="js/userjs-tool-event-listeners.js"></script>
<script type="text/javascript" src="js/userjs-tool-file-loading.js"></script>
<script type="text/javascript" src="js/userjs-tool-af-mode.js"></script>
<script type="text/javascript" src="js/userjs-tool-start-up.js"></script>
</head>
<body onload="userjstoolStart()">
<!-- hidden heading (H1/H3/DL tags for bookmarks import compatibility) -->
<div class="hidden"><H1>Bookmarks Menu</H1></div><DL>
<!-- >>>> date is inserted here later <<<< -->
<div id="hiddendate" class="hidden"><H3>--userjs_</H3></div><DL>
<!-- *************************************
top_buttons_bar
************************************* -->
<div id="top_buttons_bar">
<!-- index_select -->
<!-- the first option is used as a title/label -->
<select class="controls borders top_buttons" id="index_select"
title="Go to section">
<!-- >>>> section headings (between here) are replaced later <<<< -->
<option value="" disabled selected hidden>▾Index</option>
<option>(TOP) / Introduction</option>
<!-- >>>> section headings (between here) are replaced later <<<< -->
</select>
<!-- groups_button -->
<button type="button" class="controls borders top_buttons"
id="groups_button" title="Show/hide about:config Groups panel"
>Groups</button>
<!-- size_select -->
<!-- the first option is used as a title/label
and changes to show the current font size percent -->
<select class="controls borders top_buttons" id="size_select"
title="Change font size">
<option value="" disabled selected hidden>▾100%</option>
<option>-10%</option>
<option>+10%</option>
<option>50%</option>
<option>75%</option>
<option>100%</option>
<option>125%</option>
<option>150%</option>
<option>175%</option>
<option>200%</option>
<option>250%</option>
<option>300%</option>
</select>
<!-- menu_select -->
<!--
some of these option names (the prefix symbol) will alter when toggled
the menu_select addEventListener matches option name keywords not indexes
the first option is used as a title/label
options are prefixed with unicode characters:
◫ WHITE SQUARE WITH VERTICAL BISECTING LINE (not a toggle)
▢ WHITE SQUARE WITH ROUNDED CORNERS (off/false)
▣ WHITE SQUARE CONTAINING BLACK SMALL SQUARE (on/true)
  (blank/space) as leading/multi-spaces are lost
… symbol for '...' (not used, looks too small)
⁝ TRICOLON (vertical ...) (not used)
-->
<select id="menu_select" class="controls borders top_buttons"
title="Select menu option">
<option value="" disabled selected hidden>▾Menu</option>
<option>◫  Collapse all</option>
<option>◫  Expand all</option>
<option>◫  Collapse current/headings</option>
<option value="" disabled></option>
<option>▢  [Actions] (input panel)</option>
<option>▢  [Groups] (about:config search)</option>
<option>▢  [Links] (template/profiles/etc)</option>
<option>▢  [about:config Functions]</option>
<option>▢  [Help/Info]</option>
<option value="" disabled></option>
<option>▢  Wrap text</option>
<option>▢  Prefix about:config links</option>
<option>▢  Function about:config links</option>
<option value="" disabled></option>
<option>▢  Expand all on view</option>
<option>▢  Show Groups on view</option>
<option>▢  View+ style on view</option>
<option value="" disabled></option>
<option>▢  Theme: default</option>
<option>▢  Theme: dark</option>
<option>▢  Theme: light</option>
<option>▢  Theme: arkenfox</option>
<option>◫  Other themes</option>
</select>
<button type="button" id="back_button" class="controls borders top_buttons"
title="Close panel" onclick="backButton();"><b><</b>Back</button>
</div><!-- end: top_buttons_bar -->
<!-- *************************************
top of body / view_area
************************************* -->
<div id="body_offset"><br><br><br><br></div>
<div id="collect_mode_pad"><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br>Note: a very basic overrides collector, click value/"user_pref" to toggle.<br>
You can also edit box 2 above, and don't forget to save what you do.<br><br></div>
<div id="view_area">
<!-- >>>> section contents (between here) are replaced later <<<< -->
<button type="button" class="controls borders heading_buttons"
id="TOP-Introduction">(TOP) / Introduction</button>
<div class="content">
Please add user.js content under [Menu]>[Actions],
then use [View], [Table View], or [Compare].
</div>
<!-- >>>> section contents (between here) are replaced later <<<< -->
</div><!-- end: view_area -->
<!-- *************************************
actions_panel
************************************* -->
<div id="actions_panel" class="panels borders">
<span class="close_panel_x" onclick="toggleActionsPanel();"
title="Close [Actions] panel">×</span>
<!-- hidden heading (H1/H3/DL tags for bookmarks import compatibility) -->
<div class="hidden"><H3>[Actions]</H3></div>
<b>[Actions] (Firefox user.js view, compare and more)</b> ([X] closes)<br>
(Please see "Hints" below, scroll down)<br><br>
<!-- actions_buttons_bar -->
<div id="actions_buttons_bar"><!--
--><button type="button" class="controls borders" id="div_1_template_button"
title="Display Template box (eg arkenfox user.js)">Box 1<br>Template</button><!--
--><button type="button" class="controls borders" id="div_2_overrides_button"
title="Display user-overrides.js box">Box 2<br>Overrides</button><!--
--><button type="button" class="controls borders" id="div_3_userjs_button"
title="Display user.js box">Box 3<br>user.js</button><!--
--><button type="button" class="controls borders" id="div_4_other_button"
title="Display Other box (eg prefs.js/etc)">Box 4<br>Other</button><!--
--><button type="button" class="controls borders" id="all_button"
title="Show all boxes">All</button><!--
--></div><!-- end: actions_buttons_bar -->
<!-- div_1_template -->
<div id="div_1_2">
<div id="div_1_template"><table><tr><td class="td1_actions">
<b>Box 1</b><!--
--> <div id="box_1_template_ro">▢ro</div><br>
<button type="button" class="controls borders" id="view_template_button"
title="View box content with HTML, links, etc">View</button><br>
<button type="button" class="controls borders" id="tableview_template_button"
title="View box content in a table (for arkenfox user.js)">Table View</button><br>
<select class="controls borders" id="loadsave_template_select"
title="Select a file and load contents into the box">
<option value="" disabled selected hidden>▾Load/Save</option>
</select><br>
<button type="button" class="controls borders" id="select_template_button"
title="Select all text in the box">Select</button><br>
<button type="button" class="controls borders" id="clear_template_button"
title="Clear the text in the box">Clear</button>
<input class="hidden controls borders" type="file" multiple="multiple"
name="file" accept=".js" id="load_template_input" />
</td><td class="td2_actions">
<a target="_blank" rel="external noopener noreferrer"
class="local_folder" href="user-template.js">Template</a> eg
<a target="_blank" rel="external noopener noreferrer"
href="https://github.com/arkenfox/user.js">arkenfox</a>
<textarea id="box_1_template" autofocus="true"
ondrop="dropHandler1(event);" ondragover="dragOverHandler(event);"
placeholder=" Add user.js template here (Use [Load] button, drag/drop or paste) Then use [View], [Table View], [Compare], or another action button"
></textarea>
</td></tr></table></div>
<!-- div_2_overrides -->
<div id="div_2_overrides" class="hidden"><table><tr><td class="td1_actions">
<b>Box 2</b><!--
--> <span id="box_2_overrides_ro">▢ro</span><br>
<!-- End Collect button is hidden until needed -->
<button type="button" class="controls borders" id="endcollect_button"
title="End the point and click overrides collection"
>End Collect</button><br id="endcollect_br">
<button type="button" class="controls borders" id="view_overrides_button"
title="View box content with HTML, links, etc">View</button><br>
<button type="button" class="controls borders" id="tableview_overrides_button"
title="View box content in a table (for arkenfox user.js)">Table View</button><br>
<select class="controls borders" id="loadsave_overrides_select"
title="Select a file and load contents into the box">
<option value="" disabled selected hidden>▾Load/Save</option>
</select><br>
<button type="button" class="controls borders" id="select_overrides_button"
title="Select all text in the box">Select</button><br>
<button type="button" class="controls borders" id="clear_overrides_button"
title="Clear the text in the box">Clear</button><br>
<input class="hidden controls borders" type="file" multiple="multiple"
name="file" accept=".js" id="load_overrides_input" />
</td><td class="td2_actions">
<a target="_blank" rel="external noopener noreferrer"
class="local_folder" href="user-overrides.js">user-overrides.js</a>
<textarea id="box_2_overrides"
ondrop="dropHandler2(event);" ondragover="dragOverHandler(event);"
placeholder=" Add user-overrides.js here (Use [Load] button, drag/drop or paste) (or used for action button input/output)"
></textarea>
</td></tr></table></div>
</div>
<!-- div_3_userjs -->
<div id="div_3_4">
<div id="div_3_userjs" class="hidden"><table><tr><td class="td1_actions">
<b>Box 3</b><!--
--> <span id="box_3_userjs_ro">▢ro</span><br>
<button type="button" class="controls borders" id="view_userjs_button"
title="View box content with HTML, links, etc">View</button><br>
<button type="button" class="controls borders" id="tableview_userjs_button"
title="View box content in a table (for arkenfox user.js)">Table View</button><br>
<select class="controls borders" id="loadsave_userjs_select"
title="Select a file and load contents into the box">
<option value="" disabled selected hidden>▾Load/Save</option>
</select><br>
<button type="button" class="controls borders" id="select_userjs_button"
title="Select all text in the box">Select</button><br>
<button type="button" class="controls borders" id="clear_userjs_button"
title="Clear the text in the box">Clear</button><br>
<input class="hidden controls borders" type="file" multiple="multiple"
name="file" accept=".js" id="load_userjs_input" />
</td><td class="td2_actions">
<a target="_blank" rel="external noopener noreferrer"
class="local_folder" href="user.js">user.js</a>
<textarea id="box_3_userjs"
ondrop="dropHandler3(event);" ondragover="dragOverHandler(event);"
placeholder=" Add user.js here (Use [Load] button, drag/drop or paste) (or used for action button input/output)"
></textarea>
</td></tr></table></div>
<!-- div_4_other -->
<div id="div_4_other" class="hidden"><table><tr><td class="td1_actions">
<b>Box 4</b><!--
--> <span id="box_4_other_ro">▢ro</span><br>
<button type="button" class="controls borders" id="view_other_button"
title="View box content with HTML, links, etc">View</button><br>
<button type="button" class="controls borders" id="tableview_other_button"
title="View box content in a table (for arkenfox user.js)">Table View</button><br>
<select class="controls borders" id="loadsave_other_select"
title="Select a file and load contents into the box">
<option value="" disabled selected hidden>▾Load/Save</option>
</select><br>
<button type="button" class="controls borders" id="select_other_button"
title="Select all text in the box">Select</button><br>
<button type="button" class="controls borders" id="clear_other_button"
title="Clear the text in the box">Clear</button><br>
<input class="hidden controls borders" type="file" multiple="multiple"
name="file" accept=".js" id="load_other_input" />
</td><td class="td2_actions">
<a target="_blank" rel="external noopener noreferrer"
class="local_folder" href=".">Other</a><!--
-->/<a target="_blank" rel="external noopener noreferrer"
class="local_folder" href="prefs.js">prefs.js</a>
<textarea id="box_4_other"
ondrop="dropHandler4(event);" ondragover="dragOverHandler(event);"
placeholder=" Add other/user.js here (Use [Load] button, drag/drop or paste) (or used for action button input/output)"
></textarea>
</td></tr></table></div>
</div>
<!-- actions_buttons_div -->
<div id="actions_buttons_div"><!--
--><button type="button" class="controls borders" id="view_arkenfox_button"
title="View current arkenfox user.js in a table (Load in Box 1)">View arkenfox >1</button><!--
--><button type="button" class="controls borders" id="load_arkenfox_button"
title="Load current arkenfox user.js into Box 1">Load arkenfox >1</button><!--
--><select class="controls borders" id="compare_select"
title="Compare the user_pref of 2 boxes">
<option value="" disabled selected hidden>▾Compare</option>
<option>Compare box 1 & 1   A-Z</option>
<option>Compare box 1 & 2   ◦</option>
<option>Compare box 1 & 3   ◦</option>
<option>Compare box 1 & 4   ◦</option>
<option>Compare box 2 & 1</option>
<option>Compare box 2 & 2   A-Z</option>
<option>Compare box 2 & 3   ◦</option>
<option>Compare box 2 & 4   ◦</option>
<option>Compare box 3 & 1</option>
<option>Compare box 3 & 2</option>
<option>Compare box 3 & 3   A-Z</option>
<option>Compare box 3 & 4   ◦</option>
<option>Compare box 4 & 1</option>
<option>Compare box 4 & 2</option>
<option>Compare box 4 & 3</option>
<option>Compare box 4 & 4   A-Z</option>
</select><!--
--><button type="button" class="controls borders" id="append_button"
title="Append/apply overrides onto template to form user.js"
>Append 1+2>3</button><!--
--><button type="button" class="controls borders" id="skeleton_button"
title="Create a user-overrides.js skeleton"
>Skeleton 1>2</button><!--
--><button type="button" class="controls borders" id="collect_button"
title="Point and click overrides collector"
>Collect 1>+2</button><!--
--><button type="button" class="controls borders" id="reduce_button"
title="Reduce user.js to just user_pref lines"
>Reduce 1>4</button><!--
--><button type="button" class="controls borders" id="clean_button"
title="Remove user.js user_pref from another .js"
>Clean 4-3>4</button><!--
--><button type="button" class="controls borders" id="byvalue_button"
title="Group user_pref by value (eg for Android about:config)"
>By Value 3>4</button><!--
--><button type="button" class="controls borders" id="togroup_button"
title="Preference list to about:config?filter= group"
>To Group 4>4</button><!--
--><select class="controls borders" id="encode_select"
title="Encode/Decode text (Base64, URI)">
<option value="" disabled selected hidden>▾Encode 4>4</option>
<option>Encode text to Base64 (multi line)</option>
<option>Encode text to Base64</option>
<option>Decode Base64 to text</option>
<option>Encode URI Component</option>
<option>Decode URI Component</option>
<option>Encode URI</option>
<option>Decode URI</option>
<option>Escape for RegExp</option>
</select><!--
--><button type="button" class="controls borders" id="functions_button"
title="Functions for about:config (find (filter/list)/reset/set)"
>a:c Functions</button><!--
--><button type="button" class="controls borders" id="links_button"
title="Display some useful links (eg: arkenfox user.js, auto-load, profile folders)"
>Links</button><!--
--><button type="button" class="controls borders" id="help_button"
>Help/Info</button>
<br><br><br>Hints:<br>
<ul>
<br><li><a target="_blank" rel="external noopener noreferrer"
href="?at"
>To view the current arkenfox user.js in a table</a>
<br>Click the [View arkenfox] button, or use the above link.</li>
<br><li><a target="_blank" rel="external noopener noreferrer"
href="?a&action=collect"
>To collect/create Overrides from arkenfox user.js</a>
<br>Click [Load arkenfox] then [Collect], or use the above link.</li>
<br><li><b>What do the buttons do?</b>
<br>Hover mouse over buttons for their info, or click [Help/Info].</li>
<br><li><b>How to return here to [Actions]?</b>
<br>Click [Menu] choose [Actions], or try the [<b><</b>Back] button.</li>
<br><li><b>View or compare user.js</b>
<br>Place user.js text into the box(es) above using the [Load] button (or
drag/drop, copy/paste) then click [View], [Table View] or [Compare].</li>
<br><li><b>To append your user-overrides.js</b>
<br>Place the user.js template in Box 1 (or click [Load arkenfox]), place your
overrides in Box 2, then click [Append], resulting user.js will be in Box 3.</li>
<br><li><b>What are the numbers on some buttons?</b>
<br>It indicates "input>output" boxes, contents of the output box are
usually replaced, [Collect] amends the output box.</li>
<br><li><b>[Index] = section jump, [Groups] = about:config search patterns</b>
<br>These are updated after [View]/[Table View]/[Compare] are used.</li>
<br><li><a target="_blank" rel="external noopener noreferrer"
href="https://raw.githubusercontent.com/icpantsparti2/firefox-user.js-tool/master/userjs-tool-aboutconfig-functions.js"
>To get more out of about:config (eg: find, filter, list, save to file, etc)</a>
<br>Click [a:c Functions], or use the above link.</li>
<br><li><a target="_blank" rel="external noopener noreferrer"
href="?at&groups=true"
>For searching arkenfox user.js preferences in about:config</a>
<br>Click [View arkenfox] then [Groups], or use the above link.</li>
<br><li><a target="_blank" rel="external noopener noreferrer"
href="?box=a&action=togroup&load4=%68ttps://raw.githubusercontent.com/arkenfox/user.js/master/scratchpad-scripts/troubleshooter.js"
>For searching arkenfox troubleshooter.js preferences in about:config</a>
<br>Place troubleshooter.js in Box 4 click [To Group], or use the above link.</li>
</ul>
<br><br><br><br><br>
</div><!-- end: actions_buttons_div -->
</div><!-- end: actions_panel -->
<!-- *************************************
groups_panel
************************************* -->
<div id="groups_panel" class="panels borders">
<span class="close_panel_x" onclick="toggleGroupsPanel();"
title="Close [Groups] panel">×</span>
<!-- hidden heading (H1/H3/DL tags for bookmarks import compatibility) -->
<div class="hidden"><H3>[Groups] (copy/paste into about:config search box)</H3></div>
<b>[Groups] (copy/paste into about:config search box)</b> ([X] closes)<br>
(shortcut: right click link, L, hold Ctrl: T, V, Enter, V<br>
ie: right click, Copy Link, new tab, paste in url box, enter, paste in search box)<br>
<!-- (if bookmarked: right click, c, left click, Ctrl+V)<br> -->
<br>
<!-- >>>> user pref groups (between here) are replaced later <<<< -->
<div id="groups_container">
Please add user.js content under [Menu]>[Actions],
then use [View], [Table View], or [Compare].
</div>
<!-- >>>> user pref groups (between here) are replaced later <<<< -->
<br><br><br><br><br>
</div><!-- end: groups_panel -->
<!-- *************************************
links_panel
************************************* -->
<div id="links_panel" class="panels borders">
<span class="close_panel_x" onclick="toggleLinksPanel();"
title="Close [Links] panel">×</span>
<!-- hidden heading (H1/H3/DL tags for bookmarks import compatibility) -->
<div class="hidden"><H3>[Links]</H3></div>
<b>[Links]</b> ([X] closes)
<br><br>
When choosing a user.js template you need to consider if
it is suitable, good quality, and up to date. (At your own risk)<br>
<br><br>
user.js template example
<table class="table_links">
<tr><td class="td1_links">
<a target="_blank" rel="external noopener noreferrer"
href="https://raw.githubusercontent.com/arkenfox/user.js/master/user.js"
>arkenfox user.js #</a>
<br><br>(read their wiki) (listed on privacytools.io)
<br><br><a target="_blank" rel="external noopener noreferrer"
href="https://github.com/arkenfox/user.js/issues/123"
>arkenfox user.js deprecated-removed-legacy prefs (list)</a>
</td><td class="td2_links">
<a target="_blank" rel="external noopener noreferrer"
href="https://github.com/arkenfox/user.js"
><span class="hidden">__arkenfox user.js </span>project page</a>
<br><br><a target="_blank" rel="external noopener noreferrer"
href="https://github.com/arkenfox/user.js/wiki"
><span class="hidden">__arkenfox user.js </span>wiki</a>
<br><br><a target="_blank" rel="external noopener noreferrer"
href="https://github.com/arkenfox/user.js/issues?q=sort%3Aupdated-desc"
><span class="hidden">__arkenfox user.js </span>issues</a>
</td></tr>
</table>
<!-- note about URL parameters -->
<br><br>
Auto-loading (also see [Menu]>[Help/Info]>Initial states)
<table class="table_links">
<tr><td class="td2_links">
<a target="_blank" rel="external noopener noreferrer"
href="?a&box=a"
>Load current arkenfox user.js</a>
(or specific <a target="_blank" rel="external noopener noreferrer"
href="?box=a&load1=%68ttps://raw.githubusercontent.com/arkenfox/user.js/master/user.js"
><span class="hidden">Load current arkenfox user.js/</span>URL</a>)
</td></tr>
<tr><td class="td2_links">
<a target="_blank" rel="external noopener noreferrer"
href="?at"
>View current arkenfox user.js in a table</a>
(or specific <a target="_blank" rel="external noopener noreferrer"
href="?box=a&action=table1&load1=%68ttps://raw.githubusercontent.com/arkenfox/user.js/master/user.js"
><span class="hidden">View current arkenfox user.js in a table/</span>URL</a>)
</td></tr>
<tr><td class="td2_links">
<a target="_blank" rel="external noopener noreferrer"
href="?av"
>View current arkenfox user.js with styling</a>
(or specific <a target="_blank" rel="external noopener noreferrer"
href="?box=a&action=view1&load1=%68ttps://raw.githubusercontent.com/arkenfox/user.js/master/user.js"
><span class="hidden">View current arkenfox user.js with styling/</span>URL</a>)
</td></tr>
<tr><td class="td2_links">
<a target="_blank" rel="external noopener noreferrer"
href="?a&action=collect"
>Overrides collector (using arkenfox)</a> (by clicking values/"user_pref")
</td></tr>
<tr><td class="td2_links">
<a target="_blank" rel="external noopener noreferrer"
href="?load2=data:text/plain;base64,Ly8gdGhpcyB0ZXh0IHdhcyBpbiB0aGUgbGluay9ib29rbWFyayAodXNpbmcgQmFzZTY0KQovLyAoZG8gbm90IHB1dCBhbnl0aGluZyBwcml2YXRlKQoKLy8gdXNlci1vdmVycmlkZXMuanMKLy8vLyAtLS0gYWRkLW92ZXJyaWRlLWNvbW1lbnQgLS0tCi8qKiogVElUTEUgKioqLwp1c2VyX3ByZWYoInByZWYubmFtZSIsIG51bGwpOwovLy8vIC0tLSBjb21tZW50LW91dCAtLS0gJ3ByZWYubmFtZScK"
>load some non private text (?load2=data:text/plain;base64,...)</a>
</td></tr>
</table>
<!-- example links for preference groups -->
<br><br>
Auto-load about:config Groups (for about:config search box to display multiple preferences)
<table class="table_links">
<tr><td class="td2_links">
<a target="_blank" rel="external noopener noreferrer"
href="?at&groups=true"
>Groups from arkenfox user.js by section</a>
(or specific <a target="_blank" rel="external noopener noreferrer"
href="?groups=true&box=a&action=table1&load1=%68ttps://raw.githubusercontent.com/arkenfox/user.js/master/user.js"
><span class="hidden">Groups from arkenfox user.js by section/</span>URL</a>)
</td></tr>
<tr><td class="td2_links">
<a target="_blank" rel="external noopener noreferrer"
href="?box=a&action=byvalue&load3=%68ttps://raw.githubusercontent.com/arkenfox/user.js/master/user.js"
>Groups from arkenfox user.js by value</a>
</td></tr>
<tr><td class="td2_links">
<a target="_blank" rel="external noopener noreferrer"
href="?box=a&action=togroup&load4=%68ttps://raw.githubusercontent.com/arkenfox/user.js/master/scratchpad-scripts/troubleshooter.js"
>Groups from arkenfox troubleshooter.js</a>
</td></tr>
<tr><td class="td2_links">
<a target="_blank" rel="external noopener noreferrer"
href="?box=a&action=togroup&load4=%68ttps://raw.githubusercontent.com/arkenfox/user.js/master/scratchpad-scripts/arkenfox-cleanup.js"
>Groups from arkenfox-cleanup.js</a>
</td></tr>
</table>
<!-- ***** profile locations ***** -->
<br><br>
Profile Locations (see <a target="_blank" rel="external noopener noreferrer"
href="about:profiles">about:profiles</a> in a new tab)
<table class="table_links">
<tr><td class="td1_links">
file:///C:/Users/USERNAME/AppData/Roaming/Mozilla/Firefox/Profiles
</td><td class="td2_links">
<a target="_blank" rel="external noopener noreferrer"
href="file:///C:/Users/USERNAME/AppData/Roaming/Mozilla/Firefox/Profiles"
><span class="hidden">Firefox profile: </span>Windows</a>
</td></tr>
<tr><td class="td1_links">
file:///data/data/org.mozilla.firefox/files/mozilla
</td><td class="td2_links">
<a target="_blank" rel="external noopener noreferrer"
href="file:///data/data/org.mozilla.firefox/files/mozilla"
><span class="hidden">Firefox profile: </span>Android</a>
</td></tr>
<tr><td class="td1_links">
file:///data/data/org.mozilla.fenix/files/mozilla
</td><td class="td2_links">
<a target="_blank" rel="external noopener noreferrer"
href="file:///data/data/org.mozilla.fenix/files/mozilla"
><span class="hidden">Firefox profile: </span>Android Nightly</a>
</td></tr>
<tr><td class="td1_links">
file:///Users/USERNAME/Library/Application Support/Firefox/Profiles
</td><td class="td2_links">
<a target="_blank" rel="external noopener noreferrer"
href="file:///Users/USERNAME/Library/Application%20Support/Firefox/Profiles"
><span class="hidden">Firefox profile: </span>OS X</a>
</td></tr>
<tr><td class="td1_links">
file:///home/USERNAME/.mozilla/firefox
</td><td class="td2_links">
<a target="_blank" rel="external noopener noreferrer"
href="file:///home/USERNAME/.mozilla/firefox"
><span class="hidden">Firefox profile: </span>Linux</a>
</td></tr>
</table>
<br><br><br><br><br></div><!-- end: links_panel -->
<!-- *************************************
functions_panel
************************************* -->
<div id="functions_panel" class="panels borders">
<span class="close_panel_x" onclick="toggleFunctionsPanel();"
title="Close [Functions] panel">×</span>
<b>[about:config Functions]</b> ([X] closes)<br><br>
<button type="button" class="controls borders" id="select_functions_button"
title="Select all text in the box">Select</button>
<br><br><br><textarea id="functions_panel_textarea" autofocus="true"></textarea>
<br><br><br><br><br></div><!-- end: functions_panel -->
<!-- *************************************
help_panel (visible when JavaScript is off)
************************************* -->
<div id="help_panel" class="panels borders">
<span class="close_panel_x" onclick="toggleHelpPanel();"
title="Close [Help] panel">×</span>
<!-- hidden heading (H1/H3/DL tags for bookmarks import compatibility) -->
<div class="hidden"><H3>[Help/Info]</H3></div>
<b>[Help/Info] (userjs-tool.html)</b> ([X] closes)<br><br>
<!-- javascript off message -->
<div id="help_panel_nojs_div" class="borders">
Hi! This requires JavaScript for dynamically rendering the HTML
interface, interactions and calculations.<br>
<br>
If you see this message perhaps JavaScript is off, or controlled by
an extension such as: uBlock Origin, uMatrix, NoScript.<br>
</div><hr>
<!-- version/links -->
<br>
Interactive view, compare, and more for Firefox user.js (eg arkenfox user.js).<br>
<br>
Version : 2022.04.08<br>
Project :
<a target="_blank" rel="external noopener noreferrer"
href="https://github.com/icpantsparti2/firefox-user.js-tool"
>firefox-user.js-tool (GitHub)</a> (updates/issues/etc)<br>
File :
<a target="_blank" rel="external noopener noreferrer"
href="https://raw.githubusercontent.com/icpantsparti2/firefox-user.js-tool/master/userjs-tool.html"
>userjs-tool.html (<span class="hidden">file/</span>GitHub)</a><br>
On-line :
<a target="_blank" rel="external noopener noreferrer"
href="https://icpantsparti2.github.io/firefox-user.js-tool/userjs-tool.html"
>userjs-tool.html (<span class="hidden">on-line/</span>GitHub Pages)</a><br>
License :
<a target="_blank" rel="external noopener noreferrer"
href="https://raw.githubusercontent.com/icpantsparti2/firefox-user.js-tool/master/LICENSE"
><span class="hidden">firefox-user.js-tool - </span>MIT License (GitHub)</a><br>
Disclaimer: Use with care at your own risk, and verify any results
<br><br>This is coded in HTML/CSS/JavaScript with no cross domain dependency.
Open on-line or save the html/css/js files for off-line use.
<br><br><hr>
<!-- Introduction -->
<br><details><summary>Introduction</summary>
<div class="indentdiv"><br>
Display a Mozilla Firefox user.js settings file contents
in your Firefox browser, with:<br>
<ul>
<br><li>highlighting, links, themes*, re-size, wrap,
about:config links/regex/groups</li>
<br><li>expanding sections, and index to go to sections
(with compatible user.js projects)</li>
<br><li>compare preferences in two user.js, in a table format with
order/layout options and bold cell border around differences</li>
<br><li>actions including: user-overrides.js* append* (with
comment-out*), point and click overrides collector, skeleton,
prefs.js cleaner*, group by values</li>
<br><li>load/save, drag/drop, or copy/paste user.js files
(can load from some on-line URLs too)</li>
<br><li>functions for find (filter/list)/reset/set on about:config
Web Console (Firefox/forks/Thunderbird/SeaMonkey)</li>
<br><li>coded in HTML/CSS/JavaScript with no cross domain dependency</li>
<br><li>open userjs-tool.html on-line or save for off-line use</li>
</ul>
<br>(*<a target="_blank" rel="external noopener noreferrer"
href="https://github.com/arkenfox/user.js"
>arkenfox user.js 💎</a> inspired, see "Acknowledgments" section below.
Please visit them and read their wiki/info, they
have nice scripts for append/clean/troubleshoot.)
<br><br>This started as an over the top experiment for learning some
HTML/CSS/JavaScript (first released 2019.01.02, compare added 2020.02.22).
<br>This is a viewer/tool, and not an editor/installer.
<br><br></div><hr></details>
<!-- user.js (and user-overrides.js) -->
<br><details><summary>user.js (and user-overrides.js)</summary>
<div class="indentdiv"><br>
A user.js file can be used by Mozilla Firefox (some forks and Thunderbird)
for configuration. It allows you to enforce preference settings
(user_pref) on browser start up. These are the settings
accessed when you type 'about:config' into the URL address box.
(See: <a target="_blank" rel="external noopener noreferrer"
href="http://kb.mozillazine.org/User.js_file"
>mozillaZine User.js file</a>
and <a target="_blank" rel="external noopener noreferrer"
href="https://github.com/arkenfox/user.js/wiki"
>arkenfox user.js wiki</a>)
<br><br>The user.js file needs to be placed in your Firefox
profile folder, type 'about:profiles' into the URL address box
to help find this. Make a backup copy of your Firefox
profile folder.
<br><br>Various online sites provide details of user_pref settings.
Some projects (ie arkenfox user.js) publish their user.js
template, with instructions and information/wiki.
These projects may update their content regularly,
keep your user.js up to date, settings may also change with
each Firefox version.
<br><br>A user-overrides.js file is not used directly by Firefox,
it is a arkenfox user.js idea, please read about this at the wiki
link given above. Basically, you take a projects user.js
template, and append your user-overrides.js onto it, to form
your user.js. The user-overrides.js file contains your
personal user_pref settings including any differences you
require. (user-template.js + user-overrides.js = user.js)
<br><br>There is no user.js content distributed with this HTML file,
user.js templates can be obtained from third party sources and are
subject to their license. If this HTML file contains any user.js
code then it has been added at a later stage by another party or end user,
or it has been auto loaded using URL parameter options.
<br><br></div><hr></details>
<!-- Loading content -->
<br><details><summary>Loading content</summary>
<div class="indentdiv"><br>
Load user.js content into the text boxes by:<br>
<div class="indentdiv">
<br><details><summary>PASTE (directly into the text box)</summary>
<div class="indentdiv"><br>
Paste the content into the text boxes under [Menu]>[Actions].
Open the user.js first in a text editor or in a browser tab to copy it.
A link for arkenfox user.js is provided under [Menu]>[Links].
<br><br>
The links shown above the text input boxes can also be used to open files in
a browser tab for copy/paste.
<br><br>
Those links are to files in a folder that is either, in the same location
as you placed the userjs-tool.html file, or in the location specified by
the folder= URL parameter (see Initial states).
</div></details>
<br><details><summary>[Load] (local file or from URL)</summary>
<div class="indentdiv"><br>
Use the [Menu]>[Actions]>[Load] buttons to open the browser file
selection dialog for local files, or load a file from a URL (input/pick).
<br><br>
With local files, select a single local .js file to load into the
current text box, or select multiple files for loading into Boxes 1/2/3/4
(tries to match file names to the boxes). (You can drag files into the
file selector to display that file location.) (You can also use the local
links shown above the text input boxes. Right click and
"Copy Link Location", then when the file selector is open press Ctrl-V
(paste) and the selector will display that file location. Those links
are to files in a folder that is either, in the same location
as you placed the userjs-tool.html file, or in the location specified by the
folder= URL parameter (see Initial states).)
<br><br>
When loading from a URL, if you use extensions that control fetch/XMLHttpRequest
you might have to allow the connection (eg uMatrix XHR). Some sites may
not allow file fetch, visit the URL and copy/paste instead.
</div></details>
<br><details><summary>DRAG (and drop into the text box)</summary>
<div class="indentdiv"><br>
Single file into the box, or multiple files are matched by name to
load into the other boxes.
</div></details>
<br><details><summary>AUTO (load file from a URL)</summary>
<div class="indentdiv"><br>
Automatic load of file from a URL, specified with combinations of URL
variables (see "Initial states" below,
eg ?expand=true&action=view1&load1=URL).
<br><br>
When loading from a URL, if you use extensions that control fetch/XMLHttpRequest
you might have to allow the connection (eg uMatrix XHR). Some sites may
not allow file fetch, visit the site and copy/paste instead.
<br><br>
(Default browser security prevents loading same origin local files (file://...)
with this method, and changing the "security.fileuri.strict_origin_policy"
preference to false is not recommended as it relaxes more than just this.)
</div></details>
<br><details><summary>EMBED (not recommended, will need maintaining)</summary>
<div class="indentdiv"><br>
Edit this HTML file and paste "base64 encoded user.js" data
within the <body> section (near the end). It will be
decoded and displayed on opening. See the
[Menu]>[Actions]>[Encode] option.
</div></details>
</div>
<br></div><hr></details>
<!-- Theme -->
<br><details><summary>Theme</summary>
<div class="indentdiv"><br>
This is not syntax highlighting, just simple highlighting.
Inactive user_pref (those within comments)
have the same highlighting style as active user_pref.
<br><br>
[Menu]>"View+ style on view" is on by default, this shows in-block
comments as in-line comments, if you set this off some inactive user_pref
will have '//' preceding them, others within '/* */' comment blocks (which
may be multi-line) will have no style indicating they are inactive.
<br><br>
Some arkenfox user.js sections (such as: RFP ALTERNATIVES, and
DEPRECATED/ESR) use comment blocks, a text editor (such as Kate, Notepad++,
or Meld diff tool) would grey out everything in those commented sections,
this viewer does not.
<br><br>
Opens using default theme, unless the theme to use is specified with URL
variables (see "Initial states" below). If you want to override the
default theme with your own colors, or to add more custom color themes,
edit the "userjs-tool-themes.css" file.
<br><br></div><hr></details>
<!-- about:config links/[Groups] -->
<br><details><summary>about:config links and [Groups] (search/regex/Web Console)</summary>
<div class="indentdiv"><br>
<!-- links/search -->
Due to Firefox security, about:config links will not open
when clicked, either:<br>
<div class="indentdiv">
<br><details><summary>(Firefox v71+ paste link into about:config's search box)</summary>
<div class="indentdiv"><br>
The Firefox about:config page changed from Desktop version 71 and
"about:config?filter=" style search links are deprecated, they still open
the "about:config" page, and you can then paste the unedited link into the
about:config search box (because the links here are styled to work).
</div></details>