diff --git a/common/content/buffer.js b/common/content/buffer.js index 6929ce37..04af0141 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -437,12 +437,10 @@ var Buffer = Module("buffer", { yield elems[i]; } - // s have higher priority than normal hrefs let elems = frame.document.getElementsByTagName("link"); for (let elem in iter(elems)) yield elem; - // no links? ok, look for hrefs elems = frame.document.getElementsByTagName("a"); for (let elem in iter(elems)) yield elem; diff --git a/common/modules/io.jsm b/common/modules/io.jsm index ef18759f..8f0e4061 100644 --- a/common/modules/io.jsm +++ b/common/modules/io.jsm @@ -147,7 +147,9 @@ var IO = Module("io", { source: function source(filename, params) { const { contexts } = modules; defineModule.loadLog.push("sourcing " + filename); - params = params || {}; + + if (!isObject(params)) + params = { silent: params }; let time = Date.now(); return contexts.withContext(null, function () { @@ -793,7 +795,7 @@ unlet s:cpo_save if (args.length > 1) dactyl.echoerr("E172: Only one file name allowed"); else - io.source(args[0], args.bang); + io.source(args[0], { silent: args.bang }); }, { argCount: "+", // FIXME: should be "1" but kludged for proper error message bang: true, diff --git a/common/tests/functional/testCommands.js b/common/tests/functional/testCommands.js index dd2f05b5..8cc693a0 100644 --- a/common/tests/functional/testCommands.js +++ b/common/tests/functional/testCommands.js @@ -607,11 +607,13 @@ var tests = { init: this.runtime.init, cleanup: this.runtime.cleanup, noOutput: [ + "! .pentadactyl/some-nonexistent/really-nonexistent.js", ".pentadactyl/some-nonexistent/good.css", ".pentadactyl/some-nonexistent/good.js", ".pentadactyl/some-nonexistent/good.penta" ], error: [ + ".pentadactyl/some-nonexistent/really-nonexistent.js", "~/.pentadactyl/some-nonexistent/bad.js", "~/.pentadactyl/some-nonexistent/bad.penta", "./.pentadactyl/some-nonexistent/bad.js",