Fixed some errors with installation of extension, and added a function where the toast is closed when clicked

This commit is contained in:
Kasper Rynning-Tønnesen
2015-08-04 22:55:48 +02:00
parent 83e752c4a2
commit bba0470369
5 changed files with 28 additions and 14 deletions

View File

@@ -25,11 +25,10 @@ $(document).ready(function (){
+ git_info[0].commit.message+"<br");
var _isChrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
var _isRemoteInstalled = chrome.app.isInstalled;
if (_isChrome && !_isRemoteInstalled)
Materialize.toast("<a href='#' onclick='installRemote();' style='pointer-events:all;color:white;'>Install the extension!</a>", 100000);
setTimeout(function(){
if (_isChrome && !document.getElementById('extension-is-installed'))
Materialize.toast("<a href='#' onclick='installRemote();' style='pointer-events:all;color:white;'>Install the extension!</a>", 100000);
}, 5);
window.installRemote = installRemote;
window.failed = failed;
window.success = success;