Releases: AlttiRi/i-have-been-here
Releases · AlttiRi/i-have-been-here
1.41.0.20241101
Full Changelog: 1.40.2.20241101...1.41.0.20241101
1.37.0.20241101
Full Changelog: 1.20.2.20240707...1.37.0.20241101
1.20.2.20240707
Full Changelog: 1.15.0...1.20.2.20240707
Console snippets
// full export
chrome.storage.local.get(o => {
const text = JSON.stringify(o, null, 2);
// @ts-ignore
downloadBlob(new Blob([text]), `[ihbh] full export ${Date.now()}.json`);
// @ts-ignore
function downloadBlob(blob, name, url) {
const anchor = document.createElement("a");
anchor.setAttribute("download", name || "");
const blobUrl = URL.createObjectURL(blob);
anchor.href = blobUrl + (url ? ("#" + url) : "");
anchor.click();
setTimeout(() => URL.revokeObjectURL(blobUrl), 1000);
}
});
// to wipe storage (before full import)
chrome.storage.local.get(null, obj => {
Object.keys(obj).forEach(key => {
chrome.storage.local.remove(key);
});
});
// to import the full export
const input = document.createElement("input");
input.type = "file";
input.accept = "application/json";
document.body.prepend(input);
input.addEventListener("change", async event => {
// @ts-ignore
const json = JSON.parse(await input.files[0].text());
if (!("version" in json)) {
json.version = 1;
}
console.log("json", json);
// @ts-ignore
globalThis.json = json;
chrome.storage.local.set(json, () => {
chrome.runtime.reload();
});
});
1.15.0.20240506
Total rewriting.
Full Changelog: 1.6.6...1.15.0
Console snippets
// full export
chrome.storage.local.get(o => {
const text = JSON.stringify(o, null, 2);
// @ts-ignore
downloadBlob(new Blob([text]), `[ihbh] full export ${Date.now()}.json`);
// @ts-ignore
function downloadBlob(blob, name, url) {
const anchor = document.createElement("a");
anchor.setAttribute("download", name || "");
const blobUrl = URL.createObjectURL(blob);
anchor.href = blobUrl + (url ? ("#" + url) : "");
anchor.click();
setTimeout(() => URL.revokeObjectURL(blobUrl), 1000);
}
});
// to wipe storage (before full import)
chrome.storage.local.get(null, obj => {
Object.keys(obj).forEach(key => {
chrome.storage.local.remove(key);
});
});
// to import the full export
const input = document.createElement("input");
input.type = "file";
input.accept = "application/json";
document.body.prepend(input);
input.addEventListener("change", async event => {
// @ts-ignore
const json = JSON.parse(await input.files[0].text());
if (!("version" in json)) {
json.version = 1;
}
console.log("json", json);
// @ts-ignore
globalThis.json = json;
chrome.storage.local.set(json, () => {
chrome.runtime.reload();
});
});