Skip to content

Instantly share code, notes, and snippets.

@esedic
Created April 25, 2024 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esedic/70fdeabdbcfd14f8733c7d4ff9d778e2 to your computer and use it in GitHub Desktop.
Save esedic/70fdeabdbcfd14f8733c7d4ff9d778e2 to your computer and use it in GitHub Desktop.
JavaScript for triggering Clear & Refresh modifications buttons
// 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