I've made a 'Magic links enhancer' userscript to make magic links more useful across all SE sites.
It uses @M'vy's idea of having a basic format of [SITE:type:id]
, and works the same way across the network.
Links are expanded at POST time, so readers don't need to have the extension installed to see or use the links.
Where
SITE
is SF, SO, SU, meta, metaSU with default to the current site
type
can be user, post, faq with default to post
id
can be the id of a post, of an user and anchor a HTML anchor like in the FAQ, or a comment, or a anwser.
You can only use default values from the left. If you specify SITE you have to specify all.
(quoted from his post)
SITE
can be su
, so
, sf
, or any other SE site by using their API sitename (the thing before .stackexchange.com
), eg. [pets
], [chess]
will expand to the link to that site.
type
(followed by anchor
) can be user
(followed by user id), post
(followed by post id), help
(followed by help page name in URL), or priv
(followed by priv name in URL).
(or view the source)
Examples (if posted in a comment on this site):
[274240]
=> [Adding magic link for Meta Stack Overflow?](https://meta.stackexchange.com/q/274240)
[so:post:1732348]
=> [RegEx match open tags except XHTML self-contained tags](http://stackoverflow.com/q/1732348)
[so:post:1732454]
=> [RegEx match open tags except XHTML self-contained tags](http://stackoverflow.com/a/1732454)
[meta.so:post:321111]
=> [How to help less-skilled developers?](http://meta.stackoverflow.com/q/321111)
[user:260841]
=> [ᔕᖺᘎᕊ](https://meta.stackexchange.com/users/260841/%e1%94%95%e1%96%ba%e1%98%8e%e1%95%8a)
[pets:priv:trusted-user]
=> [trusted user](//pets.stackexchange.com/help/privileges/trusted-user)
[stackapps:help:dont-ask]
=> [Help Center](//stackapps.com/help/dont-ask)
[help:dont-ask]
=> [Help Center](http://meta.stackexchange.com)
[meta.so]
=> [Meta Stack Overflow](//meta.stackoverflow.com)
[meta.gaming.SE]
to link to Arqade Meta, the fact that this doesn't work for the SOFU trilogy sites seems like a simple oversight that should be fixed.[metaso]
links to Meta Stack Exchange and not to Meta Stack Overflow as you would expect.[meta.so]
[meta.so] and[so.meta]
[so.meta][meta.sf]
[meta.sf] and[sf.meta]
[sf.meta][meta.su]
[meta.su] and[su.meta]
[su.meta][mathoverflow.meta.se]
[mathoverflow.meta.se] and[meta.mathoverflow.se]
[meta.mathoverflow.se]. This one works:[meta.ubuntu.se]
Ask Ubuntu Meta.