Board Thread:Support Requests - Getting Technical/@comment-25301601-20140722040907/@comment-452-20140802202722

The fix is even simpler than I first thought.

Line 34 of the script explicitly sets $a.attr('href', '/wiki/File:' + urlpart); This change fixes the problem: $a.attr('href', $a.attr('href')); It sets the href to itself, so if link= was set, the href is the link specified, if not then the href is already a link to the file page.

I ran the script in my console with that change made, and tested an internal link, an interwiki link and a file page link, and they all worked as expected with nary a lightbox to be seen.

(Also, setting "/wiki/" to begin with is silly, because not all wikis have "/wiki/" in the url.)

Edit: a better way to fix the problem would be to change the same line to: $a.unbind('click'); Which is how I would have done it to begin with if I was writing the script from scratch. The fact that it wasn't done that way made me assume it didn't work, so I didn't try it.