Skip to content

Commit

Permalink
Add debug option to options page
Browse files Browse the repository at this point in the history
  • Loading branch information
svnhub committed Jun 28, 2022
1 parent 25f8fa4 commit c007f24
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions Extension/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ <h2>License</h2><br />
<ul class="flags">
<!-- debugflags -->
</ul>
<button id="clearDebugFlags">Clear Debug flags</button>
</div>
</div>
</body>
Expand Down
12 changes: 12 additions & 0 deletions Extension/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@ GDPRConfig.getDebugFlags().then((debugFlags) => {
optionLi.classList.add("active");
}
});
document.getElementById("clearDebugFlags").addEventListener("click", async ()=>{
console.log("Nuking values");
chrome.storage.sync.remove("debugFlags", ()=>{
chrome.storage.sync.set({
debugFlags: {ost:true}
});
setTimeout(async ()=>{
let values = await GDPRConfig.getDebugValues();
console.log("Debug flags are now", values);
}, 2000);
});
});
});

function uuidv4() {
Expand Down

0 comments on commit c007f24

Please sign in to comment.