This gadget seems not to be working in all cases. A link like File:Roger Willemsen signature.svg isn't redirected to commons. -- Patrick87 ( talk) 14:19, 29 April 2013 (UTC)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Whenever this gadget is included multiple times (as in
d:MediaWiki:Common.js and
m:User:Ricordisamoa/global.js) all file links result in "https://commons.wikimedia.org//commons.wikimedia.org/wiki/File:...". The issue would be solved by replacing localBasePath
and localBaseScript
in currVal
only at the string beginning. Thanks in advance, --
Ricordi
samoa
05:41, 31 August 2013 (UTC)
localBasePath = mw.util.wikiGetlink( mw.config.get( 'wgFormattedNamespaces' )['6'] + ':' ), localBaseScript = mw.util.wikiScript() + '?title=' + mw.util.wikiUrlencode( mw.config.get( 'wgFormattedNamespaces' )['6'] + ':' ),
With these two lines:
localBasePath = new RegExp('^' + mw.util.wikiGetlink( mw.config.get( 'wgFormattedNamespaces' )['6'] + ':' ).replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&")), localBaseScript = new RegExp('^' + (mw.util.wikiScript() + '?title=' + mw.util.wikiUrlencode( mw.config.get( 'wgFormattedNamespaces' )['6'] + ':' )).replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&")),
Jackmcbarn ( talk) 00:59, 4 September 2013 (UTC)
I'm using this gadget externally by importing it into global.js. When I do so using Chrome 54, I get an error on Wikimedia pages:
index.php?title=MediaWiki:Gadget-imagelinks.js&action=raw&ctype=text/javascript:21 Uncaught TypeError: $.escapeRE is not a function
James Martindale ( talk) 06:17, 21 November 2016 (UTC)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please copy this upstream change, https://www.mediawiki.org/?title=Snippets%2FDirect_imagelinks_to_Commons&type=revision&diff=5451422&oldid=3976429
For more information, see mw:Parsoid/Parser_Unification/Media_structure/FAQ
Thanks, Arlolra ( talk) 20:45, 24 November 2022 (UTC)
This gadget seems not to be working in all cases. A link like File:Roger Willemsen signature.svg isn't redirected to commons. -- Patrick87 ( talk) 14:19, 29 April 2013 (UTC)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Whenever this gadget is included multiple times (as in
d:MediaWiki:Common.js and
m:User:Ricordisamoa/global.js) all file links result in "https://commons.wikimedia.org//commons.wikimedia.org/wiki/File:...". The issue would be solved by replacing localBasePath
and localBaseScript
in currVal
only at the string beginning. Thanks in advance, --
Ricordi
samoa
05:41, 31 August 2013 (UTC)
localBasePath = mw.util.wikiGetlink( mw.config.get( 'wgFormattedNamespaces' )['6'] + ':' ), localBaseScript = mw.util.wikiScript() + '?title=' + mw.util.wikiUrlencode( mw.config.get( 'wgFormattedNamespaces' )['6'] + ':' ),
With these two lines:
localBasePath = new RegExp('^' + mw.util.wikiGetlink( mw.config.get( 'wgFormattedNamespaces' )['6'] + ':' ).replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&")), localBaseScript = new RegExp('^' + (mw.util.wikiScript() + '?title=' + mw.util.wikiUrlencode( mw.config.get( 'wgFormattedNamespaces' )['6'] + ':' )).replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&")),
Jackmcbarn ( talk) 00:59, 4 September 2013 (UTC)
I'm using this gadget externally by importing it into global.js. When I do so using Chrome 54, I get an error on Wikimedia pages:
index.php?title=MediaWiki:Gadget-imagelinks.js&action=raw&ctype=text/javascript:21 Uncaught TypeError: $.escapeRE is not a function
James Martindale ( talk) 06:17, 21 November 2016 (UTC)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please copy this upstream change, https://www.mediawiki.org/?title=Snippets%2FDirect_imagelinks_to_Commons&type=revision&diff=5451422&oldid=3976429
For more information, see mw:Parsoid/Parser_Unification/Media_structure/FAQ
Thanks, Arlolra ( talk) 20:45, 24 November 2022 (UTC)