Talk:Snippets/Open specific links in new window

About this board

where to put this code?

2
80.188.94.196 (talkcontribs)

i am not sure where i have to put this code, please help...

Ciencia Al Poder (talkcontribs)
Reply to "where to put this code?"

This does not work in Mediawiki 1.31

2
MichaelKuhn (talkcontribs)

In Mediawiki 1.31 this does not work. Neither for internal nor for external links.

~~~~

Ciencia Al Poder (talkcontribs)

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.

Reply to "This does not work in Mediawiki 1.31"

Open a linked image in a new window

3
Jrsovereign (talkcontribs)

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?

Ciencia Al Poder (talkcontribs)

I've updated the code to fix this.

Jrsovereign (talkcontribs)

Thanks! Works great.

There are no older topics
Return to "Snippets/Open specific links in new window" page.