Fix the "disable unified profiles" feature
This is a bug similar to the one fixed in commit db412d9. I've added a
comment to prevent this from happening again.
Change-Id: I2bd754ce9b0795cd41feb0f70181888760ca3a52
diff --git a/src/content_scripts/console_inject_start.js b/src/content_scripts/console_inject_start.js
index 78a5d2e..32f3159 100644
--- a/src/content_scripts/console_inject_start.js
+++ b/src/content_scripts/console_inject_start.js
@@ -2,7 +2,9 @@
const SMEI_UNIFIED_PROFILES = 9;
chrome.storage.sync.get(null, function(items) {
- if (items.loaddrafts || items.smei_sortdirection) {
+ /* IMPORTANT NOTE: Remember to change this when changing the "ifs" below!! */
+ if (items.loaddrafts || items.smei_sortdirection ||
+ items.disableunifiedprofiles) {
var startup =
JSON.parse(document.querySelector('html').getAttribute('data-startup'));
@@ -17,8 +19,7 @@
if (items.disableunifiedprofiles) {
var index = startup[1][6].indexOf(SMEI_UNIFIED_PROFILES);
- if (index > -1)
- startup[1][6].splice(index, 1);
+ if (index > -1) startup[1][6].splice(index, 1);
}
document.querySelector('html').setAttribute(