summaryrefslogtreecommitdiff
path: root/qutebrowser/html
diff options
context:
space:
mode:
authormhm@mhm.com <mhm@mhm.com>2017-12-04 19:02:09 +0100
committermhm@mhm.com <mhm@mhm.com>2017-12-04 19:02:09 +0100
commit28caddf3c1700f77c78173b3677abd71c8d9582a (patch)
treea3c4934c0f1fd4861e5002eb98f95a3af43e0dc5 /qutebrowser/html
parentb58cfead05b201c3664fde8657556c5b260a9e6a (diff)
downloadqutebrowser-28caddf3c1700f77c78173b3677abd71c8d9582a.tar.gz
qutebrowser-28caddf3c1700f77c78173b3677abd71c8d9582a.zip
delay added, text changed
Diffstat (limited to 'qutebrowser/html')
-rw-r--r--qutebrowser/html/back.html20
1 files changed, 13 insertions, 7 deletions
diff --git a/qutebrowser/html/back.html b/qutebrowser/html/back.html
index b6190feda..cfaae589b 100644
--- a/qutebrowser/html/back.html
+++ b/qutebrowser/html/back.html
@@ -21,6 +21,15 @@ function go_forward() {
history.forward();
}
+function prepare_restore() {
+ if (!document.hidden) {
+ go_back();
+ break;
+ }
+
+ document.addEventListener("visibilitychange", go_back);
+}
+
// there are three states
// default: register focus listener,
// on focus: go back and switch to the state forward
@@ -38,17 +47,14 @@ switch (history.state) {
go_forward();
break;
default:
- if (!document.hidden) {
- go_back();
- break;
- }
-
- document.addEventListener("visibilitychange", go_back);
+ setTimeout(prepare_restore, 1000);
break;
}
{% endblock %}
{% block content %}
<noscript><p>Javascript isn't enabled. So you need to manually go back in history to restore this tab.</p></noscript>
-<p>If you see this site something went wrong, or you reached the end of the history, or you disabled javascript.</p>
+<p>Loading suspended page...<br>
+<br>
+If nothing happens, something went wrong or you disabled JavaScript.</p>
{% endblock %}