58:
30:
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by
31:
others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes.
68:
36:
189:// * Fix bug where the tools menu was no longer appearing on TOC-less pages, after another set of class and ID changes in the theme
35:
to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the
224:// * Fix bug where the nav with id mw-panel-toc needs to have its margin-left set to 0px when it's added to ToCless pages.
238:// * Fix the tools menu not being appended on TOC-less pages after the previously always present nav I was relying on was removed
203:// * Fix bug where the tools menu was no longer being added to TOC-less pages, after some class and id changes in the theme
105:
161:// - If the Main Menu is hidden, the CSS for this breaks. I think I just need to add another check to make sure
154:// the "focused" header is, if you've scrolled down to access the toolsbar it will jump back up
32:
712:// it does, so we're on a page that has a ToC. This code is simpler, as we just want to append the tools bar
64:
217:// * Fix bug where the className on the containers was not being set properly for newly created elements
147:// - On pages with a ToC, scrolling the main content area will cause the stick panel to jump to whatever
17:
501:"mw-table-of-contents-container vector-toc-landmark vector-sticky-pinned-container"
168:// The parent containers exist when the menu is hidden, and if not create empty ones
652:// because enabling the tools bar will break this, we want to force it to disabled
278:// does the document contain an element with the id "mw-panel-toc"
57:
80:
After saving, you have to bypass your browser's cache to see the changes.
104:
toolbar button. For details and instructions about other browsers, see
567:// append this nav as a child to div with clas mw-page-container-inner
52:
26:
352:// get the div with the class name mw-page-container-inner
853:// and finally append the tools bar to the floating ToC
677:// and finally append the tools bar to the floating ToC
425:// so we now need to create a NAV with id mw-panel-toc
460:// assign it the right ID, classes, and arialabel
345:// it does not, so we're on a ToCless page
8:
97:
69:User:Sideswipe9th/V22FloatingToolsMenu
67:seems to have a documentation page at
45:be executed when previewing this page.
7:
787:// then grab the floating TOC by ID
133:// Last edit date: 12 December 2023
112:
24:
753:// first grab the tools bar by ID
106:Knowledge (XXG):Bypass your cache
627:// then grab the tools bar by ID
56:
380:"vector-column-start"
1:
747:"vector-page-tools"
621:"vector-page-tools"
719:// to the end of vector-toc
902:
882:
875:
871:
864:
857:
832:
825:
791:
757:
723:
716:
709:
702:
695:
688:
681:
656:
631:
597:
593:
571:
564:
530:
508:
486:
464:
457:
429:
422:
415:
387:
356:
349:
342:
335:
313:
282:
275:
256:
249:
242:
235:
228:
221:
214:
207:
200:
193:
186:
179:
479:"mw-panel-toc"
306:"mw-panel-toc"
172:
165:
158:
151:
144:
137:
130:
123:
116:
113:
37:appropriate village pump
551:"margin-left"
781:"vector-toc"
374:getElementsByClassName
196:// - 27 November 2023
182:// - 12 December 2023
252:// * Initial release
245:// - 18 February 2023
523:"Contents"
210:// - 6 April 2023
126:// By Sideswipe9th
100:key and click the
885://</nowiki>
231:// - 4 March 2023
75:
74:
49:
48:
18:User:Sideswipe9th
893:
887:
886:
880:
879:
873:
869:
868:
862:
861:
855:
854:
851:
848:
845:
842:
839:
836:
830:
829:
823:
822:
819:
816:
813:
810:
807:
804:
801:
798:
795:
789:
788:
785:
782:
779:
776:
773:
770:
767:
764:
761:
755:
754:
751:
748:
745:
742:
739:
736:
733:
730:
727:
721:
720:
714:
713:
707:
706:
700:
699:
693:
692:
686:
685:
679:
678:
675:
672:
669:
666:
663:
660:
654:
653:
650:
647:
644:
641:
638:
635:
629:
628:
625:
622:
619:
616:
613:
610:
607:
604:
601:
595:
591:
590:
587:
584:
581:
578:
575:
569:
568:
562:
561:
558:
555:
552:
549:
546:
543:
540:
537:
534:
528:
527:
524:
521:
518:
515:
512:
506:
505:
502:
499:
496:
493:
490:
484:
483:
480:
477:
474:
471:
468:
462:
461:
455:
454:
451:
448:
445:
442:
439:
436:
433:
427:
426:
420:
419:
413:
412:
409:
406:
403:
400:
397:
394:
391:
385:
384:
381:
378:
375:
372:
369:
366:
363:
360:
354:
353:
347:
346:
340:
339:
333:
332:
329:
326:
323:
320:
317:
311:
310:
307:
304:
301:
298:
295:
292:
289:
286:
280:
279:
273:
272:
269:
266:
263:
260:
254:
253:
247:
246:
240:
239:
233:
232:
226:
225:
219:
218:
212:
211:
205:
204:
198:
197:
191:
190:
184:
183:
177:
176:
170:
169:
163:
162:
156:
155:
149:
148:
142:
141:
135:
134:
128:
127:
121:
120:
119://<nowiki>
109:
96:: Hold down the
60:
53:
27:
901:
900:
896:
895:
894:
892:
891:
890:
889:
888:
884:
881:
877:
874:
870:
866:
863:
859:
856:
852:
849:
846:
843:
840:
837:
834:
831:
827:
824:
820:
817:
814:
811:
808:
805:
802:
799:
796:
793:
790:
786:
783:
780:
777:
774:
771:
768:
765:
762:
759:
756:
752:
749:
746:
743:
740:
737:
734:
731:
728:
725:
722:
718:
715:
711:
708:
704:
701:
697:
694:
690:
687:
683:
680:
676:
673:
670:
667:
664:
661:
658:
655:
651:
648:
645:
642:
639:
636:
633:
630:
626:
623:
620:
617:
614:
611:
608:
605:
602:
599:
596:
592:
588:
585:
582:
579:
576:
573:
570:
566:
563:
559:
557:"0px"
556:
553:
550:
547:
544:
541:
538:
535:
532:
529:
525:
522:
519:
516:
513:
510:
507:
503:
500:
497:
494:
491:
488:
485:
481:
478:
475:
472:
469:
466:
463:
459:
456:
452:
450:"NAV"
449:
446:
443:
440:
437:
434:
431:
428:
424:
421:
417:
414:
410:
407:
404:
401:
398:
395:
392:
389:
386:
382:
379:
376:
373:
370:
367:
364:
361:
358:
355:
351:
348:
344:
341:
337:
334:
330:
327:
324:
322:navTocContainer
321:
318:
315:
312:
308:
305:
302:
299:
296:
293:
290:
288:navTocContainer
287:
284:
281:
277:
274:
270:
267:
264:
261:
258:
255:
251:
248:
244:
241:
237:
234:
230:
227:
223:
220:
216:
213:
209:
206:
202:
199:
195:
192:
188:
185:
181:
178:
174:
171:
167:
164:
160:
157:
153:
150:
146:
143:
139:
136:
132:
129:
125:
122:
118:
115:
111:
110:
99:
76:
50:
40:
22:
21:
20:
12:
11:
5:
899:
897:
775:getElementById
741:getElementById
615:getElementById
300:getElementById
175:// Change log:
140:// Known bugs:
114:
90:Microsoft Edge
73:
72:
61:
51:
47:
46:
25:
23:
15:
14:
13:
10:
9:
6:
4:
3:
2:
898:
883:
876:
872:
865:
858:
833:
826:
792:
758:
724:
717:
710:
703:
696:
689:
682:
657:
632:
598:
594:
574:pageContainer
572:
565:
531:
509:
487:
465:
458:
444:createElement
430:
423:
416:
396:pageContainer
388:
362:pageContainer
357:
350:
343:
336:
314:
283:
276:
257:
250:
243:
236:
229:
222:
215:
208:
201:
194:
187:
180:
173:
166:
159:
152:
145:
138:
131:
124:
117:
107:
103:
95:
91:
87:
83:
82:Google Chrome
79:
70:
66:
62:
59:
55:
54:
44:
38:
34:
29:
28:
19:
101:
93:
89:
85:
81:
77:
42:
841:appendChild
835:floatingToC
800:floatingToC
763:floatingToC
665:appendChild
580:appendChild
545:setProperty
65:user script
809:&&
41:This code
517:arialabel
495:className
847:toolsBar
812:toolsBar
769:document
735:document
729:toolsBar
671:toolsBar
640:disabled
634:toolsBar
609:document
603:toolsBar
438:document
368:document
294:document
265:function
98:⇧ Shift
86:Firefox
33:A guide
402:length
102:Reload
94:Safari
539:style
78:Note:
63:This
16:<
818:null
806:null
698:else
646:true
405:>
328:null
92:and
43:will
878:});
760:var
726:var
659:nav
600:var
586:nav
533:nav
511:nav
489:nav
467:nav
432:nav
359:var
285:var
850:);
815:!=
803:!=
794:if
784:);
750:);
674:);
624:);
589:);
560:);
473:id
453:);
390:if
383:);
325:==
316:if
309:);
268:()
259:$
88:,
84:,
867:}
860:}
844:(
838:.
828:{
821:)
797:(
778:(
772:.
766:=
744:(
738:.
732:=
705:{
691:}
684:}
668:(
662:.
649:;
643:=
637:.
618:(
612:.
606:=
583:(
577:.
554:,
548:(
542:.
536:.
526:;
520:=
514:.
504:;
498:=
492:.
482:;
476:=
470:.
447:(
441:.
435:=
418:{
411:)
408:0
399:.
393:(
377:(
371:.
365:=
338:{
331:)
319:(
303:(
297:.
291:=
271:{
262:(
108:.
71:.
39:.
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.