mirror of
https://github.com/murdos/musicbrainz-userscripts
synced 2025-03-04 14:27:14 +00:00
encyclopedique: also insert MB link for the current page.
This commit is contained in:
parent
bc84a78254
commit
ebacc7d40e
1 changed files with 7 additions and 1 deletions
|
@ -51,6 +51,13 @@ function setupImportUI(release) {
|
|||
|
||||
function insertMBLinks() {
|
||||
|
||||
var current_url = window.location.href;
|
||||
if (current_url.match(/\/disque\//)) {
|
||||
mblinks.searchAndDisplayMbLink(current_url, 'release', function (link) { $('h2 span').before(link); } );
|
||||
} else if (current_url.match(/\/artiste\//)) {
|
||||
mblinks.searchAndDisplayMbLink(current_url, 'artist', function (link) { $('h2').prepend(link); } );
|
||||
}
|
||||
|
||||
$('div.v7P, div.v12P').find('a[href*="/disque/"]').each(function() {
|
||||
var $link = $(this);
|
||||
var external_url = window.location.origin + $link.attr('href');
|
||||
|
@ -211,4 +218,3 @@ function parseEncyclopedisquePage() {
|
|||
|
||||
return release;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue