chromeStorage fixes
This commit is contained in:
parent
ee025fc80b
commit
5bfbf64778
7 changed files with 44 additions and 143 deletions
|
|
@ -1,17 +1,26 @@
|
|||
'use strict';
|
||||
angular.module('copayApp.services')
|
||||
.factory('applicationService', function() {
|
||||
var root = {};
|
||||
var root = {};
|
||||
var isChromeApp = window.chrome && chrome.runtime && chrome.runtime.id;
|
||||
|
||||
root.restart = function() {
|
||||
// Go home reloading the application
|
||||
var hashIndex = window.location.href.indexOf('#!/');
|
||||
root.restart = function() {
|
||||
|
||||
console.log('RESTART');
|
||||
|
||||
// Go home reloading the application
|
||||
var hashIndex = window.location.href.indexOf('#!/');
|
||||
if (isChromeApp) {
|
||||
console.log('isChromeApp restting ');
|
||||
chrome.runtime.restart();
|
||||
} else {
|
||||
window.location = window.location.href.substr(0, hashIndex);
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
root.reload = function() {
|
||||
window.location.reload();
|
||||
};
|
||||
root.reload = function() {
|
||||
window.location.reload();
|
||||
};
|
||||
|
||||
return root;
|
||||
return root;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue