Skip to content

Commit

Permalink
Fix JSZip performance issue
Browse files Browse the repository at this point in the history
The fixed file is from `dist/jszip.js` from
Stuk/jszip#716.
  • Loading branch information
johnfactotum committed Apr 1, 2021
1 parent eb7fc76 commit a503ae1
Show file tree
Hide file tree
Showing 5 changed files with 11,365 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -186,7 +186,7 @@ Alternative sidebar UI:
**Note:** The following JavaScript libraries are bundled in this software:

- [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).
- 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)
- 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)
- [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.
- [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.

Expand Down
2 changes: 1 addition & 1 deletion src/com.github.johnfactotum.Foliate.data.gresource.xml
Expand Up @@ -45,7 +45,7 @@
I don't really like `web` but I couldn't think of anything better
(PRs welcome)
-->
<file>web/jszip.min.js</file>
<file>web/jszip.js</file>
<file>web/epub.js</file>
<file>web/crypto-js/core.js</file>
<file>web/crypto-js/enc-latin1.js</file>
Expand Down
2 changes: 1 addition & 1 deletion src/epubView.js
Expand Up @@ -596,7 +596,7 @@ var EpubView = GObject.registerClass({
this._webView.run_javascript_from_gresource(resource, null, () => resolve()))

const loadScripts = async () => {
await runResource('/com/github/johnfactotum/Foliate/web/jszip.min.js')
await runResource('/com/github/johnfactotum/Foliate/web/jszip.js')
await runResource('/com/github/johnfactotum/Foliate/web/epub.js')
await runResource('/com/github/johnfactotum/Foliate/web/crypto-js/core.js')
await runResource('/com/github/johnfactotum/Foliate/web/crypto-js/enc-latin1.js')
Expand Down

0 comments on commit a503ae1

Please sign in to comment.