I’ll note that the recent achievements pop-up already uses true minus signs for reputation changes instead of hyphens.
Though this alone may not be enough to compel you to switch, Codidact doesn’t have this problem.
Here’s a userscript. The initial version took me about half an hour to write, so it did not require very much effort at all (and I am at a disadvantage in that I cannot easily identify every place where a negative value can appear, and fixing it up after-the-fact in the DOM adds considerable overhead; doing this server-side would be simpler and cleaner). This was easy to do. All it takes is some political will.
// ==UserScript==
// @name Stack Exchange: minus signs
// @grant none
// @run-at document-start
// @match https://*.stackexchange.com/*
// @match https://*.superuser.com/*
// @match https://*.stackoverflow.com/*
// @match https://*.mathoverflow.net/*
// @match https://*.serverfault.com/*
// @match https://*.askubuntu.com/*
// @match https://stackapps.com/*
// @exclude https://api.stackexchange.com/*
// @exclude https://data.stackexchange.com/*
// @exclude https://openid.stackexchange.com/*
// @exclude https://contests.stackoverflow.com/*
// @exclude /^https?:\/\/winterbash\d{4,}\.stackexchange\.com\//
// ==/UserScript==
const SELECTOR = `
.rep-down,
.ob-post-votes,
.js-vote-count,
.js-vote-count > *,
.js-discussion-score,
.js-discussion-score > *,
.mini-counts,
.mini-counts > :only-child,
.answer-votes,
.js-metadata-vote-count,
.s-activity-indicator,
.s-post-summary--stats-item,
.s-post-summary--stats-item-number,
.s-badge,
.s-badge > span:only-child,
.js-followed-post .fs-body3,
.vote-count-post,
.vote-count-post > :only-child,
.flex--item > div,
.vote,
.-stats,
.movedDown,
.bounty-indicator-tab,
td.event-comment > span > span,
.slick-cell.number
`;
const replaceHyphen = (obj, prop) => {
const oldValue = `${obj[prop]}`;
const newValue = oldValue.replace(/(?<=^|\s|[\[\(])\u002d(?=\d)/gu, '\u2212');
if (oldValue !== newValue)
obj[prop] = newValue;
};
const fixupNode = node => {
if (!node.matches(SELECTOR))
return;
if (node.title)
replaceHyphen(node, 'title');
if (node.firstChild?.nodeType === document.TEXT_NODE)
replaceHyphen(node.firstChild, 'data');
};
const fixupUnder = node => {
fixupNode(node);
for (const subnode of node.querySelectorAll(SELECTOR))
fixupNode(subnode);
}
if (document.body)
fixupUnder(document.body);
new MutationObserver(mutations => {
for (const mut of mutations) {
switch (mut.type) {
case 'characterData':
fixupNode(mut.target.parentNode);
break;
case 'attributes':
fixupNode(mut.target);
break;
case 'childList':
fixupUnder(mut.target);
break;
}
}
}).observe(document, {
childList: true,
attributes: true,
attributeFilter: ['title'],
characterData: true,
subtree: true,
});
:)
HYPHEN-MINUS
and "used for either hyphen or minus sign" ? (this is a serious question)-
next to my equals sign was the same as the-
in my number padHowever, in environments that are restricted to ISO 646, and often in computing generally, the hyphen is represented by a hyphen-minus ( - ), which is well known and easy to enter on keyboards.
so under what circumstances will there actually be a difference between a hyphen and a minus sign