From 9a1e7d180595398db5fe52fbf5d87cd71e7fe4a2 Mon Sep 17 00:00:00 2001 From: clov Date: Thu, 20 Oct 2022 08:02:42 +0200 Subject: [PATCH] =?UTF-8?q?Spellcheck=20for=20CW=C2=A0input?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Mastodon/spellcheck-cw.js | 15 +++++++++++++++ README.md | 3 +++ 2 files changed, 18 insertions(+) create mode 100644 Mastodon/spellcheck-cw.js create mode 100644 README.md diff --git a/Mastodon/spellcheck-cw.js b/Mastodon/spellcheck-cw.js new file mode 100644 index 0000000..39b457a --- /dev/null +++ b/Mastodon/spellcheck-cw.js @@ -0,0 +1,15 @@ +// ==UserScript== +// @name Force spellcheck on Mastodon's Content Warning input +// @version 1.0.0 +// @match https://*/web/* +// @run-at document-end +// ==/UserScript== + +(function () { + if (document.querySelector('#mastodon')) { + setTimeout(() => { + const attr = document.createAttribute('spellcheck') attr.value = true document.querySelector('#cw-spoiler-input').attributes.setNamedItem(attr) + }, 1000) + } +})() + diff --git a/README.md b/README.md new file mode 100644 index 0000000..0fd8653 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# UserScripts + +Collection of UserScripts