Skip to content
This repository was archived by the owner on Feb 28, 2019. It is now read-only.

Commit d78aef3

Browse files
committed
Add an alternative javascript redirect in html redirect page
1 parent 5f2dac7 commit d78aef3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

EasyWebsiteMirror.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,19 @@ def generate_html_redirect_page(target_url, msg='', delay_sec=1):
182182
<html lang="zh-CN">
183183
<head>
184184
<meta charset="UTF-8">
185-
<title>重定向 Page Redirect</title>
185+
<title>重定向 (Page Redirect)</title>
186186
<meta http-equiv="refresh" content="%d; url=%s">
187+
<script>setTimeout(function(){location.href="%s"} , %d000);</script>
187188
</head>
188189
<body>
189190
<pre>%s</pre>
190191
<hr />
191-
You are now redirecting to <a href="%s">%s</a>, if it not automatically, please click that link.
192+
You are now redirecting to <a href="%s">%s</a>, if it didn't redirect automatically, please click that link.
192193
</body>
193-
</html>""" % (delay_sec, html_escape(target_url), html_escape(msg), html_escape(target_url), html_escape(target_url))
194+
</html>""" % (
195+
delay_sec, html_escape(target_url), html_escape(target_url), delay_sec + 1,
196+
html_escape(msg), html_escape(target_url), html_escape(target_url)
197+
)
194198
resp_content = resp_content.encode('utf-8')
195199
return Response(response=resp_content)
196200

0 commit comments

Comments
 (0)