Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Enhance the "Last modified" messages so that they provide a hyperlink to the source code, but also include an anti-robot defense. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
b2ed58e67f09df25dd9f06b5d6a00162 |
User & Date: | drh 2022-09-23 19:18:13 |
Context
2022-09-24
| ||
16:31 | Fix a broken hyperlink reported by forum post aec0c9cb6d. (check-in: 43d12ec89b user: drh tags: trunk) | |
2022-09-23
| ||
19:18 | Enhance the "Last modified" messages so that they provide a hyperlink to the source code, but also include an anti-robot defense. (check-in: b2ed58e67f user: drh tags: trunk) | |
18:27 | Add the "This page last modified on" message to the bottom of most documentation pages. (check-in: 50342cef46 user: drh tags: trunk) | |
Changes
Changes to document_header.tcl.
︙ | ︙ | |||
105 106 107 108 109 110 111 112 113 114 115 116 117 118 | b.innerHTML='show'; }else{ x.style.display = ''; b.innerHTML='hide'; } return false; } </script> }] regsub -all {\n+\s+} [string trim $ret] \n ret regsub -all {\s*/\*[- a-z0-9A-Z"*\n]+\*/} $ret {} ret return $ret } | > > > > > > > > > > > > > > > > > > > > > > > > > > > | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | b.innerHTML='show'; }else{ x.style.display = ''; b.innerHTML='hide'; } return false; } var antiRobot = 0; var antiRobotBody = document.getElementsByTagName("body")[0]; function antiRobotGo(){ if( antiRobot!=3 ) return; antiRobot = 7; var j = document.getElementById("mtimelink"); if(j.hasAttribute("data-href")) j.href=j.getAttribute("data-href"); } function antiRobotDefense(){ antiRobotBody.onmousedown=function(){ antiRobot |= 2; antiRobotGo(); antiRobotBody.onmousedown=null; } antiRobotBody.onmousemove=function(){ antiRobot |= 2; antiRobotGo(); antiRobotBody.onmousemove=null; } setTimeout(function(){ antiRobot |= 1; antiRobotGo(); }, 100) antiRobotGo(); } antiRobotDefense(); </script> }] regsub -all {\n+\s+} [string trim $ret] \n ret regsub -all {\s*/\*[- a-z0-9A-Z"*\n]+\*/} $ret {} ret return $ret } |
Changes to wrap.tcl.
︙ | ︙ | |||
587 588 589 590 591 592 593 | set uuid {} set mtime {} set fname {} regexp {^artifact: +([0-9a-z]+)} $finfo all uuid regexp {\nmtime: +([-0-9]+ [:0-9]+)} $finfo all mtime regexp {\nfile: +([^\n]+)} $finfo all fname set uuid [string range $uuid 0 16] | | | > | | | | | | 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 | set uuid {} set mtime {} set fname {} regexp {^artifact: +([0-9a-z]+)} $finfo all uuid regexp {\nmtime: +([-0-9]+ [:0-9]+)} $finfo all mtime regexp {\nfile: +([^\n]+)} $finfo all fname set uuid [string range $uuid 0 16] set hd(mtime-msg) [hd_trim \ "<p align=\"center\"><small><i>This page last modified on \ <a href=\"https://sqlite.org/docsrc/honeypot\" id=\"mtimelink\" \ data-href=\"https://sqlite.org/docsrc/finfo/$fname?m=$uuid\">$mtime</a>\ </small></i></p>"] # set hd(mtime-msg) [hd_trim \ # "<p align=\"center\"><small><i>This page last modified on $mtime\ # </small></i></p>"] if {[file exists DRAFT]} { set hd(footer) [hd_trim { <p align="center"><font size="6" color="red">*** DRAFT ***</font></p> }] } else { set hd(footer) {} } |
︙ | ︙ |