aboutsummaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRaymond Hill <rhill@raymondhill.net>2014-11-16 17:04:37 -0200
committerRaymond Hill <rhill@raymondhill.net>2014-11-16 17:04:37 -0200
commitf88d1849d03e166f7f71be8304e9390a1c6930f3 (patch)
tree51a3475341555b122b7c4ea29e495709f314ea8a /meta
parent370ff5aee8ab39e88621f3b22ffb31b8aee7707b (diff)
downloaduBlock-f88d1849d03e166f7f71be8304e9390a1c6930f3.zip
uBlock-f88d1849d03e166f7f71be8304e9390a1c6930f3.tar.gz
uBlock-f88d1849d03e166f7f71be8304e9390a1c6930f3.tar.bz2
fix bug introduced in 338bf595078d0a7e52c70edd93f7b866dd00d314
Diffstat (limited to 'meta')
-rw-r--r--meta/crx/vapi-background.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/meta/crx/vapi-background.js b/meta/crx/vapi-background.js
index 331e2bf..1603382 100644
--- a/meta/crx/vapi-background.js
+++ b/meta/crx/vapi-background.js
@@ -89,13 +89,13 @@ vAPI.tabs.get = function(tabId, callback) {
// select: true // if a tab is already opened with that url, then select it instead of opening a new one
vAPI.tabs.open = function(details) {
- var url = details.url;
- if ( typeof url !== 'string' || url === '' ) {
+ var targetURL = details.url;
+ if ( typeof targetURL !== 'string' || targetURL === '' ) {
return null;
}
// extension pages
- if ( /^[\w-]{2,}:/.test(url) !== true ) {
- url = vAPI.getURL(url);
+ if ( /^[\w-]{2,}:/.test(targetURL) !== true ) {
+ targetURL = vAPI.getURL(targetURL);
}
// dealing with Chrome's asynchronous API
@@ -106,7 +106,7 @@ vAPI.tabs.open = function(details) {
var subWrapper = function() {
var _details = {
- url: details.url,
+ url: targetURL,
active: !!details.active
};
@@ -147,7 +147,7 @@ vAPI.tabs.open = function(details) {
if ( details.select ) {
chrome.tabs.query({ currentWindow: true }, function(tabs) {
- var url = details.url.replace(rgxHash, '');
+ var url = targetURL.replace(rgxHash, '');
// this is questionable
var rgxHash = /#.*/;
var selected = tabs.some(function(tab) {