mirror of
https://github.com/murdos/musicbrainz-userscripts
synced 2024-11-10 13:14:16 +00:00
2011-11-29
This commit is contained in:
parent
217fd901c7
commit
a493b840da
1 changed files with 2 additions and 12 deletions
|
@ -1,8 +1,9 @@
|
|||
// ==UserScript==
|
||||
|
||||
// @name Import Discogs releases to MusicBrainz
|
||||
// @version 2011-11-06_01
|
||||
// @version 2011-11-29_01
|
||||
// @namespace http://userscripts.org/users/22504
|
||||
// @icon http://www.discogs.com/images/discogs130.png
|
||||
// @include http://*musicbrainz.org/release/add
|
||||
// @include http://*musicbrainz.org/release/*/add
|
||||
// @include http://*musicbrainz.org/release/*/edit
|
||||
|
@ -305,17 +306,6 @@ function decodeDiscogsJoinphrase(join) {
|
|||
return joinphrase;
|
||||
}
|
||||
|
||||
// Helper function: get data from a given XPATH
|
||||
getXPathVal = function (xmldoc, xpathExpression, wantSingleNode, rootNode) {
|
||||
if (arguments.length == 3) rootNode = xmldoc;
|
||||
if (wantSingleNode) {
|
||||
var nodeval = xmldoc.evaluate(xpathExpression, rootNode, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
|
||||
return (nodeval != null) ? nodeval.textContent : "";
|
||||
} else {
|
||||
return xmldoc.evaluate(xpathExpression, rootNode, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
|
||||
}
|
||||
}
|
||||
|
||||
function mylog(obj) {
|
||||
var DEBUG = true;
|
||||
if (DEBUG && unsafeWindow.console) {
|
||||
|
|
Loading…
Reference in a new issue