]> git.proxmox.com Git - pve-docs.git/commitdiff
mediawiki toc: adapt to version 1.35
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 28 May 2021 12:19:09 +0000 (14:19 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 28 May 2021 12:19:09 +0000 (14:19 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
asciidoc/mediawiki-asciidoc.js

index 6dbf58bed7d4c7a7b3cc0b56317de21f2b7d5e5b..655f3f796efdd900d92b0c8cd1d206ece31c595d 100644 (file)
@@ -91,8 +91,11 @@ var asciidoc = {
 
 // add init to mediawiki resource loader queue
 (window.RLQ=window.RLQ||[]).push(function(){
-    mw.hook('wikipage.content').add(function($content) {
-       asciidoc.toc($content);
-       asciidoc.footnotes($content);
+    // cannot use mw.hook directly here yet, the mediawiki.base module is not yet available
+    mw.loader.implement('pve.doctoc', function() {
+       mw.hook('wikipage.content').add(function($content) {
+           asciidoc.toc($content);
+           asciidoc.footnotes($content);
+       });
     });
 });