diff --git a/content/commands.js b/content/commands.js index ff284d19..0670079c 100644 --- a/content/commands.js +++ b/content/commands.js @@ -2091,8 +2091,8 @@ vimperator.Commands = function() //{{{ if (special) vimperator.open("about:"); else - vimperator.echo(":" + vimperator.util.escapeHTML(vimperator.commandline.getCommand()) + - "\nVimperator " + vimperator.version + " running on:\n" + navigator.userAgent); + vimperator.echo(":" + vimperator.util.escapeHTML(vimperator.commandline.getCommand()) + + "\nVimperator " + vimperator.version + " running on:\n" + navigator.userAgent); }, { usage: ["ve[rsion][!]"], diff --git a/content/hints.js b/content/hints.js index f8fef0ed..dce12398 100644 --- a/content/hints.js +++ b/content/hints.js @@ -49,13 +49,13 @@ vimperator.Hints = function() //{{{ var x = 0, y = 0; var elem = valid_hints[0]; - var elemTagName = elem.tagName; + var elemTagName = elem.localName.toLowerCase(); elem.focus(); - if (elemTagName == 'FRAME' || elemTagName == 'IFRAME') + if (elemTagName == 'frame' || elemTagName == 'iframe') return 0; // for imagemap - if (elemTagName == 'AREA') + if (elemTagName == 'area') { var coords = elem.getAttribute("coords").split(","); x = Number(coords[0]); @@ -82,7 +82,8 @@ vimperator.Hints = function() //{{{ var elem = valid_hints[0]; var doc = window.content.document; - if (elem.tagName == 'FRAME' || elem.tagName == 'IFRAME') + var elemTagName = elem.localName.toLowerCase(); + if (elemtagName == 'frame' || elemtagName == 'iframe') { elem.contentWindow.focus(); return; @@ -96,7 +97,7 @@ vimperator.Hints = function() //{{{ var x = 0; var y = 0; // for imagemap - if (elem.tagName == 'AREA') + if (elemtagName == 'area') { var coords = elem.getAttribute("coords").split(","); x = Number(coords[0]); diff --git a/content/vimperator.js b/content/vimperator.js index 2d1dddc9..fc3c265d 100644 --- a/content/vimperator.js +++ b/content/vimperator.js @@ -503,7 +503,7 @@ const vimperator = (function() //{{{ var str = vimperator.io.readFile(filename); // handle pure javascript files specially - if (filename.search("\.js$") != -1) + if (/\.js$/.test(filename)) { eval(str); } @@ -654,7 +654,7 @@ const vimperator = (function() //{{{ var files = vimperator.io.readDirectory(plugin_dir.path); vimperator.log("Sourcing plugin directory...", 3); files.forEach(function(file) { - if (!file.isDirectory() && /\.js$/.test(file.path)) + if (!file.isDirectory() && /\.(js|vimp)$/i.test(file.path)) vimperator.source(file.path, false); }); }