urldecoder | |
---|---|
Browsers | * |
Skins | * |
Code | urldecoder.js |
Released | April 24, 2009 |
Updated | March 7, 2015 |
Developer | AlexSm |
urldecoder is a userscript for easy pasting of links into wikicode.
How to use it:
- paste any URL
- (if desired) type a blank space and then the link name (what will be displayed):
http://de.wikipedia.org/wiki/Ding this page|
[[:de:Ding|this page]]
The script will:
- automatically add brackets to form an external link,
- make it an internal link (if possible) using most Interwikimedia prefixes,
- percent-decode URL:
a %26 b
→a & b
- which is mostly useful in non-Latin wikis where most URLs look like
%D1%EB%F3%E6…
- which is mostly useful in non-Latin wikis where most URLs look like
- convert (now outdated) secure.wikimedia.org links to normal.
The script will simplify all URLs inside the text you select; it is not limited to processing a single url.
Installation
Add this to your js file:
// [[user:js/urldecoder]]importScript('user:js/urldecoder.js');
For other MediaWiki projects:
mw.loader.load('https://www.search.com.vn/wiki/index.php?lang=en&q=user:js/urldecoder.js&action=raw&ctype=text/javascript');
Notes
- When converting URL to a local internal link the script will add a leading colon if:
- the link is category, file or interwiki,
- and the page is not article or category.
- The script also decodes anchors, although in some rare cases the correct decoding is simply impossible. For example, #2$ и #2.24 produce the same encoded anchor.
- It works with both old and new toolbar.
- It is a gadget in Russian Wikipedia.
Optional parameters
urlDecoderKey = 'c' //accesskey (works only in old toolbar)urlDecoderIntLinks = true //also try to simplify existing [[internal links]] in selected text
See also
- Template:Urltowiki, a template which performs a similar function to this script
🔥 Top keywords: Main PageSpecial:SearchPage 3Wikipedia:Featured picturesHouse of the DragonUEFA Euro 2024Bryson DeChambeauJuneteenthInside Out 2Eid al-AdhaCleopatraDeaths in 2024Merrily We Roll Along (musical)Jonathan GroffJude Bellingham.xxx77th Tony AwardsBridgertonGary PlauchéKylian MbappéDaniel RadcliffeUEFA European Championship2024 ICC Men's T20 World CupUnit 731The Boys (TV series)Rory McIlroyN'Golo KantéUEFA Euro 2020YouTubeRomelu LukakuOpinion polling for the 2024 United Kingdom general electionThe Boys season 4Romania national football teamNicola CoughlanStereophonic (play)Gene WilderErin DarkeAntoine GriezmannProject 2025