From d85335a9da9df0d594869347ec36f3b3398e8459 Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Tue, 14 Nov 2023 16:53:45 +0100 Subject: [PATCH] cache external link titles in local storage --- main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.js b/main.js index 6d20866..40a8073 100644 --- a/main.js +++ b/main.js @@ -829,6 +829,7 @@ function showlinkdialog(link) { a.innerHTML = res.title; titlemap[link] = res.title; + localStorage.setItem("titlemap", JSON.stringify(titlemap)); } }); } @@ -1401,6 +1402,7 @@ function init() if (settings.sync) { + titlemap = JSON.parse(localStorage.getItem("titlemap")) || {}; if (localStorage.getItem("pgpkeys") && localStorage.getItem("pgpkeys").startsWith("-----BEGIN PGP PUBLIC KEY BLOCK-----")) { queryremote({action: "fetch"})