5,350
edits
m (→Changelog) |
mNo edit summary |
||
(15 intermediate revisions by 3 users not shown) | |||
Line 7: | Line 7: | ||
==Source== | ==Source== | ||
{{see| | {{see|MediaWiki:Gadget-Pikan-core.js}} | ||
{{see| | {{see|MediaWiki:Gadget-Pikan-pikipedia.js}} | ||
==Analyzing== | ==Analyzing== | ||
Line 111: | Line 111: | ||
*1.4.0 ({{date|12|February|2017}}): | *1.4.0 ({{date|12|February|2017}}): | ||
**Updated policy and guideline links. | **Updated policy and guideline links. | ||
*1.5.0 ({{date|12|June|2018}}): | |||
**Added {{ssbu}}. | |||
*1.6.0 ({{date|27|October|2018}}): | |||
**Corrected instances of "for 3DS" to "for Nintendo 3DS", when referring to the fourth ''Super Smash Bros.'' game. | |||
*1.7.0 ({{date|24|June|2020}}): | |||
**Corrected the rule that says gallery images should have captions ending in periods, since it was not recognizing galleries with properties. | |||
*1.8.0 ({{date|27|October|2021}}): | |||
**Added {{pb}}. | |||
*1.9.0 ({{date|13|September|2022}}): | |||
**Added {{p4}}. | |||
*1.10.0 ({{date|29|July|2023}}): | |||
**Made it find misspellings of [[Shepherd]]. | |||
**Made it find links to [[Piklopedia]]. | |||
**Improvements to the way it detects if there is an image in the article. | |||
**Improvements to the way it detects "you" outside of quotes and transcripts. | |||
*1.11.0 ({{date|26|August|2023}}): | |||
**Made the {{game icons}} check not trigger if there's an infobox. | |||
**Made the trailing space check not trigger if it's a template placeholder parameter. | |||
===Future=== | ===Future=== | ||
;Known problems: | ;Known problems: | ||
* The script detects things like "you" inside of quotes, when it shouldn't. | |||
;Future plans: | ;Future plans: | ||
*Make it suggest spreading out large templates with one argument per line, plus align the templates with spaces for padding. | * Make it suggest spreading out large templates with one argument per line, plus align the templates with spaces for padding. | ||
*Make it not recommend empty line paddings before section headers if there is a {{tem|clear}}. | * Make it not recommend empty line paddings before section headers if there is a {{tem|clear}}. | ||
==Outside use== | ==Outside use== | ||
I also made Pikan with flexibility in mind. If you want to add the script to your wiki, follow these steps: | 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 [[ | * Create your own copy of [[MediaWiki:Gadget-Pikan-pikipedia.js|Gadget-Pikan-pikipedia.js]] (naming it whatever you want). | ||
* Change the first few parameters to match your wiki (e.g. wiki_url, module_name, etc.). | * Change the first few parameters to match your wiki (e.g. wiki_url, module_name, etc.). | ||
* Edit pikan.find_problems to your suiting. | * Edit pikan.find_problems to your suiting. | ||
Line 132: | Line 150: | ||
:* 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. | ||
* | * 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> | |||
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: | |||
<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( | |||
function() { | |||
mw.loader.load('//your.wiki/url/MediaWiki:Gadget-Pikan-website.js?action=raw&ctype=text/javascript'); | |||
} | |||
); | |||
}</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== |