User talk:Ohconfucius/dashes.js: Difference between revisions
→eISSN: new section |
SandyGeorgia (talk | contribs) →Dashes script: add one |
||
(One intermediate revision by the same user not shown) | |||
Line 13: | Line 13: | ||
The script doesn't recognise the eISSN parameter in {{tl|infobox journal}} as one that shouldn't be changed; it tries to change an accurate hyphen to an inaccurate dash which produces a broken link, presumably mistaking it for a date range. See for example [[City (journal)]], [[The Journal of Urology]], [[Annual Review of Entomology]]. It seems to know not to do it when the eISSN isn't a plausible date range, as in [[Textual Practice]], however. Fairly easily spotted and avoided, but I thought someone might want to know. – [[User:Arms & Hearts|Arms & Hearts]] ([[User talk:Arms & Hearts|talk]]) 12:21, 22 December 2020 (UTC) |
The script doesn't recognise the eISSN parameter in {{tl|infobox journal}} as one that shouldn't be changed; it tries to change an accurate hyphen to an inaccurate dash which produces a broken link, presumably mistaking it for a date range. See for example [[City (journal)]], [[The Journal of Urology]], [[Annual Review of Entomology]]. It seems to know not to do it when the eISSN isn't a plausible date range, as in [[Textual Practice]], however. Fairly easily spotted and avoided, but I thought someone might want to know. – [[User:Arms & Hearts|Arms & Hearts]] ([[User talk:Arms & Hearts|talk]]) 12:21, 22 December 2020 (UTC) |
||
== Dashes script == |
|||
Ohconfusius, [[User:GregU/dashes.js]] seems to be glitching. Several of us could not get it to work at [[Battle of Tippecanoe]], and yet I was able to get it to work [https://en.wikipedia.org/w/index.php?title=Hemothorax&diff=prev&oldid=1001137661 here] and [https://en.wikipedia.org/w/index.php?title=History_of_Minnesota&diff=1001206448&oldid=1001179549 here]. [[User:SandyGeorgia|'''Sandy'''<span style="color: green;">Georgia</span>]] ([[User talk:SandyGeorgia|Talk]]) 18:26, 18 January 2021 (UTC) |
Revision as of 18:28, 18 January 2021
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
Fix hyphens, dashes, and minus signs per MOS:DASH.
Installation
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
![](http://upload.wikimedia.org/wikipedia/en/thumb/f/fe/Dashes_tab.jpg/400px-Dashes_tab.jpg)
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.
Dashes in template transclusions
The script User:GregU/dashes.js has a bug: it breaks usages of Template:Excerpt. Example: Special:Diff/983876004. Ohconfucius, could you please check if your fork of this script also has this bug? —andrybak (talk) 20:03, 16 October 2020 (UTC)
- I've tweaked the script. Hopefully it works now. -- Ohc ¡digame! 19:33, 17 October 2020 (UTC)
Aircraft naming conventions
See the recent discussion at WT:AutoWikiBrowser/Typos § Aircraft naming conventions. Hyphens are correct in aircraft models such as "ATR 42-300", "Dash 8-400"; "Boeing 737-800". Please could you tweak your script to avoid changing these to dashes. Thanks. Rosbif73 (talk) 09:39, 13 December 2020 (UTC)
eISSN
The script doesn't recognise the eISSN parameter in {{infobox journal}} as one that shouldn't be changed; it tries to change an accurate hyphen to an inaccurate dash which produces a broken link, presumably mistaking it for a date range. See for example City (journal), The Journal of Urology, Annual Review of Entomology. It seems to know not to do it when the eISSN isn't a plausible date range, as in Textual Practice, however. Fairly easily spotted and avoided, but I thought someone might want to know. – Arms & Hearts (talk) 12:21, 22 December 2020 (UTC)
Dashes script
Ohconfusius, User:GregU/dashes.js seems to be glitching. Several of us could not get it to work at Battle of Tippecanoe, and yet I was able to get it to work here and here. SandyGeorgia (Talk) 18:26, 18 January 2021 (UTC)