Jump to content

User:L10nM4st3r/wToolCore

From Meta, a Wikimedia project coordination wiki

wTools is a tool script which adds many features with automation and convenience in mind.

User script
wTools
DescriptionAdds many features with automation and convenience in mind.
AuthorL10nM4st3r
StatusIn development
First releasedJanuary 20, 2025; 17 months ago (2025-01-20)
Version0.2.2
UpdatedApril 8, 2025; 15 months ago (2025-04-08)
Browser supportFirefox, Chrome, may work in others
Skin supportMonobook
SourceUser:L10nM4st3r/wToolCore.js (template) | User:L10nM4st3r/wToolCore/Unstable.js (template)


Complete feature list

[edit]
  • A custom editor with advanced features.
  • A convenient user templating dropdown.
  • Advanced page moving tools.
  • Cacycle's wikEdDiff.
  • A restore revision button on history and diff pages.
  • A purge page link.
  • Live notification updates.


Screenshots

[edit]
Unavailable while script is in active development.


Install Guide

[edit]

To install the script globally, just add the code below to your global.js file. To install this script on another wiki, just add the code to your common.js file of that wiki.

mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:L10nM4st3r/wToolCore.js&action=raw&ctype=text/javascript');

Alternatively, if you want to use the in-development, most up-to-date version, use the below. Keep in mind that the experimental version could break at any time and without warning, since it is the version that I use to test changes.

mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:L10nM4st3r/wToolCore/Unstable.js&action=raw&ctype=text/javascript');


Settings

[edit]

You can configure the script, if you would prefer to disable certain features of it, or alter other features. A complete list of settings are below.

Setting name Type Default value Explanation Notes
editAd String " [Using wTools]" The ad which is appended to some edit summaries. You may want it to start with a space, or it may look weird.
speedyDeleteShouldRedirect Boolean false Whether or not you should be redirected to the administrator's noticeboard (or other similar name) when making speedy delete requests. If set to false, you will simply be sent back to the page.
sidebarEnabled Boolean false If true, the old sidebar will be loaded. It was disabled in an early version because it didn't work well in other skins.
editorEnabled Boolean true If false, the editor will not be loaded.
rollbackAllEditSummary String "Reverted edits by [[Special:Contributions/$2|$2]] ([[User talk:$2|talk]]) to last version by $1 {reason} (Mass Rollback)" The edit summary used when rollbacking all the edits of a user. $1 is automatically replaced with the username of the person to edit before the rollacked edits. $2 is automatically replaced with the username of the guy who is being rollbacked. And {reason} is replaced with the reason that you pass along with the rollback.
rollbackAllDefaultReason String "Vandalism" The default reason given when rollbacking all the edits of a user.
disableLiveNotifications Boolean false Whether or not to disable the automatic updating of notifications.

You can change your settings by adding above your mw.loader.load the code provided below. This example shows how to disable the custom editor.

window.wTools_config = {
	editorEnabled: false,
}

Editor

[edit]
Documentation to be added, with screenshots.

Other features list:

  • Has persistant javascript/css code folding. If you fold a line of code, and press save, the lines will remain folded for every user who also uses the tool.
  • A fullscreen mode. You can toggle fullscreen by pressing Alt+F, or by pressing the "fullscreen" button at the top of the screen.
  • Autocompletion. The autocompletion supports wikilinks, template links, as well as laguage-specific stuff (language here refering to code language, not to human language. So if you are editing a javascript page, you will get javascript-related autocompletions). Press Control+Space to show the autocompletion menu.
  • Search and replace functionality. Can be triggered using Control+F.
  • Jump to line. Can be triggered using Control+L.
  • Press Alt+W to trim all trailing whitespace (spaces at the end of pages).

Changelog

[edit]

April 8, 2025

[edit]
  • I don't remember half the stuff I've added in this update, it's mostly just bug fixes though.

March 30, 2025

[edit]
  • Fixed a few bugs which caused the autocompletion menu to open when you likely didn't want it to open.
  • Fixed a bug where the autocompletion didn't correctly get the prefix when typing links (with square brackets), which caused there to be strange bugs such as reverting to the previous quotation mark in a line. This worked just fine with template links though.
  • Added a setting which allows you to disable the live notification updates.

February 2, 2025

[edit]
  • Optimized script for loading.
  • Removed the user setting `useExperimental`.


January 31, 2025

[edit]
  • Fixed a bug where typing a colon or a slash would close the auto-completion link menu.
  • Added a search bar to the editor for searching for text.
  • Fixed some jank that could occur if you spam press the tab button.
  • Added a search and replace feature for the editor.


January 30, 2025

[edit]
  • Created this documentation page
  • Made optimization to the source code, now it should load faster.
  • Made it fix all links to all moved pages in a single edit, instead of doing it over multiple edits per page.
  • Fixed a bug where moving sub-pages wouldn't update links to the page, nor would it redirect you to the new page.
  • Changed some of the icons in the sidebar.
  • Added a changelog button to the bottom of the sidebar.
  • Now the scripts are loaded into local storage, which should help with loading speeds on slower hardware or internet connections.
  • Added 2 buttons to the top of contribution pages, allowing you to rollback all edits made by a user, or to rollback only the selected edits.
  • Added a new edit tag, which appears for supported wikis. (You can request more wikis to use the tag at my talkpage)
  • Fixed several bugs.

The To-Do List

[edit]
  • Add a template page (things like a stub template) button.
  • Add a report-user button.