Skip to content

Commit

Permalink
statusCodePage enhance (OpenUserJS#1299)
Browse files Browse the repository at this point in the history
* More... allow refesh on *toobusy* ... not opened by a script

Auto-merge
  • Loading branch information
Martii authored Dec 1, 2017
1 parent 0190b3b commit 60fb9b4
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions views/pages/statusCodePage.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ <h1 class="status-code text-center">{{statusCode}}</h1>
(function () {
'use strict';

function onClickReload(aEv) {
window.location.reload(false);
}

function onClickClose(aEv) {
window.close();
}
Expand All @@ -83,8 +87,13 @@ <h1 class="status-code text-center">{{statusCode}}</h1>
thisNode.innerHTML = '<i class="fa fa-arrow-circle-left"></i> Go Back';
thisNode.addEventListener('click', onClickGoBack);
} else {
thisNode.innerHTML = '<i class="fa fa-window-close"></i> Close window';
thisNode.addEventListener('click', onClickClose);
if (window.opener) {
thisNode.innerHTML = '<i class="fa fa-window-close"></i> Close window';
thisNode.addEventListener('click', onClickClose);
} else {
thisNode.innerHTML = '<i class="fa fa-refresh"></i> Reload window';
thisNode.addEventListener('click', onClickReload);
}
}
}
}
Expand Down

0 comments on commit 60fb9b4

Please sign in to comment.