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.
36:
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
105:
68:
32:
64:
636:/* The url generated above adds the parameter trimsearch=1 when "Source links" is clicked.
515:// EXAMPLE URL: https://en.wikipedia.org/search/?title=%F0%9F%91%A9%F0%9F%8F%BF&action=history
119:/* This script adds "Source links" below "What links here" in the sidebar.
17:
643:
If it's present then trim search results by hiding two classes for images and data. */
133:"Source links" tries to search for pages where the link is in the source.
126:"What links here" will include pages using a template with the link.
57:
80:
After saving, you have to bypass your browser's cache to see the changes.
151:
importScript('User:PrimeHunter/Source links.js'); // Linkback: ]
104:
toolbar button. For details and instructions about other browsers, see
140:
To use the script, add the following line to
Special:MyPage/common.js:
52:
26:
315:'?trimsearch=1&profile=all&search='
8:
97:
591:'What links here in the source'
45:be executed when previewing this page.
808:'searchResultImage-thumbnail'
7:
243:"Special:WhatLinksHere/"
112:
24:
106:Knowledge (XXG):Bypass your cache
611:'#t-recentchangeslinked'
56:
929:'mw-search-result-data'
438:/{}()*+!<=:?.\/\\^$ |#\s,]/g
1:
69:User:PrimeHunter/Source links
1046:
1026:
1019:
991:
936:
905:
898:
870:
815:
784:
759:
728:
700:
678:
647:
640:
633:
629:
622:
615:
608:
598:
588:
578:
568:
558:
548:
526:
519:
500:
478:
411:
368:
349:'insource:"'
322:
279:
269:
256:
201:
170:
581:'pt-sourcelinks'
331:'linksto:"'
306:'Special:Search'
166:
159:
155:
148:
144:
137:
130:
123:
116:
113:
37:appropriate village pump
63:Documentation for this
923:getElementsByClassName
802:getElementsByClassName
571:'Source links'
752:'trimsearch'
231:'wgPageName'
444:'\\$ &'
325:encodeURIComponent
100:key and click the
371:'insource:/\\
361:'" '
343:'" '
75:
74:
49:
48:
1037:
1031:
1030:
1024:
1023:
1017:
1016:
1013:
1010:
1007:
1004:
1001:
998:
995:
989:
988:
985:
982:
979:
976:
973:
970:
967:
964:
961:
958:
955:
952:
949:
946:
943:
940:
934:
933:
930:
927:
924:
921:
918:
915:
912:
909:
903:
902:
896:
895:
892:
889:
886:
883:
880:
877:
874:
868:
867:
864:
861:
858:
855:
852:
849:
846:
843:
840:
837:
834:
831:
828:
825:
822:
819:
813:
812:
809:
806:
803:
800:
797:
794:
791:
788:
782:
781:
778:
775:
772:
769:
766:
763:
757:
756:
753:
750:
747:
744:
741:
738:
735:
732:
726:
725:
722:
719:
716:
713:
710:
707:
704:
698:
697:
694:
691:
688:
685:
682:
676:
675:
672:
669:
666:
663:
660:
657:
654:
651:
645:
644:
638:
637:
631:
627:
626:
620:
619:
613:
612:
606:
605:
602:
596:
595:
592:
586:
585:
582:
576:
575:
572:
566:
565:
562:
556:
555:
552:
546:
545:
542:
539:
536:
533:
530:
524:
523:
517:
516:
513:
510:
509:'#error'
507:
504:
498:
497:
494:
491:
488:
485:
482:
476:
475:
472:
469:
466:
463:
460:
457:
454:
453:'\\|#]/'
451:
448:
445:
442:
439:
436:
433:
430:
427:
424:
421:
418:
415:
409:
408:
405:
402:
399:
396:
393:
390:
387:
384:
381:
378:
375:
372:
366:
365:
362:
359:
356:
353:
350:
347:
344:
341:
338:
335:
332:
329:
326:
320:
319:
316:
313:
310:
307:
304:
301:
298:
295:
292:
289:
286:
283:
277:
276:
273:
267:
266:
263:
260:
254:
253:
250:
247:
244:
241:
238:
235:
232:
229:
226:
223:
220:
217:
214:
211:
208:
205:
199:
198:
195:
192:
189:
186:
183:
180:
177:
174:
168:
164:
163:
157:
153:
152:
146:
142:
141:
135:
134:
128:
127:
121:
120:
109:
96:: Hold down the
67:can be added at
60:
53:
27:
18:User:PrimeHunter
1045:
1044:
1040:
1039:
1038:
1036:
1035:
1034:
1033:
1032:
1028:
1025:
1021:
1018:
1014:
1011:
1008:
1005:
1002:
999:
996:
993:
990:
986:
983:
980:
977:
974:
971:
968:
965:
962:
959:
956:
953:
950:
947:
944:
941:
938:
935:
931:
928:
925:
922:
919:
916:
913:
910:
907:
904:
900:
897:
893:
890:
887:
884:
881:
878:
875:
872:
869:
865:
862:
859:
856:
853:
850:
847:
844:
841:
838:
835:
832:
829:
826:
823:
820:
817:
814:
810:
807:
804:
801:
798:
795:
792:
789:
786:
783:
779:
776:
773:
770:
767:
764:
761:
758:
754:
751:
748:
745:
742:
739:
736:
733:
730:
727:
723:
720:
717:
715:URLSearchParams
714:
711:
708:
705:
702:
699:
695:
692:
689:
686:
683:
680:
677:
673:
670:
667:
664:
661:
658:
655:
652:
649:
646:
642:
639:
635:
632:
628:
624:
621:
617:
614:
610:
607:
603:
600:
597:
593:
590:
587:
583:
580:
577:
573:
570:
567:
563:
560:
557:
553:
550:
547:
543:
540:
537:
534:
531:
528:
525:
521:
518:
514:
511:
508:
505:
502:
499:
495:
492:
489:
486:
483:
480:
477:
473:
470:
467:
464:
461:
458:
455:
452:
449:
446:
443:
440:
437:
434:
431:
428:
425:
422:
419:
416:
413:
410:
406:
403:
400:
397:
394:
391:
388:
385:
382:
379:
376:
373:
370:
367:
363:
360:
357:
354:
351:
348:
345:
342:
339:
336:
333:
330:
327:
324:
321:
317:
314:
311:
308:
305:
302:
299:
296:
293:
290:
287:
284:
281:
278:
274:
271:
268:
264:
261:
258:
255:
251:
248:
245:
242:
239:
236:
233:
230:
227:
224:
221:
218:
215:
212:
209:
206:
203:
200:
196:
193:
190:
187:
184:
181:
178:
175:
172:
169:
165:
161:
158:
154:
150:
147:
143:
139:
136:
132:
129:
125:
122:
118:
115:
111:
110:
99:
76:
50:
40:
22:
21:
20:
12:
11:
5:
1043:
1041:
1012:'none'
891:'none'
551:'p-tb'
541:addPortletLink
114:
90:Microsoft Edge
73:
72:
61:
51:
47:
46:
25:
23:
15:
14:
13:
10:
9:
6:
4:
3:
2:
1042:
1027:
1020:
992:
937:
906:
899:
871:
816:
785:
760:
729:
701:
679:
648:
641:
634:
630:
623:
616:
609:
599:
589:
579:
569:
559:
549:
527:
520:
501:
479:
471:" "
412:
369:
323:
280:
270:
257:
202:
171:
167:
160:
156:
149:
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:
873:searchimages
845:searchimages
790:searchimages
249:""
101:
93:
89:
85:
81:
77:
42:
774:'1'
721:queryString
693:queryString
653:queryString
404:']'
395:toLowerCase
65:user script
994:searchdata
966:searchdata
911:searchdata
768:trimsearch
734:trimsearch
41:This code
740:urlParams
706:urlParams
420:substring
917:document
796:document
665:location
191:function
1006:display
885:display
681:console
459:replace
432:replace
237:replace
98:⇧ Shift
86:Firefox
33:A guide
972:length
851:length
671:search
659:window
383:charAt
300:getUrl
219:config
179:loader
102:Reload
94:Safari
1000:style
879:style
731:const
703:const
650:const
484:catch
185:using
78:Note:
16:<
963:<
842:<
601:null
535:util
465:/_/g
414:name
377:name
355:name
337:name
294:util
207:name
92:and
43:will
945:var
939:for
908:var
824:var
818:for
787:var
771:===
746:get
712:new
687:log
625:});
561:url
503:url
282:url
272:try
262:url
259:var
225:get
204:var
981:++
932:);
860:++
811:);
762:if
755:);
724:);
696:);
618:);
529:mw
474:);
456:).
429:).
398:()
392:).
288:mw
252:);
234:).
213:mw
194:()
188:(,
173:mw
162:*/
88:,
84:,
1029:}
1022:}
1015:;
1009:=
1003:.
997:.
987:{
984:)
978:i
975:;
969:.
960:i
957:;
954:0
951:=
948:i
942:(
926:(
920:.
914:=
901:}
894:;
888:=
882:.
876:.
866:{
863:)
857:i
854:;
848:.
839:i
836:;
833:0
830:=
827:i
821:(
805:(
799:.
793:=
780:{
777:)
765:(
749:(
743:.
737:=
718:(
709:=
690:(
684:.
674:;
668:.
662:.
656:=
604:,
594:,
584:,
574:,
564:,
554:,
544:(
538:.
532:.
522:}
512:;
506:=
496:{
493:)
490:e
487:(
481:}
468:,
462:(
450:+
447:)
441:,
435:(
426:1
423:(
417:.
407:+
401:+
389:0
386:(
380:.
374:+
364:+
358:+
352:+
346:+
340:+
334:+
328:(
318:+
312:+
309:)
303:(
297:.
291:.
285:=
275:{
265:;
246:,
240:(
228:(
222:.
216:.
210:=
197:{
182:.
176:.
108:.
71:.
39:.
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.