Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Did not detect WD URL pattern used in WP sidebars #2

Merged
merged 1 commit into from Jul 28, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions mb-edit-create_from_wikidata.user.js
Expand Up @@ -4,7 +4,7 @@
// @name MusicBrainz edit: Create entity or fill data from wikidata / VIAF / ISNI
// @namespace mbz-loujine
// @author loujine
// @version 2018.5.31
// @version 2018.7.26
// @downloadURL https://bitbucket.org/loujine/musicbrainz-scripts/raw/default/mb-edit-create_from_wikidata.user.js
// @updateURL https://bitbucket.org/loujine/musicbrainz-scripts/raw/default/mb-edit-create_from_wikidata.user.js
// @supportURL https://bitbucket.org/loujine/musicbrainz-scripts
Expand Down Expand Up @@ -659,7 +659,7 @@ $(document).ready(function() {
node.style.backgroundColor = '#bbffbb';
if (domain === "www.wikidata.org") {
fillExternalLinks(node.value);
fillFormFromWikidata(node.value.split('/')[4].trim());
fillFormFromWikidata(node.value.match(/\/(Q\d+)\b/)[1]);
} else if (domain === "viaf.org") {
node.value = node.value.replace(/http:/g, 'https:')
if (!node.value.endsWith('/')) {
Expand Down