User:Espyo/Pikan: Difference between revisions

Update.
No edit summary
(Update.)
Line 7: Line 7:


==Source==
==Source==
{{see|User:Espyo/pikan.js}}
{{see|User:Espyo/pikan-core.js}}
{{see|User:Espyo/pikan-pikipedia.js}}


==Analyzing==
==Analyzing==
Line 90: Line 91:
*1.2.0 ({{date|8|July|2015}}):
*1.2.0 ({{date|8|July|2015}}):
**Made it find italics and quotes, and suggest {{tem|transcript}} instead.
**Made it find italics and quotes, and suggest {{tem|transcript}} instead.
*2.0.0 ({{date|11|July|2015}}):
**Split the core module from the Pikipedia module. This increases portability. Unfortunately, this removes Greasemonkey support.


===Future===
===Future===
Line 100: Line 103:


==Outside use==
==Outside use==
I also made Pikan with flexibility in mind. Feel free to grab the script and change it to your own will. I even added Greasemonkey information so you can run it as a Greasemonkey script. If you want to add the script to your wiki, you can change the problems and matches it checks for simply by editing the pikan.find_problems function. Quick guide:
I also made Pikan with flexibility in mind. If you want to add the script to your wiki, follow these steps:


* Create your own copy of [[/pikan-pikipedia.js|pikan-pikipedia.js]] (naming it whatever you want).
* Change <code>pikan.url</code> to point to your wiki. This is used for the "[More info]" links.
* Change <code>pikan.url</code> to point to your wiki. This is used for the "[More info]" links.
* Edit pikan.find_problems to your suiting.
* Edit pikan.find_problems to your suiting.
Line 110: Line 114:
:* 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. At the end, you'll find code that's more or less Pikipedia-specific, so you can probably delete that.
:* There are more helper functions in the code. I documented all of them. At the end, you'll find code that's more or less Pikipedia-specific, so you can probably delete that.
* On your wiki's MediaWiki:Common.js, import Pikan like so: <code>importScriptURI('//www.pikminwiki.com/index.php?title=User:Espyo/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).


==FAQ==
==FAQ==
;Why do I have to press search again every time I make a change?
;Why do I have to press search again every time I make a change?
:Because the positions of the old problem matches will be changed when you edit, and there's no reasonable way to keep track of them as you add and delete text.
:Because the positions of the old problem matches will be changed when you edit, and there's no reasonable way to keep track of them as you add and delete text.