Documentation Source Text

Check-in [ea86d36c1c]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Use javascript to delay setting href on anchors for deliverables on the download page. This is designed to prevent robots from downloading the deliverables.
Timelines: family | ancestors | descendants | both | 3.7.17
Files: files | file ages | folders
SHA1:ea86d36c1cccbced7d5f6e014f6f8808bc63de25
User & Date: drh 2013-08-07 15:02:10
Context
2013-08-22
20:28
Clearly label the source code snapshots on the download page as source code. Leaf check-in: 0e1cfbafc8 user: drh tags: 3.7.17
2013-08-07
15:39
Merge the changes from the 3.7.17 branch into trunk. check-in: 69c4153640 user: drh tags: trunk
15:02
Use javascript to delay setting href on anchors for deliverables on the download page. This is designed to prevent robots from downloading the deliverables. check-in: ea86d36c1c user: drh tags: 3.7.17
2013-08-03
18:42
Change pre-release snapshot descriptions to include links to change logs. check-in: e847b39547 user: drh tags: 3.7.17
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to pages/download.in.

     3      3   <h2>SQLite Download Page</h2>
     4      4   <table width="100%" cellpadding="5" cellspacing="0">
     5      5   
     6      6   <tcl>
     7      7   hd_keywords {download page}
     8      8   set nDownload 0
     9      9   set BG {}
           10  +unset -nocomplain href
           11  +unset -nocomplain href_cnt
           12  +set href_cnt 0
    10     13   proc Product {pattern desc {frag {}}} {
    11     14     regsub VVV $pattern {*} p3
    12     15     regsub DATE $p3 {20*} p3
    13     16     regsub YEAR $p3 {20[134][0-9]} p3
    14     17     regsub VVV $pattern {(30\d{5})} pattern
    15     18     regsub DATE $pattern {(\d{12})} pattern
    16     19     regsub YEAR $pattern {\d{4}} pattern
................................................................................
    59     62       }
    60     63       hd_puts "$tr<td width=\"10\"></td>"
    61     64       hd_puts "<td valign=\"top\" align=\"right\">"
    62     65       if {$frag!=""} {
    63     66         eval hd_fragment $frag
    64     67         set frag {}
    65     68       }
    66         -    hd_puts "<a href=\"$file\">[file tail $file]</a><br>($size $units)</td>\n"
           69  +    global href href_cnt
           70  +    incr href_cnt
           71  +    set href(a$href_cnt) $file
           72  +    hd_puts "<a id='a$href_cnt'>[file tail $file]</a><br>($size $units)</td>\n"
    67     73       hd_puts "<td width=\"5\"></td>"
    68     74       regsub -all VERSION $desc $version d2
    69     75       hd_puts "\n<td valign=\"top\">"
    70     76       hd_resolve [string trim $d2]
    71     77       hd_puts "<br>(sha1: $sha1sum)</td></tr>\n"
    72     78       incr ::nDownload
    73     79     }
................................................................................
   359    365   at:</p>
   360    366   
   361    367   <blockquote>
   362    368   <a href="http://www.sqlite.org/cgi/docsrc">http://www.sqlite.org/cgi/docsrc</a> (Dallas)<br>
   363    369   <a href="http://www2.sqlite.org/cgi/docsrc">http://www2.sqlite.org/cgi/docsrc</a> (Newark)<br>
   364    370   <a href="http://www3.sqlite.org/cgi/docsrc">http://www3.sqlite.org/cgi/docsrc</a> (Fremont)<br>
   365    371   </blockquote>
          372  +<tcl>
          373  +proc set_download_hyperlinks {} {
          374  +  set script "<script type='text/JavaScript'>\n"
          375  +  append script "/* <!\[CDATA\[ */\n"
          376  +  append script "function adce4d016d6cd()\173\n"
          377  +  append script "function d391(a,b){document.getElementById(a).href=b;}\n"
          378  +  global href
          379  +  foreach {i h} [array get href] {append script "d391('$i','$h');\n"}
          380  +  append script "\175\n"
          381  +  append script "setTimeout('adce4d016d6cd();',10);\n"
          382  +  append script "/* \]\]> */\n"
          383  +  append script "</script>\n"
          384  +  hd_puts $script
          385  +}
          386  +set_download_hyperlinks
          387  +</tcl>