Cancellation is also failure; don't redirect.

This commit is contained in:
ccd0 2014-10-14 19:20:01 -07:00
parent 16843a0079
commit e93a79923d

View File

@ -14,9 +14,7 @@ body {
var link = document.querySelector('a[href="https://chrome.google.com/webstore/detail/4chan-x/ohnjgmpcibpbafdlkimncjhflgedgpam"]'); var link = document.querySelector('a[href="https://chrome.google.com/webstore/detail/4chan-x/ohnjgmpcibpbafdlkimncjhflgedgpam"]');
link.addEventListener('click', function(e) { link.addEventListener('click', function(e) {
if (window.chrome && !e.shiftKey && !e.altKey && !e.ctrlKey && !e.metaKey && e.button === 0) { if (window.chrome && !e.shiftKey && !e.altKey && !e.ctrlKey && !e.metaKey && e.button === 0) {
chrome.webstore.install(undefined, undefined, function(){ chrome.webstore.install();
location.href = link.href;
});
e.preventDefault(); e.preventDefault();
} }
}, false); }, false);