diff --git a/background/style-manager.js b/background/style-manager.js index be66b535..b8243d03 100644 --- a/background/style-manager.js +++ b/background/style-manager.js @@ -283,7 +283,7 @@ const styleMan = (() => { async toggle(id, enabled) { if (ready.then) await ready; const style = Object.assign({}, id2style(id), {enabled}); - await saveStyle(style, {reason: 'toggle', codeIsUpdated: false}); + await saveStyle(style, {reason: 'toggle'}); return id; }, @@ -302,7 +302,7 @@ const styleMan = (() => { if (ready.then) await ready; const style = Object.assign({}, id2style(id)); style[prop] = value; - return saveStyle(style, {reason: 'config', codeIsUpdated: false}); + return saveStyle(style, {reason: 'config'}); }, }; @@ -396,7 +396,7 @@ const styleMan = (() => { return saveStyle(style, {reason: 'config'}); } - function broadcastStyleUpdated(style, reason, method = 'styleUpdated', codeIsUpdated = true) { + function broadcastStyleUpdated(style, reason, method = 'styleUpdated') { const {id} = style; const data = id2data(id); const excluded = new Set(); @@ -419,7 +419,6 @@ const styleMan = (() => { return msg.broadcast({ method, reason, - codeIsUpdated, style: { id, md5Url: style.md5Url, @@ -459,7 +458,7 @@ const styleMan = (() => { return handleSave(style, handlingOptions); } - function handleSave(style, {reason, codeIsUpdated, broadcast = true}) { + function handleSave(style, {reason, broadcast = true}) { const data = id2data(style.id); const method = data ? 'styleUpdated' : 'styleAdded'; if (!data) { @@ -467,7 +466,7 @@ const styleMan = (() => { } else { data.style = style; } - if (broadcast) broadcastStyleUpdated(style, reason, method, codeIsUpdated); + if (broadcast) broadcastStyleUpdated(style, reason, method); return style; }