🏠 Home 

Greasy Fork is available in English.

Drawaria Keep Buttons Enabled

Mantiene los botones siempre habilitados


Installer dette script?
Skaber
YouTubeDrawaria
Daglige installationer
0
Installationer i alt
4
Bedømmelser
0 0 0
Version
11-1-2025
Oprettet
27.12.2024
Opdateret
11.01.2025
Size
4,94 kB
Licens
MIT
Gælder for

This script ensures that specific buttons on the `https://drawaria.online/` website remain enabled and clickable at all times. Here's a brief explanation of its functionality:

1. **Target Buttons**:
- It targets buttons with the classes `btn`, `btn-primary`, `btn-block`, and either `pgdrawbutton` or `spawnavatarbutton`, as well as the button with the ID `sendtogallery`.

2. **Enable Buttons**:
- The `keepButtonsEnabled` function removes the `disabled` attribute and ensures the buttons are clickable by setting `pointer-events: auto`.

3. **MutationObserver**:
- It uses a `MutationObserver` to monitor changes in the DOM and re-enable the buttons if they are disabled dynamically.

4. **Interval Check**:
- A `setInterval` is added to re-enable the buttons every second as an extra precaution.

5. **Click Event Interception**:
- It intercepts click events on the targeted buttons to ensure they remain enabled even if they are disabled after being clicked.

In summary, this script ensures that the specified buttons are always active and usable, regardless of any changes or restrictions applied by the website.