mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-23 11:56:00 +01:00
launch website on double click
This commit is contained in:
parent
2e9b3d0943
commit
56c1ca7d2f
@ -144,13 +144,17 @@ angular
|
||||
};
|
||||
|
||||
$scope.viewCipher = function (cipher) {
|
||||
if (cipher.clicked) {
|
||||
var canLaunch = cipher.login && cipher.login.uri &&
|
||||
(cipher.login.uri.startsWith('http://') || cipher.login.uri.startsWith('https://'));
|
||||
if (canLaunch && cipher.clicked) {
|
||||
cipher.cancelClick = true;
|
||||
cipher.clicked = false;
|
||||
$scope.launchWebsite(cipher);
|
||||
return;
|
||||
}
|
||||
|
||||
cipher.clicked = true;
|
||||
cipher.cancelClick = false;
|
||||
|
||||
$timeout(function () {
|
||||
if (cipher.cancelClick) {
|
||||
@ -172,6 +176,13 @@ angular
|
||||
}, 200);
|
||||
};
|
||||
|
||||
$scope.launchWebsite = function (cipher) {
|
||||
if (cipher.login && cipher.login.uri) {
|
||||
$analytics.eventTrack('Launched Website');
|
||||
chrome.tabs.create({ url: cipher.login.uri });
|
||||
}
|
||||
};
|
||||
|
||||
$scope.viewGrouping = function (grouping, folder) {
|
||||
storeState();
|
||||
$state.go('viewGrouping', {
|
||||
|
@ -181,13 +181,17 @@ angular
|
||||
};
|
||||
|
||||
$scope.viewCipher = function (cipher) {
|
||||
if (cipher.clicked) {
|
||||
var canLaunch = cipher.login && cipher.login.uri &&
|
||||
(cipher.login.uri.startsWith('http://') || cipher.login.uri.startsWith('https://'));
|
||||
if (canLaunch && cipher.clicked) {
|
||||
cipher.cancelClick = true;
|
||||
cipher.clicked = false;
|
||||
$scope.launchWebsite(cipher);
|
||||
return;
|
||||
}
|
||||
|
||||
cipher.clicked = true;
|
||||
cipher.cancelClick = false;
|
||||
|
||||
$timeout(function () {
|
||||
if (cipher.cancelClick) {
|
||||
@ -209,6 +213,13 @@ angular
|
||||
}, 200);
|
||||
};
|
||||
|
||||
$scope.launchWebsite = function (cipher) {
|
||||
if (cipher.login && cipher.login.uri) {
|
||||
$analytics.eventTrack('Launched Website');
|
||||
chrome.tabs.create({ url: cipher.login.uri });
|
||||
}
|
||||
};
|
||||
|
||||
function storeState() {
|
||||
angular.extend(state, {
|
||||
scrollY: getScrollY(),
|
||||
|
Loading…
Reference in New Issue
Block a user