User:Lenore/autolink: Difference between revisions
Appearance
Content deleted Content added
Line 30: | Line 30: | ||
<pre style="background:transparent; overflow:auto"> |
<pre style="background:transparent; overflow:auto"> |
||
⚫ | |||
document.write('<script type="text/javascript" src="' + |
|||
⚫ | |||
'&action=raw&ctype=text/javascript"></script>'); |
|||
</pre> |
</pre> |
||
to your monobook.js. If you use wikEd, add a new line like this |
to your monobook.js. If you use [[WP:wikEd|wikEd]], add a new line like this |
||
<pre style="background:transparent; overflow:auto"> |
<pre style="background:transparent; overflow:auto"> |
||
var autolinkParseLink = false; |
var autolinkParseLink = false; |
||
importScript('User:Lenore/autolink.js'); |
|||
document.write('<script type="text/javascript" src=' + |
|||
'"/enwiki/w/index.php?title=User:Lenore/autolink.js' + |
|||
'&action=raw&ctype=text/javascript"></script>'); |
|||
</pre> |
</pre> |
||
Revision as of 15:25, 20 June 2009
Credits
Thanks to User:Omegatron, who developed the initial code.
How it works
This tool parse external links and template code (URLs) in history pages (Recent Changes, Watchlist and Contributions too), making them into colorful links: for example, if you write a code like
[http://en.wikipedia.org Wikipedia]
[http://en.wikipedia.org]
or more simplyhttp://en.wikipedia.org
{{Val}}
in edit summary, it will shown in these pages in this way
in other pages, in particular in code sections and diff, parse external links, wikilinks and template code making them into links (not colorful).
This tool doesn't work on preview mode.
Add this tool
To use autolink, add this line
importScript('User:Lenore/autolink.js');
to your monobook.js. If you use wikEd, add a new line like this
var autolinkParseLink = false; importScript('User:Lenore/autolink.js');
because of a Firefox bug, wikEd fails to parse URLs in diff pages: then, they'll not work correctly.
Bug and suggestions
Report here eventual bugs and suggestions here, thanks.