From fbb2f2d200ed01dfb7278f86879bc7039ebf1a81 Mon Sep 17 00:00:00 2001 From: wukko Date: Sun, 11 Sep 2022 16:19:01 +0600 Subject: [PATCH] avoid an error that can be caused by intentionally breaking cobalt no idea why you'd change user agent to chrome in firefox, then disable clipboard button, and change user agent back to firefox, but now cobalt page won't crash if you do that --- src/front/cobalt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/front/cobalt.js b/src/front/cobalt.js index b4055bdb..badf4282 100644 --- a/src/front/cobalt.js +++ b/src/front/cobalt.js @@ -218,7 +218,7 @@ function toggle(toggl) { updateToggle(toggl, sGet(toggl)) } function loadSettings() { - if (sGet("disableClipboardButton") == "true") eid("pasteFromClipboard").style.display = "none"; + if (sGet("disableClipboardButton") == "true" && !isFirefox) eid("pasteFromClipboard").style.display = "none"; if (sGet("alwaysVisibleButton") == "true") { eid("alwaysVisibleButton").checked = true; eid("download-button").value = '>>'