Created
April 25, 2024 17:38
-
-
Save esedic/70fdeabdbcfd14f8733c7d4ff9d778e2 to your computer and use it in GitHub Desktop.
JavaScript for triggering Clear & Refresh modifications buttons
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Clear mods | |
const chkBoxes = document.querySelectorAll('#tab-general .table tbody tr td:first-child input[type="checkbox"]'); | |
chkBoxes.forEach( | |
chkBox => { | |
chkBox.checked = true; | |
} | |
); | |
const clrBtn = document.querySelector('.page-header > .container-fluid > .pull-right > a[data-original-title="Clear"]'); | |
clrBtn.click(); | |
// 2. Refresh mods | |
const chkBoxes = document.querySelectorAll('#tab-general .table tbody tr td:first-child input[type="checkbox"]'); | |
chkBoxes.forEach( | |
chkBox => { | |
chkBox.checked = true; | |
} | |
); | |
const rfshBtn = document.querySelector('.page-header > .container-fluid > .pull-right > a[data-original-title="Refresh"]'); | |
rfshBtn.click(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment