5,549
edits
(updated page and added Gadget instructions) |
mNo edit summary |
||
Line 152: | Line 152: | ||
* If your wiki has the [[mw:Extension:Gadgets|Gadgets extension]] installed, then add an entry for Pikan to your MediaWiki:Gadgets-definition page: | * If your wiki has the [[mw:Extension:Gadgets|Gadgets extension]] installed, then add an entry for Pikan to your MediaWiki:Gadgets-definition page: | ||
<pre>* Pikan[ResourceLoader|default|actions=edit]|Pikan-core.js|Pikan-website.js</pre> | <pre>* Pikan[ResourceLoader|default|actions=edit]|Pikan-core.js|Pikan-website.js</pre> | ||
And create your own version of [[MediaWiki:Gadget-Pikan-core.js]] by copying its contents or adding just the following line: | |||
<pre>mw.loader.load('https://www.pikminwiki.com/MediaWiki:Gadget-Pikan-core.js?action=raw&ctype=text/javascript');</pre> | |||
* If your wiki doesn't have the Gadgets extension, then on your wiki's MediaWiki:Common.js, import Pikan like so: | * If your wiki doesn't have the Gadgets extension, then on your wiki's MediaWiki:Common.js, import Pikan like so: | ||
<pre>if (mw.config.get('wgAction') === 'edit' || mw.config.get('wgAction') === 'submit') { | <pre>if (mw.config.get('wgAction') === 'edit' || mw.config.get('wgAction') === 'submit') { | ||
mw.loader.getScript('https://www.pikminwiki.com/MediaWiki:Gadget-Pikan-core.js?action=raw&ctype=text/javascript').then( | mw.loader.getScript('https://www.pikminwiki.com/MediaWiki:Gadget-Pikan-core.js?action=raw&ctype=text/javascript').then( | ||
function () { | function() { | ||
mw.loader.load('//your.wiki/url/MediaWiki:Gadget-Pikan-website.js?action=raw&ctype=text/javascript'); | mw.loader.load('//your.wiki/url/MediaWiki:Gadget-Pikan-website.js?action=raw&ctype=text/javascript'); | ||
} | } | ||
); | ); | ||
}</pre> | }</pre> | ||
Update the second URL to point to the raw source of your own version of Gadget-Pikan-pikipedia.js (again, named whatever it is you wanted). | |||
==FAQ== | ==FAQ== |