launch website on double click
This commit is contained in:
parent
2e9b3d0943
commit
56c1ca7d2f
|
@ -144,13 +144,17 @@ angular
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.viewCipher = function (cipher) {
|
$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.cancelClick = true;
|
||||||
|
cipher.clicked = false;
|
||||||
$scope.launchWebsite(cipher);
|
$scope.launchWebsite(cipher);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
cipher.clicked = true;
|
cipher.clicked = true;
|
||||||
|
cipher.cancelClick = false;
|
||||||
|
|
||||||
$timeout(function () {
|
$timeout(function () {
|
||||||
if (cipher.cancelClick) {
|
if (cipher.cancelClick) {
|
||||||
|
@ -172,6 +176,13 @@ angular
|
||||||
}, 200);
|
}, 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) {
|
$scope.viewGrouping = function (grouping, folder) {
|
||||||
storeState();
|
storeState();
|
||||||
$state.go('viewGrouping', {
|
$state.go('viewGrouping', {
|
||||||
|
|
|
@ -181,13 +181,17 @@ angular
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.viewCipher = function (cipher) {
|
$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.cancelClick = true;
|
||||||
|
cipher.clicked = false;
|
||||||
$scope.launchWebsite(cipher);
|
$scope.launchWebsite(cipher);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
cipher.clicked = true;
|
cipher.clicked = true;
|
||||||
|
cipher.cancelClick = false;
|
||||||
|
|
||||||
$timeout(function () {
|
$timeout(function () {
|
||||||
if (cipher.cancelClick) {
|
if (cipher.cancelClick) {
|
||||||
|
@ -209,6 +213,13 @@ angular
|
||||||
}, 200);
|
}, 200);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.launchWebsite = function (cipher) {
|
||||||
|
if (cipher.login && cipher.login.uri) {
|
||||||
|
$analytics.eventTrack('Launched Website');
|
||||||
|
chrome.tabs.create({ url: cipher.login.uri });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
function storeState() {
|
function storeState() {
|
||||||
angular.extend(state, {
|
angular.extend(state, {
|
||||||
scrollY: getScrollY(),
|
scrollY: getScrollY(),
|
||||||
|
|
Loading…
Reference in New Issue