On 01/11/2021 10:26, Simon wrote:
It's easy to add CSS to PmWiki, a group, or a page.
Is there some way of doing something similar for Javascript?
I had a scan of the documentation, but it wasn't oo obvious to me.
Yes, you can inject JavaScript either in the skin template, or in the
$HTMLHeaderFmt or $HTMLFooterFmt arrays.
Example for the latter: see scripts/stdconfig.php injecting
pub/pmwiki-utils.js.
e.g. I'd like to add this https://browser-update.org/#install to my
wiki
In this case (script injecting another script) I'd go with either the
skin template, or $HTMLHeaderFmt:
$HTMLHeaderFmt['browser-update'] = '
<script>
// the code generated in the form on the above link
</script>';
Petko
--
If you upgrade : http://www.pmwiki.org/Upgrades
_______________________________________________
pmwiki-devel mailing list
pmwiki-devel@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel