Skip to content
Snippets Groups Projects
Commit c615bf23 authored by RANWEZ Pierre's avatar RANWEZ Pierre :anchor:
Browse files

:bug: bug: sync instead of local

parent fd10a04b
Branches
Tags
1 merge request!1✨ feat: CSSLSD V2
......@@ -481,10 +481,10 @@ function audioEvent() {
}
function pureCss() {
chrome.storage.local.get(['all', 'activate'], function (result) {
if (result.all.length > 0 && activate) {
chrome.storage.local.get(['all'], function (result) {
if (result.all.length > 0) {
const elements = document.getElementsByClassName('CSSLSD');
while(elements.length > 0){
while (elements.length > 0) {
elements[0].parentNode.removeChild(elements[0]);
}
result.all.forEach(element => {
......@@ -518,7 +518,11 @@ function onMessage({ type, data }) {
console.info('Message received from CSSLSD back :', type, data);
switch (type) {
case 'update': {
pureCss();
chrome.storage.sync.get(['activate'], function (result) {
if (result.activate) {
pureCss();
}
});
break;
}
case 'start': {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment