From 3f0edaf202aeae0ae4e59fe9fd17e0dabf1eece6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Vilhelm=20=C3=81sgeirsson?= Date: Tue, 31 Jul 2018 22:21:42 +0000 Subject: [PATCH] Change auconenable check to check size of autocontain object. --- src/config.ts | 3 --- src/lib/autocontainers.ts | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/config.ts b/src/config.ts index 2c7de671..de81a7e3 100644 --- a/src/config.ts +++ b/src/config.ts @@ -355,9 +355,6 @@ const DEFAULTS = o({ // If moodeindicator is enabled, containerindicator will color the border of the mode indicator with the container color. containerindicator: "true", - // Enable Autocontainers - auconenable: "false", - // Autocontain directives create a container if it doesn't exist already. auconcreatecontainer: "true", diff --git a/src/lib/autocontainers.ts b/src/lib/autocontainers.ts index 0b88d9b4..2476649a 100644 --- a/src/lib/autocontainers.ts +++ b/src/lib/autocontainers.ts @@ -71,9 +71,9 @@ export class AutoContain implements IAutoContain { autoContain = async ( details: IDetails, ): Promise => { - // Lets not break everyone's user experience ok? - let enabled = Config.get("auconenable") - if (enabled === "false") return { cancel: false } + // No autocontain directives, no nothing. + let aucons = Config.get("autocontain") + if (Object.keys(aucons).length === 0) return { cancel: false } // Do not handle private tabs or invalid tabIds. if (details.tabId === -1) return { cancel: false}