[go: up one dir, main page]

User:WikiBayer/WBCatHelper

The user script WikiBayerCatHelper (WBCH) is designed to categorize pages easily. The script adds OOUI elements to the category bar to manage categories.

When entering, existing categories are suggested, but it is also possible to add multiple categories at once by separating them with a comma, e.g. Category 1,Category 2,Category 3.

Features

edit
  • Adding, removing and modifying categories
  • Suggestion function for non-existent category pages and subcategories
  • Case sensitivity
  • Automatic conversion of the first letter of the category to uppercase
  • Conversion of "_" to " " for newly added categories
  • Simple operation via a user interface
  • Detection of an edit conflict
  • Various keyboard shortcuts
  • Restore a removed category using a keyboard shortcut (Ctrl + Shift + Z)
  • Batch processing (adding and removing categories)
  • Automatic sorting by alphabet (optional)
  • Manual sorting using keyboard shortcut
  • Temporary marking of the category during editing
  • Generation of a web link to the category page
  • Caching and loading of translations using the Web Storage API (mw.storage) to avoid repeatedly loading the .json file

Keyboard Shortcuts

edit

In this script, there are various keyboard shortcuts used in conjunction with specific interactions in the interface. Here are the relevant keyboard shortcuts:

Arrow keys (main category list):

Down arrow: Moves the selection to the next item in the list.
Up arrow: Moves the selection to the previous item in the list.
Enter: Selects the currently highlighted item.
Right arrow: Opens the subcategories of the currently highlighted item.
Arrow keys (subcategories):
Down arrow: Moves the selection to the next item in the subcategory list.
Up arrow: Moves the selection to the previous item in the subcategory list.
Left arrow: Exits the subcategory navigation and returns to the main list.
Enter: Selects the currently highlighted item from the subcategories.

Other keyboard shortcuts:

Escape: Closes both the category suggestion list and the subcategory list.
Tab/Enter: Adds a selected category to the list.
Ctrl + Delete or Ctrl + Shift + Backspace: Removes a category item (in edit mode).
Ctrl + Shift + Z: Restores text of removed categories (only in the text box for adding categories).
Ctrl + Down arrow: Moves the category down.
Ctrl + Up arrow: Moves the category up.
Ctrl + Right arrow: Moves the cursor.
Ctrl + Left arrow: Moves the cursor.

Mouse (category fields):

Double-click (left mouse button): Selects the entire text of the text box.
Double-click (right mouse button): Selects the "Orange" category.

Languages

edit

Currently, the following languages are supported:

  • German
  • English
  • Spanish (machine translation)
  • Czech (machine translation)
  • French (machine translation)

Installation

edit

The script can be added either through your own common.js or Special:MyPage/global.js. Interface administrators also have the option to set up the script as a gadget.

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

 

 
 
 
Form on uncategorized pages