2011-11-29

This commit is contained in:
Aurélien Mino 2012-03-29 00:19:11 +02:00
parent 217fd901c7
commit a493b840da

View file

@ -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) {