i am not sure where i have to put this code, please help...
Talk:Snippets/Open specific links in new window
In Mediawiki 1.31 this does not work. Neither for internal nor for external links.
~~~~
Works for me if I copy the code and execute it on the browser's JavaScript console, and then click on the link with that markup.
Maybe you put the code on the wrong place, or there are other JavaScript errors preventing this code from being executed.
When I try to do this with an image:
<span class="newwin">[[File:Summer Banner.jpg|link=Summer Fun]]</span>
It gives me a "Bad title" page with this error: The requested page title contains invalid characters: "[".
and the URL looks like this: https://mywikisite/index.php/[object%20HTMLImageElement]
Any ideas?
I've updated the code to fix this.
Thanks! Works great.
There are no older topics