Skip to content

Commit a503ae1

Browse files
committed
Fix JSZip performance issue
The fixed file is from `dist/jszip.js` from Stuk/jszip#716.
1 parent eb7fc76 commit a503ae1

File tree

5 files changed

+11365
-16
lines changed

5 files changed

+11365
-16
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ Alternative sidebar UI:
186186
**Note:** The following JavaScript libraries are bundled in this software:
187187

188188
- [Epub.js](https://github.com/futurepress/epub.js/), which is licensed under [FreeBSD](https://github.com/futurepress/epub.js/blob/master/license). The included file is patched with various fixes and enhancements (see the [repo for Foliate's Epub.js fork](https://github.com/johnfactotum/epub.js) for details).
189-
- The minified version of [JSZip](https://stuk.github.io/jszip/), which is dual-licensed. You may use it under the MIT license or the GPLv3 license. See [LICENSE.markdown](https://github.com/Stuk/jszip/blob/master/LICENSE.markdown)
189+
- A [patched](https://github.com/Stuk/jszip/pull/716) version of [JSZip](https://stuk.github.io/jszip/), which is dual-licensed. You may use it under the MIT license or the GPLv3 license. See [LICENSE.markdown](https://github.com/Stuk/jszip/blob/master/LICENSE.markdown)
190190
- [libarchivejs](https://github.com/nika-begiashvili/libarchivejs), which is MIT licensed. It is a WASM port of the popular [libarchive](https://github.com/libarchive/libarchive) C library.
191191
- [crypto-js](https://github.com/brix/crypto-js), which is MIT licensed. The MD5 module is used to generate identifiers for files that don't have unique identifiers.
192192

src/com.github.johnfactotum.Foliate.data.gresource.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
I don't really like `web` but I couldn't think of anything better
4646
(PRs welcome)
4747
-->
48-
<file>web/jszip.min.js</file>
48+
<file>web/jszip.js</file>
4949
<file>web/epub.js</file>
5050
<file>web/crypto-js/core.js</file>
5151
<file>web/crypto-js/enc-latin1.js</file>

src/epubView.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ var EpubView = GObject.registerClass({
596596
this._webView.run_javascript_from_gresource(resource, null, () => resolve()))
597597

598598
const loadScripts = async () => {
599-
await runResource('/com/github/johnfactotum/Foliate/web/jszip.min.js')
599+
await runResource('/com/github/johnfactotum/Foliate/web/jszip.js')
600600
await runResource('/com/github/johnfactotum/Foliate/web/epub.js')
601601
await runResource('/com/github/johnfactotum/Foliate/web/crypto-js/core.js')
602602
await runResource('/com/github/johnfactotum/Foliate/web/crypto-js/enc-latin1.js')

0 commit comments

Comments
 (0)