diff --git a/lib/metadata.js b/lib/metadata.js index 2cc11e072..97f2e484a 100644 --- a/lib/metadata.js +++ b/lib/metadata.js @@ -386,6 +386,7 @@ Meta.commands = Object.keys(commands); Meta.createLineHandler = function (ref, errorHandler) { ref.meta = {}; ref.index = 0; + ref.logged = {}; return function (err, line) { if (err) { @@ -404,10 +405,15 @@ Meta.createLineHandler = function (ref, errorHandler) { var index = ref.index++; if (typeof(line) === 'undefined') { return; } + if (Array.isArray(line)) { try { handleCommand(ref.meta, line); } catch (err2) { + var code = err2.message; + if (ref.logged[code]) { return; } + + ref.logged[code] = true; errorHandler("METADATA_COMMAND_ERR", { error: err2.stack, line: line, diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 5f22bf2c8..f1fa78379 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -1592,6 +1592,17 @@ define([ if (data.accept) { $input.attr('accept', data.accept); } button.click(function () { $input.click(); }); break; + case 'copy': + button = $('