X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmkws-widget-main.js;h=f1b13e02879078b4f6d346a238c520b367ebe944;hb=a6921ecbf975ae32008c7b18f437d3f3b4773d6e;hp=367ec4690bdc881f4f287ef9410a8bc8db1923fd;hpb=fcd300157c2acf190002c1808b97139eda16b6c9;p=mkws-moved-to-github.git diff --git a/src/mkws-widget-main.js b/src/mkws-widget-main.js index 367ec46..f1b13e0 100644 --- a/src/mkws-widget-main.js +++ b/src/mkws-widget-main.js @@ -140,20 +140,15 @@ mkws.registerWidgetType('records', function() { } var urls = hit['md-electronic-url']; - that.warn("urls = " + mkws.$.toJSON(urls)); var bestLink = null; var otherLinks = []; for (var j = 0; j < urls.length; j++) { var url = urls[j]; - that.warn("url #" + (j+1) + " = " + url); - if (!bestLink && url.match(/^(https?:)?\/\//)) { - mkws.debug("'" + url + "' *is* a URL"); + if (!url.match(/^(https?:)?\/\//)) { + that.warn("link '" + url + "' is not a valid URL"); + } else if (!bestLink) { bestLink = url; - } else if (bestLink) { - mkws.debug("'" + url + "' not tested"); - otherLinks.push(url); } else { - mkws.debug("'" + url + "' is not a URL"); otherLinks.push(url); } }