Fossil

Check-in [eac15b4c]
Login

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

Overview
Comment:The periodic "updateClock()" call made in the header for several of the built-in skins (Eagle, Enhanced1, and Xekri) violates the new stricter CSP, since it requires a JS eval. We don't need an eval here: we can pass the function's name literally to window.setTimeout instead, which treats it as a Function object, which doesn't need to be eval'd.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:eac15b4c63321d173124786259fb5d6d77a2e2b1c4e50618123efff5cfaf2428
User & Date: wyoung 2018-08-11 20:49:49
Context
2018-08-11
21:04
Added forumSel adjustment advice to forum.wiki. check-in: 0194fb67 user: wyoung tags: trunk
20:49
The periodic "updateClock()" call made in the header for several of the built-in skins (Eagle, Enhanced1, and Xekri) violates the new stricter CSP, since it requires a JS eval. We don't need an eval here: we can pass the function's name literally to window.setTimeout instead, which treats it as a Function object, which doesn't need to be eval'd. check-in: eac15b4c user: wyoung tags: trunk
19:43
Added the "Enable Forum Search" section to www/forum.wiki check-in: cc5d2e1f user: wyoung tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to skins/eagle/header.txt.

    82     82         return n < 10 ? '0' + n : n;
    83     83       }
    84     84       e.innerHTML = d.getUTCFullYear()+ '-' +
    85     85         f(d.getUTCMonth() + 1) + '-' +
    86     86         f(d.getUTCDate())      + ' ' +
    87     87         f(d.getUTCHours())     + ':' +
    88     88         f(d.getUTCMinutes());
    89         -    setTimeout("updateClock();",(60-d.getUTCSeconds())*1000);
           89  +    setTimeout(updateClock,(60-d.getUTCSeconds())*1000);
    90     90     }
    91     91   }
    92     92   updateClock();
    93     93   </script>
    94     94   <div class="mainmenu">
    95     95   <th1>
    96     96   proc menulink {url name} {

Changes to skins/enhanced1/header.txt.

    82     82         return n < 10 ? '0' + n : n;
    83     83       }
    84     84       e.innerHTML = d.getUTCFullYear()+ '-' +
    85     85         f(d.getUTCMonth() + 1) + '-' +
    86     86         f(d.getUTCDate())      + ' ' +
    87     87         f(d.getUTCHours())     + ':' +
    88     88         f(d.getUTCMinutes());
    89         -    setTimeout("updateClock();",(60-d.getUTCSeconds())*1000);
           89  +    setTimeout(updateClock,(60-d.getUTCSeconds())*1000);
    90     90     }
    91     91   }
    92     92   updateClock();
    93     93   </script>
    94     94   <div class="mainmenu">
    95     95   <th1>
    96     96   proc menulink {url name} {

Changes to skins/xekri/header.txt.

    82     82         return n < 10 ? '0' + n : n;
    83     83       }
    84     84       e.innerHTML = d.getUTCFullYear()+ '-' +
    85     85         f(d.getUTCMonth() + 1) + '-' +
    86     86         f(d.getUTCDate())      + ' ' +
    87     87         f(d.getUTCHours())     + ':' +
    88     88         f(d.getUTCMinutes());
    89         -    setTimeout("updateClock();",(60-d.getUTCSeconds())*1000);
           89  +    setTimeout(updateClock,(60-d.getUTCSeconds())*1000);
    90     90     }
    91     91   }
    92     92   updateClock();
    93     93   </script>
    94     94   <div class="mainmenu">
    95     95   <th1>
    96     96   proc menulink {url name} {