From c07bf9888df059b7aa2a16cb8baea4221242c82d Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Mon, 29 Jun 2015 20:05:00 +0100 Subject: [PATCH] Part of ACREP-32. Remove the Handlebars helpers 'mkws-best-url' and 'mkws-other-urls'. The relevant logic is now in the widget itself. I hope this will make Jason happy. --- src/mkws-handlebars.js | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/src/mkws-handlebars.js b/src/mkws-handlebars.js index 27975cd..1572f89 100644 --- a/src/mkws-handlebars.js +++ b/src/mkws-handlebars.js @@ -81,31 +81,6 @@ Handlebars.registerHelper('mkws-first', function(items, options) { }); -var _urlRegexp = /^(https?:)?\/\//; -Handlebars.registerHelper('mkws-best-url', function(items) { - for (var i in items) { - var item = items[i] - if (item.match(_urlRegexp)) { - mkws.debug("'" + item + "' *is* a URL"); - return item; - } - mkws.debug("'" + item + "' is not a URL"); - } - return ""; -}); -Handlebars.registerHelper('mkws-other-urls', function(items) { - var res = []; - for (var i in items) { - var item = items[i] - if (item.match(_urlRegexp)) { - res.push(item); - } - } - return res; -}); - - - Handlebars.registerHelper('mkws-commaList', function(items, options) { var out = ""; -- 1.7.10.4