Moved clear all data below into danger zone + Confirm message
This commit is contained in:
parent
5923439441
commit
f9d0c9c356
13
index.html
13
index.html
@ -64,7 +64,18 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3>DANGER ZONE</h3>
|
<h3>DANGER ZONE</h3>
|
||||||
<a onclick="localStorage.clear();" class="clr-btn">Reset All Local Data</a>
|
<a onclick="openClrModal();" class="clr-btn">Reset All Local Data</a>
|
||||||
|
|
||||||
|
<div id="clr-data-model" class="modal">
|
||||||
|
<div class="modal-content">
|
||||||
|
<h2>DANGER ZONE</h2>
|
||||||
|
<p>Are you sure you want to clear all your local data</p>
|
||||||
|
<button onclick="localStorage.clear(); location.reload();">Yes</button>
|
||||||
|
<button class="cancel-btn" onclick="closeClrModal()">Cancel</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<script src="js/mobilecheck.js"></script>
|
<script src="js/mobilecheck.js"></script>
|
||||||
<script src="js/searchbar.js"></script>
|
<script src="js/searchbar.js"></script>
|
||||||
|
10
js/popup.js
10
js/popup.js
@ -32,3 +32,13 @@ function copyLink() {
|
|||||||
alert("Failed to copy the link.");
|
alert("Failed to copy the link.");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clr data
|
||||||
|
|
||||||
|
function openClrModal() {
|
||||||
|
document.getElementById('clr-data-model').style.display = 'flex';
|
||||||
|
}
|
||||||
|
|
||||||
|
function closeClrModal() {
|
||||||
|
document.getElementById('clr-data-model').style.display = 'none';
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user