Last modified by Vincent Massol on 2020/04/24

<
From version < 4.1 >
edited by Gunter Ohrner
on 2019/06/26
To version < 4.2 >
edited by Ryan Delk
on 2019/06/26
>
Change comment: [document] add missing line to javascript code

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.GOhrner
1 +XWiki.Ryan
FAQCode.FAQClass[0]
answer
... ... @@ -1,6 +1,6 @@
1 1  In order to configure all external links to open in new tabs / windows automatically, i.e. to use the link target "##_blank##" from an HTML point of view, you have to add some JavaScript to your XWiki:
2 2  
3 -1. Create a new page, or go to an existing page that won’t be removed
3 +1. Create a new page, or go to an existing page that won’t be removed.
4 4  1. Click //Edit// and select //Objects//.
5 5  1. In the //Select a Class// box, select //JavaScriptExtension// and click the //Add// button.
6 6  1. In the object that just appeared, enter the following code into the //Code// box:
... ... @@ -14,6 +14,7 @@
14 14   }
15 15   }
16 16  }
17 +document.addEventListener("DOMContentLoaded", fixExternalLinks);
17 17  {{/code}})))
18 18  1. Set //Use this extension// to //On this wiki//.
19 19  

Get Connected