diff --git a/background/style-manager.js b/background/style-manager.js index 7031d5b8..fb5b1f00 100644 --- a/background/style-manager.js +++ b/background/style-manager.js @@ -14,8 +14,24 @@ to cleanup the temporary code. See /edit/live-preview.js. */ const styleManager = (() => { const preparing = prepare(); + + /* styleId => { + data: styleData, + preview: styleData, + appliesTo: Set + } */ const styles = new Map(); + + /* url => { + maybeMatch: Set, + sections: Object { + id: styleId, + enabled: Boolean, + code: String + }> + } */ const cachedStyleForUrl = createCache(); + const BAD_MATCHER = {test: () => false}; const compileRe = createCompiler(text => `^(${text})$`); const compileSloppyRe = createCompiler(text => `^${text}$`);