User:Espyo/Pikan: Difference between revisions

m
Text replacement - "* On your wiki's MediaWiki:Common.js, import Pikan like so: <code>importScriptURI('//www.pikminwiki.com/index.php?title=MediaWiki:Pikan-core.js&action=raw&ctype=text/javascript');</code> * After that line, add a similar import, but pointing to your own version of pikan-pikipedia.js (again, named whatever it is you wanted)." to "* On your wiki's MediaWiki:Common.js, import Pikan like so: <pre>if (mw.config.get('wgAction') === 'edit' || mw.config.get('wgAction') === 'submit'...
m (Text replacement - "User:Espyo/pikan-" to "MediaWiki:Pikan-")
m (Text replacement - "* On your wiki's MediaWiki:Common.js, import Pikan like so: <code>importScriptURI('//www.pikminwiki.com/index.php?title=MediaWiki:Pikan-core.js&action=raw&ctype=text/javascript');</code> * After that line, add a similar import, but pointing to your own version of pikan-pikipedia.js (again, named whatever it is you wanted)." to "* On your wiki's MediaWiki:Common.js, import Pikan like so: <pre>if (mw.config.get('wgAction') === 'edit' || mw.config.get('wgAction') === 'submit'...)
Line 138: Line 138:
:* To create your own code to find a problem, you can add the problem to the list with pikan.save_problem. Check the function in the code for a documentation comment explaining it.
:* To create your own code to find a problem, you can add the problem to the list with pikan.save_problem. Check the function in the code for a documentation comment explaining it.
:* There are more helper functions in the code. I documented all of them. Use those as well, if needed.
:* There are more helper functions in the code. I documented all of them. Use those as well, if needed.
* On your wiki's MediaWiki:Common.js, import Pikan like so: <code>importScriptURI('//www.pikminwiki.com/index.php?title=MediaWiki:Pikan-core.js&action=raw&ctype=text/javascript');</code>
* On your wiki's MediaWiki:Common.js, import Pikan like so:
* After that line, add a similar import, but pointing to your own version of pikan-pikipedia.js (again, named whatever it is you wanted).
<pre>if (mw.config.get('wgAction') === 'edit' || mw.config.get('wgAction') === 'submit') {
  mw.loader.getScript('https://www.pikminwiki.com/index.php?title=MediaWiki:Pikan-core.js&action=raw&ctype=text/javascript').then(
    function () {
      mw.loader.load('https://your-wiki.url/index.php?title=User:Foo/pikan-website.js&action=raw&ctype=text/javascript');
    }
  );
}</pre>
* Update the second URL to point to the raw source of your own version of pikan-pikipedia.js (again, named whatever it is you wanted).


==FAQ==
==FAQ==