MCPcopy Index your code
hub / github.com/refined-github/refined-github / initToggleAllButtons

Function initToggleAllButtons

source/options/toggle-all.ts:26–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24}
25
26export default function initToggleAllButtons(): void {
27 const initialButton = $('#toggle-all-features');
28 // Show "Toggle All" section if the user already disabled a lot of features
29 if (countElements('.feature-checkbox:not(:checked)') > 50) {
30 $('details#toggle-all').hidden = false;
31 initialButton.hidden = true; // Hide button in "Debugging" section
32 } else {
33 initialButton.addEventListener('click', enableToggleAll);
34 }
35
36 $('#disable-all-features').addEventListener('click', disableAllFeatures);
37 $('#enable-all-features').addEventListener('click', enableAllFeatures);
38}

Callers 1

generateDomFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected