Last modified: 2012-09-29 20:18:50 UTC
href="" means that you want to see the current index, and even then it is better to say href=".". The message text should be: Format broken links <a href="#" class="new">like this</a> (alternative: like this<a href="#" class="internal">?</a>)
note: I am sure "#" will send you to the top of the document in some "old?" browsers.
Do we even need to have that message as a proper link? couldn't we just fudge it with some css?
# will send you to the top (especially in Firefox for instance) In the preferences this is a bit dangerous, especially in skins with non-tabbed preferences. We could use the preferences JS, to hook the links and cancel their events of course.... @p858snake. Fudging it with CSS wouldn't be skin independent.
And why is sending to the top worse than sending to the index? How about: Format broken links <a id="org.wikimedia.MediaWiki.fakelink.1" href="#org.wikimedia.MediaWiki.fakelink.1" class="new">like this</a> (alternative: like this <a id="org.wikimedia.MediaWiki.fakelink.2" href="#org.wikimedia.MediaWiki.fakelink.2" class="internal">?</a>)
That will cause the page to akwardly scroll down untill that link is at the top of the window, which is not the expected behaviour. If one wans't to make the link jump to itself use #mw-input-highlightbroken which is the nearest ID. I suggest using href="#", which doesn't refresh/leave the page in any browser. In most modern browsers it does nothing, and in (some) Mozilla browsers it scrols back to the top (big deal). To finish the deal onclick="return false;" ?
To finish the deal. disable the click event. onclick is discouraged, and it is likely to be deprecated; handlers should be set within the JS UI controller framework. Of couse, the exact code to use depends on the controller used. Please do not take that remark as an insult; I am sure your recipe was meant to be pseudocode.
Why not just <a class="new">like this</a>
Because that would not work in browsers that do not support CSS. BTW, it should also say rel=nofollow.
Preference 'highlightbroken' was removed