Add feature to fix link drag&drop in CC
This change adds an option to fix the drag&drop bug that exists in
CKEditor (https://dev.ckeditor.com/ticket/13569), which is the library
used for the rich text editor in the Community Console.
Fixes: #20
Change-Id: Ic82bf6ee6d583876858f21291723dacb5e74debe
diff --git a/src/common/common.js b/src/common/common.js
index 1a67bca..6bfdf02 100644
--- a/src/common/common.js
+++ b/src/common/common.js
@@ -18,12 +18,14 @@
'ccdarktheme_mode': 'switch',
'ccdarktheme_switch_enabled': true,
'ccforcehidedrawer': false,
+ 'ccdragndropfix': false,
};
const specialOptions = [
'profileindicatoralt_months',
'ccdarktheme_mode',
'ccdarktheme_switch_enabled',
+ 'ccdragndropfix',
];
const deprecatedOptions = [
@@ -59,3 +61,11 @@
return options;
}
+
+// This method is based on the fact that when building the extension for Firefox
+// the browser_specific_settings.gecko entry is included.
+function isFirefox() {
+ var manifest = chrome.runtime.getManifest();
+ return manifest.browser_specific_settings !== undefined &&
+ manifest.browser_specific_settings.gecko !== undefined;
+}