mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
This commit is contained in:
parent
b376bf938c
commit
9044438108
1 changed files with 7 additions and 2 deletions
|
|
@ -13,6 +13,8 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import {setStorageVal} from "../../protyle/util/compatibility";
|
||||||
|
|
||||||
const DEFAULT_VIEW_HISTORY_CACHE_SIZE = 20;
|
const DEFAULT_VIEW_HISTORY_CACHE_SIZE = 20;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -62,14 +64,17 @@ class ViewHistory {
|
||||||
sessionStorage.setItem("pdfjs.history", databaseStr);
|
sessionStorage.setItem("pdfjs.history", databaseStr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
localStorage.setItem("pdfjs.history", databaseStr);
|
// NOTE
|
||||||
|
window.siyuan.storage["pdfjs.history"] = databaseStr
|
||||||
|
setStorageVal("pdfjs.history", databaseStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
async _readFromStorage() {
|
async _readFromStorage() {
|
||||||
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
|
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
|
||||||
return sessionStorage.getItem("pdfjs.history");
|
return sessionStorage.getItem("pdfjs.history");
|
||||||
}
|
}
|
||||||
return localStorage.getItem("pdfjs.history");
|
// NOTE
|
||||||
|
return window.siyuan.storage["pdfjs.history"];
|
||||||
}
|
}
|
||||||
|
|
||||||
async set(name, val) {
|
async set(name, val) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue