User:Skizzerz/Scripts: Difference between revisions

From StrategyWiki, the video game walkthrough and strategy guide wiki
update
(update links)
(update)
Line 1: Line 1:
This is a repository of various javascript tools that may be useful to you when editing and such. To get these tools, put the javascript in your user js (usually [[Special:Mypage/dolphin.js]]), then clear your browser cache.
This is a repository of various javascript tools that may be useful to you when editing and such. To get these tools, put the javascript in your user js (usually [[Special:Mypage/dolphin.js]]), then clear your browser cache.


==IMPORTANT: Before adding any of the below==
== Current Scripts ==
These scripts are all designed to be used in recent versions of MediaWiki which have the ResourceLoader. For best results use MediaWiki 1.20 or newer. All scripts are self-contained and do not require any extra work on your part besides enabling it in your user js page.
 
=== AJAX Patrol ===
This script allows you to patrol pages via AJAX instead of having to load the patrol successful page and navigate back in order to get to the next diff. This script was created by myself. Should work on all skins.
 
This is available as a [[Special:Preferences|Gadget]] on StrategyWiki, so the manual loading should only be necessary if you wish to test development versions (if applicable) or you wish to load it on a different wiki.
<pre>
// AJAX Patrol script
// by Skizzerz
// Uncomment the following line if you do NOT wish to have this script
// automatically load the next diff when the patrol is finished.
//var AjaxPatrolAutoNext = false;
mw.loader.load( 'http://strategywiki.org/w/index.php?title=User:Skizzerz/Scripts/AjaxPatrol.js&action=raw&ctype=text/javascript' );
</pre>
 
=== Edit Summary Warning Nullify ===
Nullifies the edit warning when you enter a blank summary
<pre>
/*********************************
** Edit Summary Warning Nullify **
*********************************/
function check_edit_summary(event) {
  return;
}
</pre>
 
=== Recent Changes Patrol ===
Adds a new "Patrol" tab on [[Special:RecentChanges]] and [[Special:BlankPage]] which loads an AJAX patrol interface to automatically step through all the pending diffs in recent changes (oldest first).
 
This script is still experimental and is in early alpha. Please report any bugs or feature requests to my [[User talk:Skizzerz|talk page]].
 
<pre>
// Recent Changes Patrol script
// by Skizzerz
mw.loader.load( 'http://strategywiki.org/w/index.php?title=User:Skizzerz/Scripts/RcPatrol.js&action=raw&ctype=text/javascript' );
</pre>
 
== Legacy Scripts ==
These scripts likely do not work anymore and were made for ancient versions of MediaWiki. The useful ones will eventually get updated.
 
===IMPORTANT: Before adding any of the below===
Before using any of the scripts below, make sure that you put this at the very '''top''' of your bluecloud.js page.
Before using any of the scripts below, make sure that you put this at the very '''top''' of your bluecloud.js page.
<pre>
<pre>
Line 8: Line 49:
</pre>
</pre>


== Edit section link for the top section ==
=== Edit section link for the top section ===
Adds an edit link that lets you section edit the very top section.
Adds an edit link that lets you section edit the very top section.
<pre>
<pre>
Line 15: Line 56:
</pre>
</pre>


== Auto-edit script ==
=== Auto-edit script ===
Enables an auto-clicking script
Enables an auto-clicking script
<pre>
<pre>
Line 23: Line 64:
</pre>
</pre>


== Find-and-replace script ==
=== Find-and-replace script ===
Enables a search-and-replace function for the edit box, including regular expression searches.  A small magnifying glass icon will appear on the left side of the macro buttons (the lightblue images above the edit box).
Enables a search-and-replace function for the edit box, including regular expression searches.  A small magnifying glass icon will appear on the left side of the macro buttons (the lightblue images above the edit box).
<pre>
<pre>
Line 31: Line 72:
</pre>
</pre>


== Edit Summary Warning Nullify ==
=== QuickDelete ===
Nullifies the edit warning when you enter a blank summary
<pre>
/*********************************
** Edit Summary Warning Nullify **
*********************************/
function check_edit_summary(event) {
  return;
}
</pre>
 
== QuickDelete ==
Changes the link of the 'delete' tab from the confirmation page to a javascript prompt for faster deletion.
Changes the link of the 'delete' tab from the confirmation page to a javascript prompt for faster deletion.
<pre>
<pre>
Line 53: Line 83:
</pre>
</pre>


==LiFilter==
===LiFilter===
Adds a filter tab to [[Special:Log]] for filtering and highlighting of results. Clicking the tab shows the filter options, and clicking again hides them. The rights log has additional filtering options. For BlueCloud skin only.
Adds a filter tab to [[Special:Log]] for filtering and highlighting of results. Clicking the tab shows the filter options, and clicking again hides them. The rights log has additional filtering options. For BlueCloud skin only.


Line 64: Line 94:
</pre>
</pre>


==Whois IP==
===Whois IP===
This script adds a "whois" tab on [[Special:Contributions]] pages for IPs that link to a whois website to obtain DNS data on the IP. The link will automatically open in a new window/tab on a left click. For BlueCloud skin only.
This script adds a "whois" tab on [[Special:Contributions]] pages for IPs that link to a whois website to obtain DNS data on the IP. The link will automatically open in a new window/tab on a left click. For BlueCloud skin only.


Line 75: Line 105:
</pre>
</pre>


==AJAX Patrol==
===AJAX Watch===
This script allows you to patrol pages via AJAX instead of having to load the patrol successful page and navigate back in order to get to the next diff. This script was created by myself. Should work on all skins.
 
<pre>
//AJAX Patrol script
//Uncomment the following line if you wish to have this script
//automatically load the next diff when the patrol is finished (if applicable).
//AjaxPatrolAutoNext = true;
importScript('User:Skizzerz/Scripts/AjaxPatrol.js');
</pre>
 
==AJAX Watch==
This script allows you to watch and unwatch pages via AJAX (like how the watch/unwatch tab works on Wikipedia). This script was created by myself and only works on BlueCloud (Monobook should already have AJAX page watching anyway).
This script allows you to watch and unwatch pages via AJAX (like how the watch/unwatch tab works on Wikipedia). This script was created by myself and only works on BlueCloud (Monobook should already have AJAX page watching anyway).


Line 95: Line 114:


== More? ==
== More? ==
Want something that's not listed here? Try searching for it on Google or some other search engine and if you still can't find it, feel free to drop a message on my [[User talk:Ryan Schmidt|talk page]] and I'll attempt to write it :)
Want something that's not listed here? Try searching for it on Google or some other search engine and if you still can't find it, feel free to drop a message on my [[User talk:Skizzerz|talk page]] and I'll attempt to write it :)