One practical way to start using the sarcastimark everywhere in your browser is with a userscript manager such as Tampermonkey, Violentmonkey or another compatible extension.
Install a userscript manager
Install a compatible userscript extension for your browser, then create a new userscript.
Paste the script below
Save the script and make sure it is enabled.
Type /s
When writing in a text field, textarea or supported contenteditable editor, /s will be replaced with !᭨.
// ==UserScript==
// @name Replace /s with !᭨
// @namespace https://sarcastimark.com
// @version 1.0
// @author Bradán Maolfhoghmhair (bmrtfm)
// @description Replaces /s with !᭨ in input fields, textareas, and contenteditable elements.
// @match *://*/*
// @grant none
// @run-at document-end
// ==/UserScript==
(function () {
'use strict';
function replaceText(element) {
if (element.tagName === 'INPUT' || element.tagName === 'TEXTAREA') {
const start = element.selectionStart;
const end = element.selectionEnd;
const value = element.value;
if (value.includes('/s')) {
const newValue = value.replace(/\/s/g, '!᭨');
const diff = value.length - newValue.length;
element.value = newValue;
element.setSelectionRange(start - diff, end - diff);
}
} else if (element.isContentEditable) {
const selection = window.getSelection();
if (!selection.rangeCount) return;
const range = selection.getRangeAt(0);
const node = range.startContainer;
if (node.nodeType === Node.TEXT_NODE &&
node.nodeValue.includes('/s')) {
const cursorOffset = range.startOffset;
const originalLength = node.nodeValue.length;
node.nodeValue =
node.nodeValue.replace(/\/s/g, '!᭨');
// Adjust selection to maintain natural typing feel
const lengthDiff =
originalLength - node.nodeValue.length;
const newOffset = Math.max(
0,
cursorOffset - lengthDiff
);
try {
range.setStart(node, newOffset);
range.setEnd(node, newOffset);
selection.removeAllRanges();
selection.addRange(range);
} catch (e) {
// Fallback for edge cases in rich text editors
}
}
}
}
document.addEventListener('input', (event) => {
replaceText(event.target);
}, true);
})();