What follows is a fork of User:GregU/dashes.js (forked on 27 May 2020) The editor who developed the script is no longer active, and changes to Wikipedia have restricted who can edit the old script page.

Please see the edit history for User:GregU/dashes.js for attribution

Overview

edit

Fix hyphens, dashes, and minus signs per MOS:DASH.

Installation

edit

To install, add the following line to your personal JavaScript page:

importScript('User:Ohconfucius/dashes.js');

This tool can be used standalone until it is added to AutoEd and wikEd. This module should follow unicodify.js if it is used.

  • If inside wikEd, you will need to hit the pencil icon to temporarily disable wikEd in order to use this tool.
  • If using AutoEd, you will need to custom list your modules, including this script as one of the modules. It is currently not possible to use both AutoEd and dashes.js independently of each other.

Utilisation

edit
 

After installation, hit refresh in your browser. The installed script will add a "–" tab to the drop-down tab at the top, located between the 'watchlist star' and the search box (using the vector.js skin).

You can use the "–" tab when you're viewing an article or when you're already editing it. Pressing it will make the fixes, leaving you viewing the changes. You should review the changes because the tool will occasionally (rarely) make a mistake. You can undo changes or make your own changes, then hit "Save page" when done.

The user can disable these conversions by putting "nodashes" somewhere in the text—either temporarily or permanently. You can similarly add "scores" if the score-detection heuristic doesn't trigger automatically.

Testing page is at User:GregU/dashes.js/tests. Please report false positives on the talk page.