mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-01 18:08:19 +01:00
remove query string from manifest popup
This commit is contained in:
parent
0656e732fe
commit
847c3df7df
@ -62,7 +62,7 @@
|
|||||||
"38": "images/icon38.png"
|
"38": "images/icon38.png"
|
||||||
},
|
},
|
||||||
"default_title": "bitwarden",
|
"default_title": "bitwarden",
|
||||||
"default_popup": "popup/index.html?uilocation=popup"
|
"default_popup": "popup/index.html"
|
||||||
},
|
},
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"tabs",
|
"tabs",
|
||||||
|
@ -33,8 +33,14 @@ angular
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (chrome.windows.create) {
|
if (chrome.windows.create) {
|
||||||
href = href.replace('uilocation=popup', 'uilocation=popout').replace('uilocation=tab', 'uilocation=popout')
|
if (href.indexOf('?uilocation=') > -1) {
|
||||||
.replace('uilocation=sidebar', 'uilocation=popout');
|
href = href.replace('uilocation=popup', 'uilocation=popout').replace('uilocation=tab', 'uilocation=popout')
|
||||||
|
.replace('uilocation=sidebar', 'uilocation=popout');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var hrefParts = href.split('#');
|
||||||
|
href = hrefParts[0] + '?uilocation=popout' + (hrefParts.length > 0 ? '#' + hrefParts[1] : '');
|
||||||
|
}
|
||||||
|
|
||||||
chrome.windows.create({
|
chrome.windows.create({
|
||||||
url: href,
|
url: href,
|
||||||
|
@ -229,19 +229,20 @@ function initUtilsService() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
UtilsService.prototype.inSidebar = function (theWindow) {
|
UtilsService.prototype.inSidebar = function (theWindow) {
|
||||||
return theWindow.location.search && theWindow.location.search.indexOf('uilocation=sidebar') > -1;
|
return theWindow.location.search !== '' && theWindow.location.search.indexOf('uilocation=sidebar') > -1;
|
||||||
};
|
};
|
||||||
|
|
||||||
UtilsService.prototype.inTab = function (theWindow) {
|
UtilsService.prototype.inTab = function (theWindow) {
|
||||||
return theWindow.location.search && theWindow.location.search.indexOf('uilocation=tab') > -1;
|
return theWindow.location.search !== '' && theWindow.location.search.indexOf('uilocation=tab') > -1;
|
||||||
};
|
};
|
||||||
|
|
||||||
UtilsService.prototype.inPopout = function (theWindow) {
|
UtilsService.prototype.inPopout = function (theWindow) {
|
||||||
return theWindow.location.search && theWindow.location.search.indexOf('uilocation=popout') > -1;
|
return theWindow.location.search !== '' && theWindow.location.search.indexOf('uilocation=popout') > -1;
|
||||||
};
|
};
|
||||||
|
|
||||||
UtilsService.prototype.inPopup = function (theWindow) {
|
UtilsService.prototype.inPopup = function (theWindow) {
|
||||||
return theWindow.location.search && theWindow.location.search.indexOf('uilocation=popup') > -1;
|
return theWindow.location.search === '' || theWindow.location.search.indexOf('uilocation=') === -1 ||
|
||||||
|
theWindow.location.search.indexOf('uilocation=popup') > -1;
|
||||||
};
|
};
|
||||||
|
|
||||||
function validIpAddress(ipString) {
|
function validIpAddress(ipString) {
|
||||||
|
Loading…
Reference in New Issue
Block a user