diff --git a/content/commands.js b/content/commands.js index 455132e6..6cbf3b7b 100644 --- a/content/commands.js +++ b/content/commands.js @@ -1045,7 +1045,7 @@ vimperator.Commands = function () //{{{ { function jumpToTag(file, tag) { - vimperator.open("chrome://vimperator/locale/" + file); + vimperator.open("chrome://" + vimperator.config.name.toLowerCase() + "/locale/" + file); setTimeout(function() { var elem = vimperator.buffer.getElement('@class="tag" and text()="' + tag + '"'); if (elem) @@ -1057,7 +1057,7 @@ vimperator.Commands = function () //{{{ if (!args) { - vimperator.open("chrome://vimperator/locale/intro.html"); + vimperator.open("chrome://" + vimperator.config.name.toLowerCase() + "/locale/intro.html"); return; } diff --git a/content/util.js b/content/util.js index b5da1ba3..dde6bfe3 100644 --- a/content/util.js +++ b/content/util.js @@ -258,11 +258,9 @@ vimperator.util = { //{{{ // if the string doesn't look like a valid URL (i.e. contains a space // or does not contain any of: .:/) try opening it with a search engine // or keyword bookmark - var matches; - if (/\s/.test(urls[url]) || !/[.:\/]/.test(urls[url])) + if (vimperator.has("bookmarks") && (/\s/.test(urls[url]) || !/[.:\/]/.test(urls[url]))) { - matches = urls[url].match(/^(\S+)(?:\s+(.+))?$/); - + var matches = urls[url].match(/^(\S+)(?:\s+(.+))?$/); var alias = matches[1]; var text = matches[2] || null; @@ -274,7 +272,7 @@ vimperator.util = { //{{{ // check if the first word is a search engine var searchURL = vimperator.bookmarks.getSearchURL(text, alias); - if (searchURL/* && searchURL.length >= 1*/) + if (searchURL) { urls[url] = searchURL; continue; @@ -282,7 +280,7 @@ vimperator.util = { //{{{ else // the first word was not a search engine, search for the whole string in the default engine { searchURL = vimperator.bookmarks.getSearchURL(urls[url], null); - if (searchURL/* && searchURL.length >= 1*/) + if (searchURL) { urls[url] = searchURL; continue;