diff options
author | Xavier Roche <xroche@users.noreply.github.com> | 2014-10-15 19:17:29 +0000 |
---|---|---|
committer | Xavier Roche <xroche@users.noreply.github.com> | 2014-10-15 19:17:29 +0000 |
commit | 9b5c6cf86ed8dbf749bc2e401d4f87d340b6413d (patch) | |
tree | 38e035f0b797edeb5bdbc708681eacedeef53887 /html/server/addurl.html | |
parent | cce112d40a6e36b2c437418e84c57490818603cb (diff) |
Fixed webhttrack incompatibility with Chrome
* closes:#53
Also fixed HTML-escaping issues inside webhttrack
Rationale: The webhttrack script made the wrong assumption that once the "browse" command returned, it meant the user killed the navigation window, and it had to kill the server itself. However, modern browsers tend to "attach" to an existing session (creating a new tab, for example, within an existing window), causing the browsing command to return immediately, thus causing the server to be killed immediately by the webhttrack script. I have rewritten the logic behind, and now the server is able to kill himself if the parent script dies, AND if the browsing client did not make any activity for two minutes. The "activity" can be any browser/refreshed page, or the internal "ping" iframe (which pings the server every 30 seconds). With this model, we *should* be compatible with old browsers, and modern ones.
Diffstat (limited to 'html/server/addurl.html')
-rwxr-xr-x | html/server/addurl.html | 83 |
1 files changed, 9 insertions, 74 deletions
diff --git a/html/server/addurl.html b/html/server/addurl.html index 41b0f07..d2f8889 100755 --- a/html/server/addurl.html +++ b/html/server/addurl.html @@ -6,75 +6,10 @@ <meta name="keywords" content="${LANG_METAKEYW}" /> <title>'${projname}' - HTTrack Website Copier</title> - <style type="text/css"> - <!-- -body { - margin: 0; padding: 0; margin-bottom: 15px; margin-top: 8px; - background: #77b; -} -body, td { - font: 14px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; - } - -#subTitle { - background: #000; color: #fff; padding: 4px; font-weight: bold; - } - -#siteNavigation a, #siteNavigation .current { - font-weight: bold; color: #448; - } -#siteNavigation a:link { text-decoration: none; } -#siteNavigation a:visited { text-decoration: none; } - -#siteNavigation .current { background-color: #ccd; } - -#siteNavigation a:hover { text-decoration: none; background-color: #fff; color: #000; } -#siteNavigation a:active { text-decoration: none; background-color: #ccc; } - - -a:link { text-decoration: underline; color: #00f; } -a:visited { text-decoration: underline; color: #000; } -a:hover { text-decoration: underline; color: #c00; } -a:active { text-decoration: underline; } - -#pageContent { - clear: both; - border-bottom: 6px solid #000; - padding: 10px; padding-top: 20px; - line-height: 1.65em; - background-image: url(images/bg_rings.gif); - background-repeat: no-repeat; - background-position: top right; - } - -#pageContent, #siteNavigation { - background-color: #ccd; - } - - -.imgLeft { float: left; margin-right: 10px; margin-bottom: 10px; } -.imgRight { float: right; margin-left: 10px; margin-bottom: 10px; } - -hr { height: 1px; color: #000; background-color: #000; margin-bottom: 15px; } -h1 { margin: 0; font-weight: bold; font-size: 2em; } -h2 { margin: 0; font-weight: bold; font-size: 1.6em; } -h3 { margin: 0; font-weight: bold; font-size: 1.3em; } -h4 { margin: 0; font-weight: bold; font-size: 1.18em; } - -.blak { background-color: #000; } -.hide { display: none; } -.tableWidth { min-width: 400px; } - -.tblRegular { border-collapse: collapse; } -.tblRegular td { padding: 6px; background-image: url(fade.gif); border: 2px solid #99c; } -.tblHeaderColor, .tblHeaderColor td { background: #99c; } -.tblNoBorder td { border: 0; } - - -// --> -</style> + <link rel="stylesheet" type="text/css" media="screen" href="style.css"> + <script type="text/javascript" src="ping.js" defer></script> <script language="javascript"> <!-- @@ -138,7 +73,7 @@ function info(str) { <td id="subTitle" align="right"> <a href="/server/file.html" target="_blank" onClick="window.open('/server/file.html', 'help', 'toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes, width=640, height=480'); return false" - onMouseOver="info('${LANG_O1}'); return true" onMouseOut="info(' '); return true" + onMouseOver="info('${html:LANG_O1}'); return true" onMouseOut="info(' '); return true" style="color:#FFFFFF" > ${LANG_O1} @@ -150,7 +85,7 @@ ${do:if-file-exists:html/index.html} <td id="subTitle" align="right"> <a href="/index.html" target="_blank" onClick="window.open('/server/help.html', 'help', 'toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes, width=640, height=480'); return false" - onMouseOver="info('${LANG_TIPHELP}'); return true" onMouseOut="info(' '); return true" + onMouseOver="info('${html:LANG_TIPHELP}'); return true" onMouseOut="info(' '); return true" style="color:#FFFFFF" > ${LANG_O5} @@ -183,20 +118,20 @@ ${do:end-if} <form action="${thisfile}" name="form"> <table width="100%"> <tr><td>${LANG_T2}</td><td>http://<input name="urladr" - onMouseOver="info('${LANG_T10}'); return true" onMouseOut="info(' '); return true" + onMouseOver="info('${html:LANG_T10}'); return true" onMouseOut="info(' '); return true" ></td></tr> <tr><td colspan=2> <table width="100%"> <th>${LANG_T4}</th> <tr><td>${LANG_T5}:</td><td><input name="urllogin" - onMouseOver="info('${LANG_T12}'); return true" onMouseOut="info(' '); return true" + onMouseOver="info('${html:LANG_T12}'); return true" onMouseOut="info(' '); return true" ></td></tr> <tr><td>${LANG_T6}:</td><td><input name="urlpass" - onMouseOver="info('${LANG_T13}'); return true" onMouseOut="info(' '); return true" + onMouseOver="info('${html:LANG_T13}'); return true" onMouseOut="info(' '); return true" ></td></tr> <tr><td>${LANG_T7}:</td><td><input type="button" value="${LANG_T8}" onClick="alert('not yet implemented!')" - onMouseOver="info('${LANG_T14}'); return true" onMouseOut="info(' '); return true" + onMouseOver="info('${html:LANG_T14}'); return true" onMouseOut="info(' '); return true" ></td></tr> </table> @@ -204,7 +139,7 @@ ${do:end-if} <tr><td> <input type="button" value="OK" onClick="if (do_add()) { window.close(); }" - onMouseOver="info('${LANG_TIPOK}'); return true" onMouseOut="info(' '); return true" + onMouseOver="info('${html:LANG_TIPOK}'); return true" onMouseOut="info(' '); return true" > </td></tr> |