-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththemed-toot-button-states.js
36 lines (34 loc) · 1.3 KB
/
themed-toot-button-states.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// ==UserScript==
// @name Toot button states
// @namespace http://tampermonkey.net/
// @version 1.1.0
// @description Add better distinguishable "disabled" and "hover" states to a toot button with a colorful background
// @updateURL https://raw.githubusercontent.com/Sirs0ri/userscripts/main/themed-toot-button-states.js
// @downloadURL https://raw.githubusercontent.com/Sirs0ri/userscripts/main/themed-toot-button-states.js
// @author Sirs0ri
// @match https://corteximplant.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=corteximplant.com
// @grant GM_addStyle
// ==/UserScript==
(function() {
'use strict';
GM_addStyle(`
:where(.compose-form__publish-button-wrapper button, .ui__header__links .button):after {
z-index: 1;
}
:where(.compose-form__publish-button-wrapper button, .ui__header__links .button):before {
content: "";
position: absolute;
inset: -1px;
transition: opacity 200ms;
opacity: 0;
}
:where(.compose-form__publish-button-wrapper button, .ui__header__links .button)[disabled]:before {
backdrop-filter: saturate(0.65) brightness(1.4) contrast(0.75) blur(1px);
opacity: 1;
}
:where(.compose-form__publish-button-wrapper button, .ui__header__links .button)[disabled]:hover:before {
opacity: 0.5;
}
`)
})();