-
Notifications
You must be signed in to change notification settings - Fork 26
/
mb_ALL-LINKS.user.js
1687 lines (1687 loc) · 72.8 KB
/
mb_ALL-LINKS.user.js
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
// ==UserScript==
// @name mb. ALL LINKS
// @version 2024.10.3
// @description Hidden links include fanpage, social network, etc. (NO duplicates) Generated autolinks (configurable) includes plain web search, auto last.fm, Discogs and lyrics searches, etc. Shows begin/end dates on URL and provides edit link. Expands Wikidata links to wikipedia articles.
// @namespace https://github.com/jesus2099/konami-command
// @supportURL https://github.com/jesus2099/konami-command/labels/mb_ALL-LINKS
// @downloadURL https://github.com/jesus2099/konami-command/raw/master/mb_ALL-LINKS.user.js
// @author jesus2099
// @licence CC-BY-NC-SA-4.0; https://creativecommons.org/licenses/by-nc-sa/4.0/
// @licence GPL-3.0-or-later; http://www.gnu.org/licenses/gpl-3.0.txt
// @since 2011-08-02; https://web.archive.org/web/20131103162328/userscripts.org/scripts/show/108889 / https://web.archive.org/web/20141011084020/userscripts-mirror.org/scripts/show/108889
// @icon data:image/gif;base64,R0lGODlhEAAQAMIDAAAAAIAAAP8AAP///////////////////yH5BAEKAAQALAAAAAAQABAAAAMuSLrc/jA+QBUFM2iqA2ZAMAiCNpafFZAs64Fr66aqjGbtC4WkHoU+SUVCLBohCQA7
// @require https://github.com/jesus2099/konami-command/raw/de88f870c0e6c633e02f32695e32c4f50329fc3e/lib/SUPER.js?version=2022.3.24.224
// @grant none
// @match *://*.musicbrainz.org/area/*
// @match *://*.musicbrainz.org/artist/*
// @match *://*.musicbrainz.org/event/*
// @match *://*.musicbrainz.org/genre/*
// @match *://*.musicbrainz.org/instrument/*
// @match *://*.musicbrainz.org/label/*
// @match *://*.musicbrainz.org/place/*
// @match *://*.musicbrainz.org/recording/*
// @match *://*.musicbrainz.org/release/*
// @match *://*.musicbrainz.org/release-group/*
// @match *://*.musicbrainz.org/series/*
// @match *://*.musicbrainz.org/url/*
// @match *://*.musicbrainz.org/work/*
// @exclude *.org/*/*/*annotat*
// @exclude *.org/*/*/*create*
// @exclude *.org/*/*/*delete*
// @exclude *.org/*/*/*edit*
// @exclude *.org/*/*/*merge*
// @exclude *.org/*/*/*remove*
// @exclude *.org/*/*/*split*
// @exclude *.org/*/*/add-alias*
// @exclude *.org/*/*annotat*
// @exclude *.org/*/*create*
// @exclude *.org/*/*delete*
// @exclude *.org/*/*edit*
// @exclude *.org/*/*merge*
// @exclude *.org/*/*remove*
// @exclude *.org/*/*split*
// @exclude *.org/release/add
// @exclude *.org/release/add?*
// @run-at document-end
// ==/UserScript==
"use strict";
/* hint for Opera 12 users allow opera:config#UserPrefs|Allowscripttolowerwindow and opera:config#UserPrefs|Allowscripttoraisewindow */
const userjs = "jesus2099_all-links";
const nonLatinName = /[\u0384-\u1cf2\u1f00-\uffff]/; // U+2FA1D is currently out of js range
var rawLanguages = JSON.parse(localStorage.getItem(userjs + "_languages")) || ["navigator", "musicbrainz"];
const path_ID_separator = "::::";
// Available tokens:
// - for all entity pages: %entity-type% %entity-mbid% %entity-name%
// - for "that" type entity pages: %that-mbid% %that-name% where "that" is an entity type in the above @include list
// - for artist entity pages: %artist-sort-name% %artist-family-name-first% %artist-latin-script-name%
// - for release entity pages: %release-barcode%
// - for url entity pages: %url-target% (while %entity-name% and %url-name% are deliberately ignored)
const hiddenLinks = {
de: "Versteckte Links",
en: "Hidden links",
fr: "Liens cachés"
};
var webSearchLinks = {
title: {
en: "Search the web",
de: "Web durchsuchen",
fr: "Chercher sur le Web",
nl: "Zoeken op het Web"
},
items: {
webPageSearch: {
title: {en: "Web pages", de: "Webseiten", fr: "Pages Web", nl: "Webpagina’s"},
target: [
"//duckduckgo.com/?q=%22%release-group-artist-credit%%22+%22%release-group-name%%22",
"//duckduckgo.com/?q=%22%release-artist-credit%%22+%22%release-name%%22",
"//duckduckgo.com/?q=%22%entity-name%%22"
]
},
imageSearch: {
title: {en: "Images", de: "Bilder", fr: "Images", nl: "Afbeeldingen"},
target: [
"//duckduckgo.com/?q=%22%release-group-artist-credit%%22+%22%release-group-name%%22+!i",
"//duckduckgo.com/?q=%22%release-artist-credit%%22+%22%release-name%%22+!i",
"//duckduckgo.com/?q=%22%entity-name%%22+!i"
]
},
videoSearch: {
title: {en: "Videos", de: "Videos", fr: "Vidéos", nl: "Video’s"},
target: [
"//duckduckgo.com/?q=%22%release-group-artist-credit%%22+%22%release-group-name%%22+!v",
"//duckduckgo.com/?q=%22%release-artist-credit%%22+%22%release-name%%22+!v",
"//duckduckgo.com/?q=%22%entity-name%%22+!v"
]
},
waybackMachineHistory: {
title: {en: "Archive history", de: "Archivierte Versionen", fr: "Versions archivées", nl: "Archiefgeschiedenis"},
target: "//web.archive.org/web/*/%url-target%"
}
}
};
var whitelistSearchLinks = {
title: {
de: "Whitelist durchsuchen",
en: "Search in the whitelist",
fr: "Sites autorisés",
nl: "Zoeken in de witte lijst"
},
items: {
genreDBs: {
title: {
de: "Nach Genre",
en: "By genre",
fr: "Par genre",
nl: "Per Genre"
},
items: {
classical: {
title: {
de: "Klassik",
en: "Classical",
fr: "Classique",
nl: "Klassiek"
},
items: {
// Skipped "Brahms" which has a search dropdown but no search page
// Skipped "Classical Archives" which have an internal JSON search API only
"DRAM": [
"https://jesus2099.gitlab.io/forward-request.html?_action=https://www.dramonline.org/search&_method=post&dram-search[q]=%release-group-name%&dram-search[t]=album",
"https://jesus2099.gitlab.io/forward-request.html?_action=https://www.dramonline.org/search&_method=post&dram-search[q]=%release-name%&dram-search[t]=album",
"https://jesus2099.gitlab.io/forward-request.html?_action=https://www.dramonline.org/search&_method=post&dram-search[q]=%work-name%&dram-search[t]=work",
"https://jesus2099.gitlab.io/forward-request.html?_action=https://www.dramonline.org/search&_method=post&dram-search[q]=%recording-name%&dram-search[t]=track",
],
"DRAM (composers)": "https://jesus2099.gitlab.io/forward-request.html?_action=https://www.dramonline.org/search&_method=post&dram-search[q]=%artist-name%&dram-search[t]=composer",
"DRAM (performers)": "https://jesus2099.gitlab.io/forward-request.html?_action=https://www.dramonline.org/search&_method=post&dram-search[q]=%artist-name%&dram-search[t]=performer",
"DRAM (ensembles)": "https://jesus2099.gitlab.io/forward-request.html?_action=https://www.dramonline.org/search&_method=post&dram-search[q]=%artist-name%&dram-search[t]=ensemble",
"Operabase (composers)": {
"bg cs da de el en es eu fi fr ga hu is it lt lv ja ko mt nl no pl ro ru sk sl sv zh": "https://www.operabase.com/composers/search/%language%?query=%artist-name%"
},
"Operabase (other artists)": {
"bg cs da de el en es eu fi fr ga hu is it lt lv ja ko mt nl no pl ro ru sk sl sv zh": "https://www.operabase.com/artists/search/%language%?query=%artist-name%"
},
"Operabase (festivals)": {
"bg cs da de el en es eu fi fr ga hu is it lt lv ja ko mt nl no pl ro ru sk sl sv zh": "https://www.operabase.com/festivals/search/%language%?query=%event-name%"
},
"Operabase (venues)": {
"bg cs da de el en es eu fi fr ga hu is it lt lv ja ko mt nl no pl ro ru sk sl sv zh": "https://www.operabase.com/venues/search/%language%?query=%place-name%"
},
// Skipped "Operadis" which has no search engine online
// Skipped "Overture/Doremus" which have a currently broken search engine
}
},
electronic: {
title: {
de: "Elektronik",
en: "Eletronic",
fr: "Électronique",
nl: "Elektronisch"
},
items: {
"PsyDB": [
"https://www.psydb.net/search?q=%artist-name%",
"https://www.psydb.net/search?q=%label-name%",
"https://www.psydb.net/search?q=%release-group-name%",
"https://www.psydb.net/search?q=%release-name%"
],
// Skipped "Resident Advisor" which has a search dropdown but no search page
// Skipped "RollDaBeats" which is down since December 2022
}
},
folk: {
title: {
"en de": "Traditional",
fr: "Traditionnelle",
nl: "Traditionele"
},
items: {
"Cape Breton Fiddle Recordings": [
"https://www.cbfiddle.com/rx/tunesearch.cgi?search=%recording&-name%",
"https://www.cbfiddle.com/rx/tunesearch.cgi?search=%work-name%"
],
// Skipped "DanceDB" which has no free text search
"Irish Traditional Music Tunes": [
"https://www.irishtune.info/album-search.php?value=%release-group-name%&form=title",
"https://www.irishtune.info/album-search.php?value=%release-name%&form=title",
"https://www.irishtune.info/search.php?lookfor=string&term=%recording-name%&type=any",
"https://www.irishtune.info/search.php?lookfor=string&term=%work-name%&type=any"
],
"Mainly Norfolk": [
"https://jesus2099.gitlab.io/forward-request.html?_action=https://mainlynorfolk.info/folk/records/search.php&_method=post&album=%release-group-name%",
"https://jesus2099.gitlab.io/forward-request.html?_action=https://mainlynorfolk.info/folk/records/search.php&_method=post&album=%release-name%",
"https://jesus2099.gitlab.io/forward-request.html?_action=https://mainlynorfolk.info/folk/songs/search.php&_method=post&song=%recording-name%",
"https://jesus2099.gitlab.io/forward-request.html?_action=https://mainlynorfolk.info/folk/songs/search.php&_method=post&song=%work-name%"
],
// Skipped "The Dance Gypsy" which is down since February 2022
"The Session": [
"https://thesession.org/recordings/search?q=%release-group-name%",
"https://thesession.org/recordings/search?q=%release-name%",
"https://thesession.org/tunes/search?q=%recording-name%",
"https://thesession.org/tunes/search?q=%work-name%"
],
"The Traditional Tune Archive": [
"https://tunearch.org/wiki/Special:Search?search=%artist-name%&fulltext=Dig+deeper&ns844=1&ns3002=1",
"https://tunearch.org/wiki/Special:Search?search=%recording-name%&fulltext=Dig+deeper",
"https://tunearch.org/wiki/Special:Search?search=%work-name%&fulltext=Dig+deeper"
]
}
},
// Skipped "Jazz Music Archives" which have a search dropdown but no search page
metal: {
title: {
"de en nl": "Metal",
fr: "Métal"
},
items: {
"Metal-Archives": [
"https://www.metal-archives.com/search?searchString=%label-name%&type=label_name",
"https://www.metal-archives.com/search?searchString=%release-group-name%&type=album_title",
"https://www.metal-archives.com/search?searchString=%release-name%&type=album_title"
],
"Metal-Archives (aliases)": "https://www.metal-archives.com/search?searchString=%artist-name%&type=artist_alias",
"Metal-Archives (bands)": "https://www.metal-archives.com/search?searchString=%artist-name%&type=band_name",
"Spirit of Metal": [
{
"cn de en es fr pl pt ru": "https://www.spirit-of-metal.com/labels.php?l=%language%&search=%label-name%"
},
{
"cn de en es fr pl pt ru": "https://www.spirit-of-metal.com/places.php?l=%language%&search=%place-name%"
},
{
"cn de en es fr pl pt ru": "https://www.spirit-of-metal.com/albums.php?l=%language%&search=%release-group-name%"
},
{
"cn de en es fr pl pt ru": "https://www.spirit-of-metal.com/albums.php?l=%language%&search=%release-name%"
},
],
"Spirit of Metal (bands)": "https://www.spirit-of-metal.com/liste_groupe.php?recherche_groupe=%artist-name%",
"Spirit of Metal (other artists)": {
"cn de en es fr pl pt ru": "https://www.spirit-of-metal.com/artists.php?l=%language%&search=%artist-name%"
}
}
},
rock: {
title: "Rock",
items: {
"Prog Archives": [
"http://www.progarchives.com/google-search-results.asp?cx=artists&q=%artist-name%",
"http://www.progarchives.com/google-search-results.asp?cx=artists&q=%release-group-name%"
],
"Prog Archives (by barcode)": "http://www.progarchives.com/google-search-results.asp?cx=artists&q=%release-barcode%",
"Prog Archives (by name)": "http://www.progarchives.com/google-search-results.asp?cx=artists&q=%release-name%",
"Spirit of Rock": [
{
"cn de en es fr pl pt ru": "https://www.spirit-of-rock.com/labels.php?l=%language%&search=%label-name%"
},
{
"cn de en es fr pl pt ru": "https://www.spirit-of-rock.com/places.php?l=%language%&search=%place-name%"
},
{
"cn de en es fr pl pt ru": "https://www.spirit-of-rock.com/albums.php?l=%language%&search=%release-group-name%"
},
{
"cn de en es fr pl pt ru": "https://www.spirit-of-rock.com/albums.php?l=%language%&search=%release-name%"
},
],
"Spirit of Rock (bands)": "https://www.spirit-of-rock.com/liste_groupe.php?recherche_groupe=%artist-name%",
"Spirit of Rock (other artists)": {
"cn de en es fr pl pt ru": "https://www.spirit-of-rock.com/artists.php?l=%language%&search=%artist-name%"
}
}
},
soundtrack: {
title: {
"de en": "Soundtrack",
fr: "Bande son",
nl: "Geluidsspoor"
},
items: {
"OverClock ReMix": [
"https://ocremix.org/site-search/?q=%artist-name%",
"https://ocremix.org/site-search/?q=%label-name%",
"https://ocremix.org/site-search/?q=%recording-name%",
"https://ocremix.org/site-search/?q=%release-group-name%",
"https://ocremix.org/site-search/?q=%release-name%",
"https://ocremix.org/site-search/?q=%work-name%"
],
"SoundtrackCollector": [
"https://www.soundtrackcollector.com/catalog/search.php?searchon=composer&searchtext=%artist-name%",
"https://www.soundtrackcollector.com/catalog/search.php?searchon=track&searchtext=%recording-name%",
"https://www.soundtrackcollector.com/catalog/search.php?searchon=title&searchtext=%release-group-name%",
"https://www.soundtrackcollector.com/catalog/search.php?searchon=soundtrack&searchtext=%work-name%",
],
"SoundtrackCollector (by barcode)": "https://www.soundtrackcollector.com/catalog/search.php?searchon=labelnr&searchtext=%release-barcode%",
"SoundtrackCollector (by name)": "https://www.soundtrackcollector.com/catalog/search.php?searchon=title&searchtext=%release-name%"
}
// Skipped "Videogam.in" which is down since 2016/2017
},
theatre: {
title: {
de: "Theater",
en: "Theatre",
fr: "Théâtre",
nl: "Theater"
},
items: {
"CastAlbums.org": [
"https://castalbums.org/search/?search=%artist-name%&type=People",
"https://castalbums.org/search/?search=%release-group-name%&type=Recordings",
"https://castalbums.org/search/?search=%release-name%&type=Recordings"
],
"CastAlbums.org (songs)": [
"https://castalbums.org/search/?search=%recording-name%&type=Songs",
"https://castalbums.org/search/?search=%work-name%&type=Songs"
],
"CastAlbums.org (shows)": "https://castalbums.org/search/?search=%work-name%&type=Shows",
// Skipped "IBDb" which search has a hidden request verification token input
"IOBDb": [
"http://www.iobdb.com/Search?searchText=%artist-name%&searchDomain=CreditableEntity",
"http://www.iobdb.com/Search?searchText=%label-name%&searchDomain=CreditableEntity",
"http://www.iobdb.com/Search?searchText=%place-name%&searchDomain=Theatre",
"http://www.iobdb.com/Search?searchText=%recording-name%&searchDomain=Any",
"http://www.iobdb.com/Search?searchText=%work-name%&searchDomain=Any"
],
"Theatricalia": [
"https://theatricalia.com/search?q=%artist-name%",
"https://theatricalia.com/search?q=%label-name%",
"https://theatricalia.com/search?q=%place-name%",
"https://theatricalia.com/search?q=%recording-name%",
"https://theatricalia.com/search?q=%work-name%"
]
}
},
literature: {
title: {
de: "Literatur",
en: "Literature",
fr: "Littérature",
ja: "文学",
},
items: {
BookBrainz: [
"//bookbrainz.org/search?type=author&q=%artist-name%",
"//bookbrainz.org/search?type=edition&q=%release-name%",
"//bookbrainz.org/search?type=edition_group&q=%release-group-name%",
"//bookbrainz.org/search?type=publisher&q=%label-name%",
"//bookbrainz.org/search?type=series&q=%series-name%",
"//bookbrainz.org/search?type=work&q=%work-name%"
],
"BookBrainz (all entities)": "//bookbrainz.org/search?type=all_entities&q=%entity-name%",
"Open Library": [
"//openlibrary.org/search/authors?q=%artist-name%",
"//openlibrary.org/search?mode=everything&q=%work-name%",
"//openlibrary.org/search?mode=everything&q=%release-name%"
],
LibraryThing: [
"//www.librarything.com/search.php?searchtype=authorname&search=%artist-name%",
"//www.librarything.com/search.php?searchtype=newwork_titles&search=%work-name%",
"//www.librarything.com/search.php?searchtype=nseries&search=%series-name%"
],
Goodreads: [
"//www.goodreads.com/search?utf8=%E2%9C%93&search_type=books&search%5Bfield%5D=author&q=%artist-name%",
"//www.goodreads.com/search?utf8=%E2%9C%93&search_type=books&search%5Bfield%5D=title&q=%release-name%",
"//www.goodreads.com/search?utf8=%E2%9C%93&search_type=books&search%5Bfield%5D=title&q=%work-name%",
"//www.goodreads.com/search?q=%series-name%"
],
// TODO?: Search on first name + last name:
// ORCID: "//orcid.org/orcid-search/search?firstName=%artist-first-name%&lastName=%artist-last-name%&otherFields=true",
ORCID: "https://orcid.org/orcid-search/search?searchQuery=%artist-name%",
"LibriVox (author)": "https://librivox.org/search?search_form=advanced&author=%artist-name%",
"LibriVox (reader)": "https://librivox.org/search?search_form=advanced&reader=%artist-name%",
LibriVox: "https://librivox.org/search?search_form=advanced&title=%release-name%"
}
}
}
},
lyricsDBs: {
title: {
de: "Liedtext",
en: "Lyrics",
fr: "Paroles",
nl: "Liedtekst"
},
items: {
Genius: [
"//genius.com/search?q=%artist-latin-script-name%",
"//genius.com/search?q=%recording-name%",
"//genius.com/search?q=%work-name%"
],
"J-Lyric(歌手名)": "//j-lyric.net/index.php?ka=%artist-name%",
"J-Lyric(曲名)": [
"//j-lyric.net/index.php?kt=%recording-name%",
"//j-lyric.net/index.php?kt=%work-name%"
]
}
},
scoreDBs: {
title: {
de: "Partitur",
en: "Score",
fr: "Partitions",
nl: "Bladmuziek"
},
items: {
"IMSLP/Petrucci Music Library": "//duckduckgo.com/?q=site:imslp.org+%22%work-name%%22"
}
},
regionalDBs: {
title: {
de: "Nach Gebiet",
en: "By area",
fr: "Par région",
nl: "Per Gebied"
},
items: {
JP: {
title: {
fr: "Japon",
en: "Japan"
},
items: {
"Amazon JP (cat)": "//amazon.jp/s/?url=search-alias%3Dpopular&field-keywords=%release-catalogue-number%",
"Amazon JP (bars)": "//amazon.jp/s/?url=search-alias%3Dpopular&field-keywords=%release-barcode%",
VGMdb: [
"//vgmdb.net/search?type=artist&q=%artist-name%",
"//vgmdb.net/search?type=album&q=%release-group-name%",
"//vgmdb.net/search?type=album&q=%release-name%",
"//vgmdb.net/search?type=org&q=%label-name%",
],
Yunisan: "//duckduckgo.com/?q=site:www22.big.or.jp+%22%2F%7Eyunisan%2Fvi%2F%22+%22%artist-name%%22",
VKDB: "//duckduckgo.com/?q=site:vkdb.jp+%22%artist-name%%22"
}
},
KR: {
title: {
fr: "Corée",
en: "Korea"
},
items: {
maniadb: "http://www.maniadb.com/search/%artist-name%/?sr=P"
}
},
DE: {
title: {
de: "Deutschland",
en: "Germany",
fr: "Allemagne",
nl: "Duitsland"
},
items: {
"Musik-Sammler.de": [
"https://www.musik-sammler.de/search/%artist-name%/?q=artist",
"https://www.musik-sammler.de/search/%release-name%/?q=medium",
"https://www.musik-sammler.de/search/%release-group-name%/?q=album"
],
"DNB - Deutsches Musikarchiv": {de: "https://portal.dnb.de/opac.htm?query=%28mat%3DMusic+OR+cod%3Dmt%29+AND+%release-name%&method=simpleSearch&cqlMode=true"}
}
},
FR: {
title: {
de: "Frankreich",
en: "France",
fr: "France",
nl: "Frankrijk"
},
items: {
"Encyclopédisque": [
"http://www.encyclopedisque.fr/recherche.html?ra=%artist-name%&sp=1#resultat",
"http://www.encyclopedisque.fr/recherche.html?rd=%release-name%&sp=1#resultat"
]
}
},
"CA-QC": {
title: "Québec",
items: {
"Québec Info Musique": [
// TODO: make it work with "=" in title: https://musicbrainz.org/release-group/22d4bc68-c5f3-4e53-ab07-07d5920bbee1
"http://jesus2099.gitlab.io/forward-request.html?_action=http://quebecinfomusique.com/artistes/artiste.asp&_accept-charset=ISO-8859-1&search=%artist-name%",
"http://jesus2099.gitlab.io/forward-request.html?_action=http://quebecinfomusique.com/albums/albums.asp&_accept-charset=ISO-8859-1&search=%release-name%",
"http://jesus2099.gitlab.io/forward-request.html?_action=http://quebecinfomusique.com/albums/albums.asp&_accept-charset=ISO-8859-1&search=%release-group-name%",
]
}
},
NL: {
title: {
de: "Niederlande",
en: "Netherlands",
fr: "Pays-Bas",
ja: "オランダ",
nl: "Nederland"
},
items: {
"Muziekweb": [
"https://www.muziekweb.nl/en/Muziekweb/Cat/SingleSearch/Search?q=%artist-name%",
"https://www.muziekweb.nl/en/Muziekweb/Cat/SingleSearch/Search?q=%label-name%",
"https://www.muziekweb.nl/en/Muziekweb/Cat/SingleSearch/Search?q=%release-name%",
"https://www.muziekweb.nl/en/Muziekweb/Cat/SingleSearch/Search?q=%recording-name%",
"https://www.muziekweb.nl/en/Muziekweb/Cat/SingleSearch/Search?q=%work-name%"
]
}
},
SE: {
title: {
de: "Schweden",
en: "Sweden",
fr: "Suède",
ja: "スウェーデン",
nl: "Zweden",
sv: "Sverige"
},
items: {
"Svensk Mediedatabas (SMDB)": [
"//smdb.kb.se/catalog/search?q=namn%3A%28%artist-family-name-first%%29",
"//smdb.kb.se/catalog/search?q=%release-name%",
],
"Svensk Mediedatabas (cat. no.)": "//smdb.kb.se/catalog/search?q=%release-catalogue-number%",
}
}
}
},
shops: {
title: {
fr: "Boutiques en ligne",
en: "Online shops",
},
items: {
"Amazon (barcode)": "https://www.amazon.com/s?k=%release-barcode%",
Bandcamp: "https://bandcamp.com/search?q=%artist-name%",
Deezer: "https://www.deezer.com/search/%artist-name%",
SoundCloud: "https://soundcloud.com/search/people?q=%artist-name%",
Spotify: "https://open.spotify.com/search/%artist-name%",
"Spotify (barcode)": "//open.spotify.com/search/upc:%release-barcode%",
},
},
socialNetworks: {
title: {
de: "Soziale Netzwerke",
fr: "Réseaux sociaux",
en: "Social networks"
},
items: {
Facebook: "https://www.facebook.com/search/pages/?q=%artist-name%",
Twitter: "https://twitter.com/search?f=users&q=%artist-name%",
YouTube: "https://www.youtube.com/results?search_query=%artist-name%&sp=EgIQAg%253D%253D"
},
},
otherDBs: {
title: {
de: "Andere Datenbanken",
en: "Other databases",
fr: "Autres bases de données",
nl: "Andere databases"
},
items: {
AllMusic: {
target: [
"//www.allmusic.com/search/artists/%artist-name%",
"//www.allmusic.com/search/labels/%label-name%",
"//www.allmusic.com/search/songs/%recording-name%",
"//www.allmusic.com/search/all/%release-name%",
"//www.allmusic.com/search/albums/%release-group-name%",
"//www.allmusic.com/search/compositions/%work-name%"
]
},
Discogs: [
"//www.discogs.com/%language%/search?q=%artist-name%&type=artist",
"//www.discogs.com/%language%/search?title=%release-name%&type=release",
"//www.discogs.com/%language%/search?title=%release-group-name%&type=release",
"//www.discogs.com/%language%/search?q=%label-name%&type=label"
],
"Discogs (artist credit)": [
"//www.discogs.com/%language%/search?title=%release-name%&artist=%release-artist-credit%&type=release",
"//www.discogs.com/%language%/search?title=%release-group-name%&artist=%release-group-artist-credit%&type=release"
],
"Discogs (barcode)": "//www.discogs.com/%language%/search/?q=%release-barcode%&type=release",
MusicMoz: "//musicmoz.org/search/search.cgi?search=%entity-name%",
"Dynamic Range DB": "//dr.loudness-war.info/?artist=%release-artist-credit%&album=%release-name%",
GeoNames: [
"http://www.geonames.org/search.html?q=%area-name%",
"http://www.geonames.org/advanced-search.html?q=%place-name%&featureClass=S"
],
IMDb: "//www.imdb.com/find?q=%artist-name%&s=nm",
TMDB: "//www.themoviedb.org/search/person?query=%artist-name%",
IMVDb: [
"//imvdb.com/search?search_term=%artist-name%",
"//imvdb.com/search?search_term=%label-name%",
"//imvdb.com/search?search_term=%recording-name%",
// TODO: implement %recording-artist-credit% like %release-artist-credit% for better search below
// "//imvdb.com/search?search_term=%recording-name% %recording-artist-credit%",
"//imvdb.com/search?search_term=%work-name%"
],
ISNI: "//isni.oclc.org/xslt/CMD?ACT=SRCHA&IKT=8006&TRM=%artist-name%",
VIAF: "//viaf.org/viaf/search?query=local.names+all+%22%artist-name%%22",
"Last.fm (MBID)": {
"en": "//last.fm/mbid/%artist-mbid%",
"de es fr it ja pl pt ru sv tr zh": "//last.fm/%language%/mbid/%artist-mbid%"
},
lastfmName: {
title: {en: "Last.fm (name)", de: "Last.fm (Name)", es: "Last.fm (nombre)", fr: "Last.fm (nom)", it: "Last.fm (Nome)", ja: "Last.fm (名)", pl: "Last.fm (Nazwa)", pt: "Last.fm (nome)", ru: "Last.fm (имя)", sv: "Last.fm (namn)", tr: "Last.fm (ad)", zh: "Last.fm (名)"},
target: {
"en": "//last.fm/search?q=%artist-name%",
"de es fr it ja pl pt ru sv tr zh": "//last.fm/%language%/search?q=%artist-name%"
}
},
"Rate Your Music": [
"//rateyourmusic.com/search?searchtype=a&searchterm=%artist-name%",
"//rateyourmusic.com/search?searchtype=b&searchterm=%label-name%",
"//rateyourmusic.com/search?searchtype=l&searchterm=%release-name%",
"//rateyourmusic.com/search?searchtype=r&searchterm=%work-name%"
],
SecondHandSongs: [
"//secondhandsongs.com/search/artist?op_commonName=contains&commonName=%artist-name%&op_type=equals&display=commonName.type&sort=simplifiedCommonName",
"//secondhandsongs.com/search/label?op_name=contains&name=%label-name%&display=name&sort=simplifiedName",
"//secondhandsongs.com/search/performance?op_title=contains&title=%recording-name%&op_performer=contains&display=title.performer&sort=simplifiedTitle",
"//secondhandsongs.com/search/release?op_title=contains&title=%release-name%&op_performer=contains&display=title.performer&sort=simplifiedTitle",
"//secondhandsongs.com/search/work?op_title=contains&title=%work-name%&op_credits=contains&display=title.credits&sort=simplifiedTitle"
],
"setlist.fm": "//www.setlist.fm/search?query=%artist-name%",
WhoSampled: [
"//www.whosampled.com/search/artists/?q=%artist-name%",
"//www.whosampled.com/search/tracks/?q=%recording-name%",
"//www.whosampled.com/search/tracks/?q=%work-name%"
],
Wikidata: "//www.wikidata.org/w?search=%entity-name%",
Wikipedia: "//duckduckgo.com/?q=site:wikipedia.org+intitle%3A%22%entity-name%%22",
LocalWikipedia: {
title: "Wikipedia (%language%)",
target: "//%language%.wikipedia.org/w?search=%entity-name%"
}
}
}
}
};
var additionalSearchLinks = {
title: {
de: "Weiter suchen",
en: "Search further",
fr: "Chercher plus loin",
nl: "Zoeken verder naar"
},
items: {
regionalDBs: {
title: {
de: "Nach Gebiet",
en: "By area",
fr: "Par région",
nl: "Per Gebied"
},
items: {
FR: {
title: {
de: "Frankreich",
en: "France",
fr: "France",
nl: "Frankrijk"
},
items: {
SACEM: [
{
fr: "//repertoire.sacem.fr/resultats?filters=titles&query=%work-name%#searchBtn",
"de en nl": "//repertoire.sacem.fr/en/results?filters=titles&query=%work-name%#searchBtn"
}, {
fr: "//repertoire.sacem.fr/resultats?filters=titles&query=%recording-name%#searchBtn",
"de en nl": "//repertoire.sacem.fr/en/results?filters=titles&query=%recording-name%#searchBtn"
}, {
fr: "//repertoire.sacem.fr/resultats?filters=parties&query=%artist-name%#searchBtn",
"de en nl": "//repertoire.sacem.fr/en/results?filters=parties&query=%artist-name%#searchBtn"
}, {
fr: "//repertoire.sacem.fr/resultats?filters=parties&query=%label-name%#searchBtn",
"de en nl": "//repertoire.sacem.fr/en/results?filters=parties&query=%label-name%#searchBtn"
}
]
}
},
JP: {
title: {
en: "Japan",
fr: "Japon",
ja: "日本"
},
items: {
CDJournal: [
"//jesus2099.gitlab.io/forward-request.html?_accept-charset=EUC-JP&_action=//www.cdjournal.com/search/do/&k=%artist-name%&target=a",
"//jesus2099.gitlab.io/forward-request.html?_accept-charset=EUC-JP&_action=//www.cdjournal.com/search/do/&k=%release-name%&target=cd",
],
JASRAC: "//jesus2099.gitlab.io/forward-request.html?_accept-charset=Shift_JIS&_method=post&_action=//www2.jasrac.or.jp/eJwid/main%3FtrxID%3DA00401-3%23result&IN_DEFAULT_WORKS_KOUHO_MAX=100&IN_DEFAULT_WORKS_KOUHO_SEQ=1&IN_WORKS_TITLE_NAME1=%recording-name%&IN_WORKS_TITLE_CONDITION=1&IN_DEFAULT_SEARCH_WORKS_NAIGAI=0&RESULT_CURRENT_PAGE=1",
"MINC(アーティスト名・作家名)": "//www.minc.or.jp/artist/list/?nm=%artist-name%",
"MINC(CD商品タイトル)": [
"//www.minc.or.jp/product/list/?tl=%release-group-name%&ta=%release-group-artist-credit%&type=search-form-title&match=2",
"//www.minc.or.jp/product/list/?tl=%release-name%&ta=%release-artist-credit%&type=search-form-title&match=2",
],
// TODO: Add token replacement in link labels before using all catalogue numbers (here only the first catalogue number is used)
"MINC(品番/POS)": "//www.minc.or.jp/product/list/?dn=%release-catalogue-number%&type=search-form-diskno",
"mercari (CD)": [
"//jp.mercari.com/search?keyword=%release-artist-credit%+%release-name%&t1_category_id=5&category_id=75",
"//jp.mercari.com/search?keyword=%release-group-artist-credit%+%release-group-name%&t1_category_id=5&category_id=75",
],
"Joshin web (cat)": "//joshinweb.jp/cdshops/Dps?KEY=RECODE&FM=0&KEYWORD=%release-catalogue-number%",
"Joshin web (barcode)": "//joshinweb.jp/dp/%release-barcode%.html",
"ヨドバシカメラ (cat)": "//www.yodobashi.com/category/91139/?word=%release-catalogue-number%",
}
},
USA: {
items: {
BMI: [
"//repertoire.bmi.com/Search/Search?SearchForm.Main_Search=Title&SearchForm.Main_Search_Text=%recording-name%",
"//repertoire.bmi.com/Search/Search?SearchForm.Main_Search=Title&SearchForm.Main_Search_Text=%work-name%",
"//repertoire.bmi.com/Search/Search?SearchForm.Main_Search=Publisher&SearchForm.Main_Search_Text=%label-name%"
],
"BMI (performer)": "//repertoire.bmi.com/Search/Search?SearchForm.Main_Search=Performer&SearchForm.Main_Search_Text=%artist-name%",
"BMI (writer)": "//repertoire.bmi.com/Search/Search?SearchForm.Main_Search=Writer%2FComposer&SearchForm.Main_Search_Text=%artist-name%"
}
}
}
},
isrcDBs: {
title: "ISRC",
items: {
IFPI: "https://isrcsearch.ifpi.org/#!/search?upcCode=%release-barcode%&tab=lookup&showReleases&start=0&number=100",
}
},
otherDBs: {
title: {
de: "Andere Datenbanken",
en: "Other databases",
fr: "Autres bases de données",
nl: "Andere databases"
},
items: {
GnuDb: [
"//gnudb.org/search/artist/%22%artist-name%%22",
"//gnudb.org/search/%22%release-artist-credit%%22%20%22%release-name%%22",
"//gnudb.org/search/%22%release-group-artist-credit%%22%20%22%release-group-name%%22",
"//gnudb.org/search/song/%22%recording-name%%22",
"//gnudb.org/search/song/%22%work-name%%22",
],
"GnuDb (just title)": [
"//gnudb.org/search/album/%22%release-name%%22",
"//gnudb.org/search/album/%22%release-group-name%%22",
],
"GnuDb (abc)": [
"//gnudb.org/search/artist/%22%artist-latin-script-name%%22",
],
}
}
}
};
var searchLinks = {items: {
additional: additionalSearchLinks,
whitelist: whitelistSearchLinks,
web: webSearchLinks
}};
var disabledSearchLinks = {};
var FAVICON_CLASSES = { // from https://github.com/metabrainz/musicbrainz-server/blob/62d70e6e702d2f083bbdfe9f6a6056703a64ed30/root/static/scripts/common/constants.js#L53-L229
"45cat.com": "fortyfivecat",
"45worlds.com": "fortyfiveworlds",
"abc.net.au/triplejunearthed": "triplejunearthed",
"adp.library.ucsb.edu": "dahr",
"allmusic.com": "allmusic",
"animenewsnetwork.com": "animenewsnetwork",
"anison.info": "anisongeneration",
"archive.org": "archive",
"audiomack.com": "audiomack",
"baidu.com": "baidu",
"bandcamp.com": "bandcamp",
"bandsintown.com": "bandsintown",
"bbc.co.uk": "bbc",
"beatport.com": "beatport",
"bibliotekapiosenki.pl": "piosenki",
"bigcartel.com": "bigcartel",
"bookbrainz.org": "bookbrainz",
"books.apple.com": "applebooks",
"boomplay.com": "boomplay",
"cancioneros.si": "cancioneros",
"castalbums.org": "castalbums",
"catalogue.bnf.fr": "bnfcatalogue",
"cbfiddle.com/rx/": "cbfiddlerx",
"ccmixter.org": "ccmixter",
"cdjapan.co.jp": "cdjapan",
"changetip.com": "changetip",
"ci.nii.ac.jp": "cinii",
"classicalarchives.com": "classicalarchives",
"cpdl.org": "cpdl",
"d-nb.info": "dnb",
"dailymotion.com": "dailymotion",
"deezer.com": "deezer",
"dhhu.dk": "dhhu",
"discogs.com": "discogs",
"dogmazic.net": "dogmazic",
"dramonline.org": "dram",
"encyclopedisque.fr": "encyclopedisque",
"ester.ee": "ester",
"facebook.com": "facebook",
"finna.fi": "finna",
"finnmusic.net": "finnmusic",
"flattr.com": "flattr",
"fono.fi": "fonofi",
"generasia.com/wiki": "generasia",
"genius.com": "genius",
"geonames.org": "geonames",
"gutenberg.org": "gutenberg",
"hoick.jp": "hoick",
"ibdb.com": "ibdb",
"idref.fr": "idref",
"imdb.com": "imdb",
"imslp.org": "imslp",
"imvdb.com": "imvdb",
"indiegogo.com": "indiegogo",
"instagram.com": "instagram",
"ircam.fr": "ircam",
"irishtune.info": "irishtune",
"iss.ndl.go.jp": "ndl",
"itunes.apple.com": "itunes",
"j-lyric.net": "jlyric",
"jazzmusicarchives.com": "jazzmusicarchives",
"joysound.com": "joysound",
"junodownload.com": "junodownload",
"kashinavi.com": "kashinavi",
"kget.jp": "kget",
"kickstarter.com": "kickstarter",
"ko-fi.com": "kofi",
"laboiteauxparoles.com": "laboiteauxparoles",
"lantis.jp": "lantis",
"last.fm": "lastfm",
"lieder.net": "lieder",
"linkedin.com": "linkedin",
"livefans.jp": "livefans",
"loc.gov": "loc",
"loudr.fm": "loudr",
"lyric.evesta.jp": "evestalyric",
"mainlynorfolk.info": "mainlynorfolk",
"melon.com": "melon",
"metal-archives.com": "metalarchives",
"mixcloud.com": "mixcloud",
"mora.jp": "mora",
"music.amazon": "amazonmusic",
"music.apple.com": "applemusic",
"music.bugs.co.kr": "bugs",
"music.migu.cn": "migumusic",
"music.youtube.com": "youtubemusic",
"musicapopular.cl": "musicapopularcl",
"musik-sammler.de": "musiksammler",
"musixmatch.com": "musixmatch",
"musopen.org": "musopen",
"muziekweb.nl": "muziekweb",
"muzikum.eu": "muzikum",
"myspace.com": "myspace",
"napster.com": "napster",
"nicovideo.jp": "niconicovideo",
"nla.gov.au": "trove",
"ocremix.org": "ocremix",
"offiziellecharts.de": "offiziellecharts",
"online-bijbel.nl": "onlinebijbel",
"opac.kbr.be": "kbr",
"openlibrary.org": "openlibrary",
"operabase.com": "operabase",
"overture.doremus.org": "overture",
"patreon.com": "patreon",
"paypal.me": "paypal",
"petitlyrics.com": "petitlyrics",
"pinterest.com": "pinterest",
"progarchives.com": "progarchives",
"psydb.net": "psydb",
"qim.com": "quebecinfomusique",
"qobuz.com": "qobuz",
"ra.co": "residentadvisor",
"rateyourmusic.com": "rateyourmusic",
"recochoku.jp": "recochoku",
"reverbnation.com": "reverbnation",
"rock.com.ar": "rockcomar",
"rockensdanmarkskort.dk": "rockensdanmarkskort",
"rockinchina.com": "ric",
"rockipedia.no": "rockipedia",
"rolldabeats.com": "rolldabeats",
"runeberg.org": "runeberg",
"saisaibatake.ame-zaiku.com/gakki": "gakki",
"saisaibatake.ame-zaiku.com/musical": "gakki",
"saisaibatake.ame-zaiku.com/musical_instrument": "gakki",
"secondhandsongs.com": "secondhandsongs",
"setlist.fm": "setlistfm",
"smdb.kb.se": "smdb",
"snaccooperative.org": "snac",
"songfacts.com": "songfacts",
"songkick.com": "songkick",
"soundcloud.com": "soundcloud",
"spirit-of-metal.com": "spiritofmetal",
"spirit-of-rock.com": "spiritofrock",
"spotify.com": "spotify",
"stage48.net": "stage48",
"target.com": "target",
"tedcrane.com/DanceDB": "dancedb",
"theatricalia.com": "theatricalia",
"thedancegypsy.com": "thedancegypsy",
"thesession.org": "thesession",
"tidal.com": "tidal",
"tiktok.com": "tiktok",
"tipeee.com": "tipeee",
"tobarandualchais.co.uk": "tobar",
"touhoudb.com": "touhoudb",
"tower.jp": "tower",
"traxsource.com": "traxsource",
"triplejunearthed.com": "triplejunearthed",
"tunearch.org": "tunearch",
"twitch.tv": "twitch",
"twitter.com": "twitter",
"uta-net.com": "utanet",
"utaitedb.net": "utaitedb",
"utamap.com": "utamap",
"utaten.com": "utaten",
"vgmdb.net": "vgmdb",
"viaf.org": "viaf",
"videogam.in": "videogamin",
"vimeo.com/ondemand": "vimeoondemand",
"vimeo.com": "vimeo",
"vk.com": "vk",
"vkdb.jp": "vkdb",
"vocadb.net": "vocadb",
"weibo.com": "weibo",
"whosampled.com": "whosampled",
"wikidata.org": "wikidata",
"wikipedia.org": "wikipedia",
"wikisource.org": "wikisource",
"worldcat.org": "worldcat",
"www.amazon": "amazon",
"www.youtube.com": "youtube",
"www5.atwiki.jp/hmiku/": "hmikuwiki",
"yesasia.com": "yesasia",
};
var favicons = {
"deezer.com": "https://e-cdns-files.dzcdn.net/cache/images/common/favicon/favicon-16x16.526cde4edf20647be4ee32cdf35c1c13.png",
"lastfm.": "//musicbrainz.org/static/images/favicons/lastfm-16.png",
"rakuten.co.jp": "//plaza.rakuten.co.jp/favicon.ico",
};
var favicontry = [];
var guessOtherFavicons = true;
var sidebar = document.getElementById("sidebar");
var tokenValues = {};
var entityUrlRelsWS = self.location.protocol + "//" + self.location.host + "/ws/2/%entity-type%/%entity-mbid%?inc=url-rels";
var extlinks;
var j2css = document.createElement("style");
j2css.setAttribute("type", "text/css");
document.head.appendChild(j2css);
j2css = j2css.sheet;
j2css.insertRule("ul.external_links > li.defaultAutolink > input[type='checkbox'] { display: none; }", 0);
j2css.insertRule("ul.external_links > li.defaultAutolink.disabled { text-decoration: line-through; display: none; }", 0);
j2css.insertRule("ul.external_links.configure > li.defaultAutolink.disabled { display: list-item; }", 0);
j2css.insertRule("ul.external_links.configure > li.defaultAutolink > input[type='checkbox'] { display: inline; }", 0);
j2css.insertRule("div#sidebar [class^='" + userjs + "'], div#sidebar [class^='" + userjs + "'] + ul, div#sidebar [class*='" + userjs + "_wd-'] ul { background-color: #FF9; }", 0);
j2css.insertRule("div#sidebar > ." + userjs + "_searchLinks.emptySection { display: none; }", 0);
j2css.insertRule("div#sidebar > ." + userjs + "_searchLinks li.emptySection { display: none; }", 0);
j2css.insertRule("div#sidebar > ." + userjs + "_searchLinks input[type='checkbox'] { display: none; }", 0);
j2css.insertRule("div#sidebar > ." + userjs + "_searchLinks.disabled { text-decoration: line-through; display: none; }", 0);
j2css.insertRule("div#sidebar > ." + userjs + "_searchLinks .disabled { text-decoration: line-through; display: none; }", 0);
j2css.insertRule("div#sidebar > .configure." + userjs + "_searchLinks.emptySection { display: block; }", 0);
j2css.insertRule("div#sidebar > .configure." + userjs + "_searchLinks li.emptySection { display: list-item; }", 0);
j2css.insertRule("div#sidebar > .configure." + userjs + "_searchLinks input[type='checkbox'] { display: inline; }", 0);
j2css.insertRule("div#sidebar > .configure." + userjs + "_searchLinks.disabled { display: block; }", 0);
j2css.insertRule("div#sidebar > ul.configure." + userjs + "_searchLinks.disabled { display: none; }", 0);
j2css.insertRule("div#sidebar > .configure." + userjs + "_searchLinks li.disabled { display: list-item; }", 0);
j2css.insertRule("div#sidebar > .configure." + userjs + "_searchLinks ul.disabled { display: none; }", 0);
j2css.insertRule("div#sidebar > ." + userjs + "_searchLinks h3 { margin: 0; }", 0);
j2css.insertRule("div#sidebar > ." + userjs + "_searchLinks h4 { margin: 0; }", 0);
j2css.insertRule("div#sidebar > ul." + userjs + "_userLinks > li.subsectionHeader { font-weight: 'bold'; padding: '0px'; float: 'right'; }", 0);
main();
function main() {
if (sidebar) {
var entityMatch = self.location.href.match(/\/([a-z-]*)\/([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}).*/i);
var entityType = tokenValues["%entity-type%"] = entityMatch[1];
var entityMBID = tokenValues["%entity-mbid%"] = entityMatch[2];
tokenValues["%" + entityType + "-mbid%"] = entityMBID;
/* Hidden links and autolinks */
if (entityType && entityMBID) {
// Tokens for autolinks
var entityHeaderClass = (entityType === "release-group" ? "rg" : entityType) + "header";
var entityNameNode = document.querySelector("div#content > div." + entityHeaderClass + " > h1 a, div#content > div." + entityHeaderClass + " > h1 span[href]"); /* for compatibilly with https://gist.github.com/jesus2099/4111760 */
if (entityNameNode) {
var entityName = tokenValues["%entity-name%"] = entityNameNode.textContent.trim();
tokenValues["%" + entityType + "-name%"] = entityName;
if (entityType == "artist") {
var artistname = entityName;
var artistsortname = sidebar.querySelector("dd.sort-name");
var artistsortnameSwapped = "";
artistsortname = tokenValues["%artist-sort-name%"] = artistsortname ? artistsortname.textContent : artistname;
if (!artistname.match(nonLatinName)) {
tokenValues["%artist-family-name-first%"] = artistsortname;
} else {
var tmpsn = artistsortname.split(",");
for (var isn = tmpsn.length - 1; isn >= 0; isn--) {
artistsortnameSwapped += tmpsn[isn].trim();
if (isn != 0) {
artistsortnameSwapped += " ";
}
}
tokenValues["%artist-family-name-first%"] = artistname;
tokenValues["%artist-latin-script-name%"] = artistsortnameSwapped;
}
} else if (entityType === "release") {
let barcodeNode = document.querySelector("#sidebar .barcode");
if (barcodeNode && barcodeNode.textContent.match(/^\d+$/)) {
tokenValues["%release-barcode%"] = barcodeNode.textContent;
}