mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
unvendor: Replace localforage
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
import Fuse from 'fuse.js';
|
||||
import DOMPurify from 'dompurify';
|
||||
import hljs from 'highlight.js';
|
||||
import localforage from 'localforage';
|
||||
|
||||
/**
|
||||
* Expose the libraries to the 'window' object.
|
||||
@ -27,16 +28,22 @@ export function initLibraryShims() {
|
||||
// @ts-ignore
|
||||
window.hljs = hljs;
|
||||
}
|
||||
if (!('localforage' in window)) {
|
||||
// @ts-ignore
|
||||
window.localforage = localforage;
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
Fuse,
|
||||
DOMPurify,
|
||||
hljs,
|
||||
localforage,
|
||||
};
|
||||
|
||||
export {
|
||||
Fuse,
|
||||
DOMPurify,
|
||||
hljs,
|
||||
localforage,
|
||||
};
|
||||
|
Reference in New Issue
Block a user