Follow

code snippet to add a CW toggle keybind 

window.onload = function() {
console.log("CW Toggle script loaded");
let area = document.querySelector(".compose-form textarea");
let cwArea = document.querySelector("-spoiler-input");

let cwButton = document.querySelector(".compose-form .compose-form__buttons button[aria-controls='cw-spoiler-input']");

function toggleCW(e) {
if (e.altKey && e.key == "c") {
cwButton.click();
}
}

area.addEventListener("keydown", toggleCW);
cwArea.addEventListener("keydown", toggleCW);
};

can easily be run with something like the {Grease, Tamper}monkey addons

this works so nicely damn, why doesn't mastodon just have this

might change it to alt+q because that's a bit easier to reach

Sign in to participate in the conversation
Pixietown

Small server part of the pixie.town infrastructure. Registration is closed.