User:Stumblean/common.js: Difference between revisions
No edit summary Tags: Manual revert Mobile edit Mobile web edit Advanced mobile edit |
No edit summary Tags: Mobile edit Mobile web edit Advanced mobile edit |
||
Line 18: | Line 18: | ||
showCustomize: true, | showCustomize: true, | ||
showUndoChanges: true, | showUndoChanges: true, | ||
showPreferences: true | showPreferences: true // always true so button never hides | ||
// watermark removed from prefs so cannot be toggled off | |||
}; | }; | ||
Line 232: | Line 232: | ||
// Preferences Button (always visible) | // Preferences Button (always visible) | ||
const btnPreferences = makeButton("Preferences", () => { | const btnPreferences = makeButton("Preferences", () => { | ||
prefsPanel.style.display = prefsPanel.style.display === "block" ? "none" : "block"; | |||
}); | }); | ||
Line 280: | Line 276: | ||
prefsPanel.appendChild(createCheckbox("Show Undo Changes Button", "showUndoChanges")); | prefsPanel.appendChild(createCheckbox("Show Undo Changes Button", "showUndoChanges")); | ||
prefsPanel.appendChild(createCheckbox("Show Preferences Button (cannot be hidden)", "showPreferences")); | prefsPanel.appendChild(createCheckbox("Show Preferences Button (cannot be hidden)", "showPreferences")); | ||
prefsPanel | // Removed watermark checkbox from prefsPanel | ||
function applyPreferences() { | function applyPreferences() { | ||
Line 289: | Line 285: | ||
btnCustomize.style.display = prefs.showCustomize ? "block" : "none"; | btnCustomize.style.display = prefs.showCustomize ? "block" : "none"; | ||
btnReset.style.display = prefs.showUndoChanges ? "block" : "none"; | btnReset.style.display = prefs.showUndoChanges ? "block" : "none"; | ||
btnPreferences.style.display = "block"; // never hide preferences | |||
btnPreferences.style.display = "block"; | watermark.style.display = "block"; // always show watermark | ||
watermark.style.display = | |||
} | } | ||