mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-30 05:19:57 +00:00
Seperate clear cookie and disable actions in Browser Storage Plugin (#8602)
Added two messages: * `tm-delete-browser-storage` for deleting the cookie saved by the Browser Storage plugin * `tm-disable-browser-storage` for disabling Browser Storage
This commit is contained in:
parent
c7ca8359ab
commit
3355907581
@ -54,6 +54,13 @@ exports.startup = function() {
|
||||
$tw.wiki.addTiddler({title: ENABLED_TITLE, text: "no"});
|
||||
$tw.browserStorage.clearLocalStorage();
|
||||
});
|
||||
// Seperate clear cookie and disable action
|
||||
$tw.rootWidget.addEventListener("tm-delete-browser-storage",function(event) {
|
||||
$tw.browserStorage.clearLocalStorage();
|
||||
});
|
||||
$tw.rootWidget.addEventListener("tm-disable-browser-storage",function(event) {
|
||||
$tw.wiki.addTiddler({title: ENABLED_TITLE, text: "no"});
|
||||
});
|
||||
// Helpers for protecting storage from eviction
|
||||
var setPersistedState = function(state) {
|
||||
$tw.wiki.addTiddler({title: PERSISTED_STATE_TITLE, text: state});
|
||||
|
Loading…
Reference in New Issue
Block a user