unvendor: Replace SVGInject

This commit is contained in:
Cohee
2024-10-17 01:39:15 +03:00
parent 2725bae275
commit 8b8f2f1144
8 changed files with 17 additions and 701 deletions

View File

@ -14,6 +14,7 @@ import ePub from 'epubjs';
import * as pdfjsLib from 'pdfjs-dist/webpack.mjs';
import DiffMatchPatch from 'diff-match-patch';
import { isProbablyReaderable, Readability } from '@mozilla/readability';
import SVGInject from '@iconfu/svg-inject';
/**
* Expose the libraries to the 'window' object.
@ -48,6 +49,10 @@ export function initLibraryShims() {
// @ts-ignore
window.diff_match_patch = DiffMatchPatch;
}
if (!('SVGInject' in window)) {
// @ts-ignore
window.SVGInject = SVGInject;
}
}
export default {
@ -64,6 +69,7 @@ export default {
DiffMatchPatch,
Readability,
isProbablyReaderable,
SVGInject,
};
export {
@ -80,4 +86,5 @@ export {
DiffMatchPatch,
Readability,
isProbablyReaderable,
SVGInject,
};