Replace browser conditions by preprocessed conditions
The extension used to rely on the isFirefox method to check whether the
browser is Firefox or Chromium-based. This CL removes this function and
replaces the conditions based in this function by conditions which are
pre-processed at compile time.
Change-Id: Id7280e6c8fb3dfd3fabbc05339ef3791822aa6ac
diff --git a/src/options/optionsCommon.js b/src/options/optionsCommon.js
index bd40416..863232d 100644
--- a/src/options/optionsCommon.js
+++ b/src/options/optionsCommon.js
@@ -1,4 +1,4 @@
-import {getExtVersion, isFirefox, isReleaseVersion} from '../common/extUtils.js';
+import {getExtVersion, isReleaseVersion} from '../common/extUtils.js';
import {ensureOptPermissions, grantedOptPermissions, missingPermissions} from '../common/optionsPermissions.js';
import {cleanUpOptions, optionsPrototype, specialOptions} from '../common/optionsUtils.js';
@@ -35,9 +35,6 @@
case 'ccdarktheme_mode':
return document.getElementById(opt).value || 'switch';
- case 'ccdragndropfix':
- return document.getElementById(opt).checked || false;
-
default:
console.warn('Unrecognized option: ' + opt);
return undefined;
@@ -232,19 +229,6 @@
.appendChild(select);
break;
- // Firefox doesn't support drag and dropping bookmarks into the text
- // editor while preserving the bookmark title.
- case 'ccdragndropfix':
- var showOption = !isFirefox();
- if (showOption) {
- document.getElementById('dragndrop-wrapper')
- .removeAttribute('hidden');
-
- if (items[opt] === true)
- document.getElementById(opt).checked = true;
- }
- break;
-
default:
console.warn('Unrecognized option: ' + opt);
break;