├── web └── crx │ ├── lib │ └── Stuk-jszip-9fb481a │ │ ├── .jshintignore │ │ ├── test │ │ ├── ref │ │ │ ├── empty.zip │ │ │ ├── all.zip │ │ │ ├── image.zip │ │ │ ├── store.zip │ │ │ ├── text.zip │ │ │ ├── utf8.zip │ │ │ ├── zip64.zip │ │ │ ├── all.7zip.zip │ │ │ ├── deflate.zip │ │ │ ├── folder.zip │ │ │ ├── nested.zip │ │ │ ├── all-stream.zip │ │ │ ├── backslash.zip │ │ │ ├── encrypted.zip │ │ │ ├── subfolder.zip │ │ │ ├── all.windows.zip │ │ │ ├── invalid │ │ │ │ ├── crc32.zip │ │ │ │ ├── bad_offset.zip │ │ │ │ ├── compression.zip │ │ │ │ └── bad_decompressed_size.zip │ │ │ ├── nested_zip64.zip │ │ │ ├── pile_of_poo.zip │ │ │ ├── store-stream.zip │ │ │ ├── utf8_in_name.zip │ │ │ ├── archive_comment.zip │ │ │ ├── data_descriptor.zip │ │ │ ├── deflate-stream.zip │ │ │ ├── all_appended_bytes.zip │ │ │ ├── all_missing_bytes.zip │ │ │ ├── extra_attributes.zip │ │ │ ├── slashes_and_izarc.zip │ │ │ ├── all_prepended_bytes.zip │ │ │ ├── permissions │ │ │ │ ├── linux_7z.zip │ │ │ │ ├── linux_ark.zip │ │ │ │ ├── linux_zip.zip │ │ │ │ ├── mac_finder.zip │ │ │ │ ├── windows_7z.zip │ │ │ │ ├── windows_izarc.zip │ │ │ │ ├── windows_winrar.zip │ │ │ │ ├── linux_file_roller-ubuntu.zip │ │ │ │ ├── linux_file_roller-xubuntu.zip │ │ │ │ └── windows_compressed_folders.zip │ │ │ ├── winrar_utf8_in_name.zip │ │ │ ├── zip64_appended_bytes.zip │ │ │ ├── zip64_missing_bytes.zip │ │ │ ├── local_encoding_in_name.zip │ │ │ ├── nested_data_descriptor.zip │ │ │ ├── zip64_prepended_bytes.zip │ │ │ └── complex_files │ │ │ │ ├── AntarcticaTemps.ods │ │ │ │ ├── AntarcticaTemps.xlsx │ │ │ │ ├── Outlook2007_Calendar.xps │ │ │ │ └── Franz Kafka - The Metamorphosis.epub │ │ ├── smile.gif │ │ ├── helpers │ │ │ ├── browser-test-utils.js │ │ │ └── node-test-utils.js │ │ ├── asserts │ │ │ ├── version.js │ │ │ ├── constructor.js │ │ │ ├── deprecated.js │ │ │ ├── foreach.js │ │ │ ├── filter.js │ │ │ ├── external.js │ │ │ └── delete.js │ │ └── index.html │ │ ├── .gitignore │ │ ├── documentation │ │ ├── examples │ │ │ ├── get-binary-files-ajax.inc │ │ │ │ ├── fetch_api.html │ │ │ │ ├── jszip_utils.html │ │ │ │ ├── fetch_api.js │ │ │ │ └── jszip_utils.js │ │ │ ├── download-zip-file.inc │ │ │ │ ├── data_uri.html │ │ │ │ ├── blob.html │ │ │ │ ├── data_uri.js │ │ │ │ └── blob.js │ │ │ ├── read-local-file-api.inc │ │ │ │ ├── read.html │ │ │ │ └── read.js │ │ │ ├── downloader.inc │ │ │ │ ├── helpers.js │ │ │ │ ├── downloader.html │ │ │ │ └── downloader.js │ │ │ ├── read-local-file-api.html │ │ │ ├── downloader.html │ │ │ ├── download-zip-file.html │ │ │ └── get-binary-files-ajax.html │ │ ├── api_jszip │ │ │ ├── version.md │ │ │ ├── constructor.md │ │ │ ├── load_async_object.md │ │ │ ├── remove.md │ │ │ ├── external.md │ │ │ ├── support.md │ │ │ ├── folder_name.md │ │ │ ├── folder_regex.md │ │ │ ├── generate_internal_stream.md │ │ │ ├── filter.md │ │ │ ├── for_each.md │ │ │ ├── file_regex.md │ │ │ ├── generate_node_stream.md │ │ │ ├── file_name.md │ │ │ └── load_async.md │ │ ├── api_streamhelper │ │ │ ├── resume.md │ │ │ ├── pause.md │ │ │ ├── accumulate.md │ │ │ └── on.md │ │ ├── api_streamhelper.md │ │ ├── api_jszip.md │ │ ├── api_zipobject │ │ │ ├── internal_stream.md │ │ │ ├── node_stream.md │ │ │ └── async.md │ │ ├── css │ │ │ ├── main.css │ │ │ └── pygments.css │ │ ├── api_zipobject.md │ │ ├── faq.md │ │ ├── contributing.md │ │ ├── examples.md │ │ ├── howto │ │ │ ├── write_zip.md │ │ │ └── read_zip.md │ │ ├── limitations.md │ │ └── upgrade_guide.md │ │ ├── .npmignore │ │ ├── .editorconfig │ │ ├── .codeclimate.yml │ │ ├── lib │ │ ├── signature.js │ │ ├── defaults.js │ │ ├── compressions.js │ │ ├── license_header.js │ │ ├── readable-stream-browser.js │ │ ├── external.js │ │ ├── reader │ │ │ ├── NodeBufferReader.js │ │ │ ├── Uint8ArrayReader.js │ │ │ ├── readerFor.js │ │ │ ├── StringReader.js │ │ │ ├── ArrayReader.js │ │ │ └── DataReader.js │ │ ├── stream │ │ │ ├── Crc32Probe.js │ │ │ ├── ConvertWorker.js │ │ │ ├── DataLengthProbe.js │ │ │ └── DataWorker.js │ │ ├── support.js │ │ ├── nodejs │ │ │ ├── NodejsStreamOutputAdapter.js │ │ │ └── NodejsStreamInputAdapter.js │ │ ├── index.js │ │ ├── nodejsUtils.js │ │ ├── generate │ │ │ └── index.js │ │ ├── crc32.js │ │ ├── flate.js │ │ ├── load.js │ │ ├── compressedObject.js │ │ ├── base64.js │ │ └── zipObject.js │ │ ├── component.json │ │ ├── .jshintrc │ │ ├── _config.yml │ │ ├── bower.json │ │ ├── docs │ │ ├── references.txt │ │ └── ZIP spec.txt │ │ ├── .travis.yml │ │ ├── README.markdown │ │ ├── package.json │ │ ├── index.html │ │ ├── package-lock.json │ │ └── Gruntfile.js │ ├── icon.png │ ├── icon.xcf │ ├── icon128.png │ ├── icon16.png │ ├── icon48.png │ ├── scrshot.png │ ├── scrshot2.png │ ├── scrshot3.png │ ├── scrshot4.png │ ├── popup.html │ ├── inject_editor.js │ ├── manifest.json │ └── README.md ├── LICENSE ├── README.md ├── sb2-tool └── README.md └── blocks.md /web/crx/lib/Stuk-jszip-9fb481a/.jshintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/empty.zip: -------------------------------------------------------------------------------- 1 | PK -------------------------------------------------------------------------------- /web/crx/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/icon.png -------------------------------------------------------------------------------- /web/crx/icon.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/icon.xcf -------------------------------------------------------------------------------- /web/crx/icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/icon128.png -------------------------------------------------------------------------------- /web/crx/icon16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/icon16.png -------------------------------------------------------------------------------- /web/crx/icon48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/icon48.png -------------------------------------------------------------------------------- /web/crx/scrshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/scrshot.png -------------------------------------------------------------------------------- /web/crx/scrshot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/scrshot2.png -------------------------------------------------------------------------------- /web/crx/scrshot3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/scrshot3.png -------------------------------------------------------------------------------- /web/crx/scrshot4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/scrshot4.png -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | node_modules 3 | sauce_connect.log 4 | .c9revisions -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/documentation/examples/get-binary-files-ajax.inc/fetch_api.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/documentation/examples/get-binary-files-ajax.inc/jszip_utils.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/all.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/all.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/smile.gif -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/image.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/image.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/store.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/store.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/text.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/text.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/utf8.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/utf8.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/zip64.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/zip64.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/all.7zip.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/all.7zip.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/deflate.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/deflate.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/folder.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/folder.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/nested.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/nested.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/.npmignore: -------------------------------------------------------------------------------- 1 | _config.yml 2 | bower.json 3 | component.json 4 | docs 5 | documentation 6 | Gruntfile.js 7 | index.html 8 | test 9 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/all-stream.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/all-stream.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/backslash.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/backslash.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/encrypted.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/encrypted.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/subfolder.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/subfolder.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/all.windows.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/all.windows.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/invalid/crc32.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/invalid/crc32.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/nested_zip64.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/nested_zip64.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/pile_of_poo.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/pile_of_poo.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/store-stream.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/store-stream.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/utf8_in_name.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/utf8_in_name.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/archive_comment.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/archive_comment.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/data_descriptor.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/data_descriptor.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/deflate-stream.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/deflate-stream.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/all_appended_bytes.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/all_appended_bytes.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/all_missing_bytes.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/all_missing_bytes.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/extra_attributes.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/extra_attributes.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/invalid/bad_offset.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/invalid/bad_offset.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/slashes_and_izarc.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/slashes_and_izarc.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/all_prepended_bytes.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/all_prepended_bytes.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/invalid/compression.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/invalid/compression.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/permissions/linux_7z.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/permissions/linux_7z.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/winrar_utf8_in_name.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/winrar_utf8_in_name.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/zip64_appended_bytes.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/zip64_appended_bytes.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/zip64_missing_bytes.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/zip64_missing_bytes.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/local_encoding_in_name.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/local_encoding_in_name.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/nested_data_descriptor.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/nested_data_descriptor.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/permissions/linux_ark.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/permissions/linux_ark.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/permissions/linux_zip.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/permissions/linux_zip.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/permissions/mac_finder.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/permissions/mac_finder.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/permissions/windows_7z.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/permissions/windows_7z.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/zip64_prepended_bytes.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/zip64_prepended_bytes.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | charset = utf-8 7 | indent_style = space 8 | indent_size = 4 9 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/permissions/windows_izarc.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/permissions/windows_izarc.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/permissions/windows_winrar.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/permissions/windows_winrar.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/complex_files/AntarcticaTemps.ods: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/complex_files/AntarcticaTemps.ods -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/complex_files/AntarcticaTemps.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/complex_files/AntarcticaTemps.xlsx -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/invalid/bad_decompressed_size.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/invalid/bad_decompressed_size.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/complex_files/Outlook2007_Calendar.xps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/complex_files/Outlook2007_Calendar.xps -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/permissions/linux_file_roller-ubuntu.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/permissions/linux_file_roller-ubuntu.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/permissions/linux_file_roller-xubuntu.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/permissions/linux_file_roller-xubuntu.zip -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/permissions/windows_compressed_folders.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/permissions/windows_compressed_folders.zip -------------------------------------------------------------------------------- /web/crx/popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |Does not work in IE, has restrictions on the length.
2 | 3 | 4 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/ref/complex_files/Franz Kafka - The Metamorphosis.epub: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yos1up/scratch2cpp/HEAD/web/crx/lib/Stuk-jszip-9fb481a/test/ref/complex_files/Franz Kafka - The Metamorphosis.epub -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/documentation/examples/download-zip-file.inc/blob.html: -------------------------------------------------------------------------------- 1 |Works on firefox, chrome , opera >= 15 and IE >= 10 (but NOT in compatibility view).
2 | 3 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/helpers/browser-test-utils.js: -------------------------------------------------------------------------------- 1 | /* global JSZip,JSZipUtils,JSZipTestUtils */ 2 | 'use strict'; 3 | JSZipTestUtils.loadZipFile = function (name, callback) { 4 | JSZipUtils.getBinaryContent(name + "?_=" + ( new Date() ).getTime(), callback); 5 | }; 6 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/documentation/api_jszip/version.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "JSZip.version" 3 | layout: default 4 | section: api 5 | --- 6 | 7 | The version of JSZip as a string. 8 | 9 | __Since__: v3.1.0 10 | 11 | ## Example 12 | 13 | ```js 14 | JSZip.version == "3.1.0"; 15 | ``` 16 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/.codeclimate.yml: -------------------------------------------------------------------------------- 1 | --- 2 | engines: 3 | duplication: 4 | enabled: true 5 | config: 6 | languages: 7 | - javascript 8 | eslint: 9 | enabled: true 10 | fixme: 11 | enabled: true 12 | ratings: 13 | paths: 14 | - "lib/*.js" 15 | exclude_paths: 16 | - "dist/*" 17 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/lib/signature.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | exports.LOCAL_FILE_HEADER = "PK\x03\x04"; 3 | exports.CENTRAL_FILE_HEADER = "PK\x01\x02"; 4 | exports.CENTRAL_DIRECTORY_END = "PK\x05\x06"; 5 | exports.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x06\x07"; 6 | exports.ZIP64_CENTRAL_DIRECTORY_END = "PK\x06\x06"; 7 | exports.DATA_DESCRIPTOR = "PK\x07\x08"; 8 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/documentation/api_jszip/constructor.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "new JSZip() or JSZip()" 3 | layout: default 4 | section: api 5 | --- 6 | 7 | Create a new JSZip instance. 8 | 9 | __Returns__ : A new JSZip. 10 | 11 | __Since__: v1.0.0 12 | 13 | ## Example 14 | 15 | ```js 16 | var zip = new JSZip(); 17 | // same as 18 | var zip = JSZip(); 19 | ``` 20 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/lib/defaults.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | exports.base64 = false; 3 | exports.binary = false; 4 | exports.dir = false; 5 | exports.createFolders = true; 6 | exports.date = null; 7 | exports.compression = null; 8 | exports.compressionOptions = null; 9 | exports.comment = null; 10 | exports.unixPermissions = null; 11 | exports.dosPermissions = null; 12 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/test/asserts/version.js: -------------------------------------------------------------------------------- 1 | /* jshint qunit: true */ 2 | /* global JSZip,JSZipTestUtils */ 3 | 'use strict'; 4 | 5 | QUnit.module("version"); 6 | 7 | test("JSZip.version is correct", function(assert){ 8 | assert.ok(JSZip.version, "JSZip.version exists"); 9 | assert.ok(JSZip.version.match(/^\d+\.\d+\.\d+/), "JSZip.version looks like a correct version"); 10 | }); 11 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/documentation/examples/read-local-file-api.inc/read.html: -------------------------------------------------------------------------------- 1 |Note : your browser will process the zip file, don't choose a file too big !
3 |", { 15 | "class": "alert alert-success", 16 | text: "loaded, content = " + text 17 | })); 18 | }, function error(e) { 19 | $("#fetch").append($("
", { 20 | "class": "alert alert-danger", 21 | text: e 22 | })); 23 | }); 24 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/documentation/examples/get-binary-files-ajax.inc/jszip_utils.js: -------------------------------------------------------------------------------- 1 | // 1) get a promise of the content 2 | var promise = new JSZip.external.Promise(function (resolve, reject) { 3 | JSZipUtils.getBinaryContent('{{site.baseurl}}/test/ref/text.zip', function(err, data) { 4 | if (err) { 5 | reject(err); 6 | } else { 7 | resolve(data); 8 | } 9 | }); 10 | }); 11 | 12 | promise.then(JSZip.loadAsync) // 2) chain with the zip promise 13 | .then(function(zip) { 14 | return zip.file("Hello.txt").async("string"); // 3) chain with the text content promise 15 | }) 16 | .then(function success(text) { // 4) display the result 17 | $("#jszip_utils").append($("
", { 18 | "class": "alert alert-success", 19 | text: "loaded, content = " + text 20 | })); 21 | }, function error(e) { 22 | $("#jszip_utils").append($("
", { 23 | "class": "alert alert-danger", 24 | text: e 25 | })); 26 | }); 27 | 28 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/documentation/api_jszip/folder_regex.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "folder(regex)" 3 | layout: default 4 | section: api 5 | --- 6 | 7 | Search a subdirectory in the current directory with a 8 | [regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions). 9 | The regex is tested against the relative path. 10 | 11 | __Returns__ : An array of matching folders (an empty array if none matched). 12 | Each matching folder is an instance of [ZipObject]({{site.baseurl}}/documentation/api_zipobject.html). 13 | 14 | __Since__: v1.0.0 15 | 16 | ## Arguments 17 | 18 | name | type | description 19 | ------|--------|------------ 20 | regex | RegExp | the regex to use. 21 | 22 | ## Examples 23 | 24 | ```js 25 | var zip = new JSZip(); 26 | zip.folder("home/Pierre/videos"); 27 | zip.folder("home/Pierre/photos"); 28 | zip.folder("home/Jean/videos"); 29 | zip.folder("home/Jean/photos"); 30 | 31 | zip.folder(/videos/); // array of size 2 32 | 33 | zip.folder("home/Jean").folder(/^vid/); // array of 1 34 | ``` 35 | 36 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/lib/reader/readerFor.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('../utils'); 4 | var support = require('../support'); 5 | var ArrayReader = require('./ArrayReader'); 6 | var StringReader = require('./StringReader'); 7 | var NodeBufferReader = require('./NodeBufferReader'); 8 | var Uint8ArrayReader = require('./Uint8ArrayReader'); 9 | 10 | /** 11 | * Create a reader adapted to the data. 12 | * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data to read. 13 | * @return {DataReader} the data reader. 14 | */ 15 | module.exports = function (data) { 16 | var type = utils.getTypeOf(data); 17 | utils.checkSupport(type); 18 | if (type === "string" && !support.uint8array) { 19 | return new StringReader(data); 20 | } 21 | if (type === "nodebuffer") { 22 | return new NodeBufferReader(data); 23 | } 24 | if (support.uint8array) { 25 | return new Uint8ArrayReader(utils.transformTo("uint8array", data)); 26 | } 27 | return new ArrayReader(utils.transformTo("array", data)); 28 | }; 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Yuki Yoshida 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/documentation/examples/downloader.inc/helpers.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Reset the message. 3 | */ 4 | function resetMessage () { 5 | $("#result") 6 | .removeClass() 7 | .text(""); 8 | } 9 | /** 10 | * show a successful message. 11 | * @param {String} text the text to show. 12 | */ 13 | function showMessage(text) { 14 | resetMessage(); 15 | $("#result") 16 | .addClass("alert alert-success") 17 | .text(text); 18 | } 19 | /** 20 | * show an error message. 21 | * @param {String} text the text to show. 22 | */ 23 | function showError(text) { 24 | resetMessage(); 25 | $("#result") 26 | .addClass("alert alert-danger") 27 | .text(text); 28 | } 29 | /** 30 | * Update the progress bar. 31 | * @param {Integer} percent the current percent 32 | */ 33 | function updatePercent(percent) { 34 | $("#progress_bar").removeClass("hide") 35 | .find(".progress-bar") 36 | .attr("aria-valuenow", percent) 37 | .css({ 38 | width : percent + "%" 39 | }); 40 | } 41 | 42 | if(!JSZip.support.blob) { 43 | showError("This demo works only with a recent browser !"); 44 | return; 45 | } 46 | 47 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/README.markdown: -------------------------------------------------------------------------------- 1 | JSZip [](http://travis-ci.org/Stuk/jszip) [](https://codeclimate.com/github/Stuk/jszip) 2 | ===== 3 | 4 | [](https://saucelabs.com/u/jszip) 5 | 6 | A library for creating, reading and editing .zip files with JavaScript, with a 7 | lovely and simple API. 8 | 9 | See https://stuk.github.io/jszip for all the documentation. 10 | 11 | ```javascript 12 | var zip = new JSZip(); 13 | 14 | zip.file("Hello.txt", "Hello World\n"); 15 | 16 | var img = zip.folder("images"); 17 | img.file("smile.gif", imgData, {base64: true}); 18 | 19 | zip.generateAsync({type:"blob"}).then(function(content) { 20 | // see FileSaver.js 21 | saveAs(content, "example.zip"); 22 | }); 23 | 24 | /* 25 | Results in a zip containing 26 | Hello.txt 27 | images/ 28 | smile.gif 29 | */ 30 | ``` 31 | License 32 | ------- 33 | 34 | JSZip is dual-licensed. You may use it under the MIT license *or* the GPLv3 35 | license. See [LICENSE.markdown](LICENSE.markdown). 36 | -------------------------------------------------------------------------------- /web/crx/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Scratcher's AtCoder", 3 | "short_name": "ScratchersAC", 4 | "description" : "for Scratchers who want to compete in AtCoder", 5 | "version": "1.5.0", 6 | "manifest_version": 3, 7 | "homepage_url": "https://github.com/yos1up/scratch2cpp/tree/main/web/crx", 8 | "icons": { 9 | "16": "icon16.png", 10 | "48": "icon48.png", 11 | "128": "icon128.png" 12 | }, 13 | "action": { 14 | "default_popup": "popup.html", 15 | "default_icon": "icon.png" 16 | }, 17 | "content_security_policy": { 18 | "extension_pages": "default-src 'self'; script-src 'self'; object-src 'self'" 19 | }, 20 | "content_scripts": [ 21 | { 22 | "matches": ["https://atcoder.jp/contests/*/submit*", "https://atcoder.jp/contests/*/tasks/*", "https://atcoder.jp/contests/*/custom_test*"], 23 | "js": ["lib/Stuk-jszip-9fb481a/dist/jszip.js", "sb2_to_cpp.js", "sb3_to_cpp.js", "main.js"] 24 | } 25 | ], 26 | "web_accessible_resources": [ 27 | { 28 | "resources": ["inject_editor.js"], 29 | "matches": ["https://atcoder.jp/*"] 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/documentation/api_zipobject/node_stream.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "nodeStream(type[, onUpdate])" 3 | layout: default 4 | section: api 5 | --- 6 | 7 | Return a [nodejs Streams3](https://github.com/nodejs/readable-stream) 8 | of the content in the asked type. 9 | 10 | __Returns__ : a [nodejs Streams3](https://github.com/nodejs/readable-stream). 11 | 12 | ## Arguments 13 | 14 | name | type | default | description 15 | ---------|----------|--------------|------------ 16 | type | String | `nodebuffer` | only `nodebuffer` is currently supported. 17 | onUpdate | Function | | an optional function called on each internal update with the metadata. 18 | 19 | __Metadata__ : see [the metadata of `async()`]({{site.baseurl}}/documentation/api_zipobject/async.html#onupdate-callback). 20 | 21 | ## Example 22 | 23 | ```js 24 | zip 25 | .file("my_text.txt") 26 | .nodeStream() 27 | .pipe(fs.createWriteStream('/tmp/my_text.txt')) 28 | .on('finish', function () { 29 | // JSZip generates a readable stream with a "end" event, 30 | // but is piped here in a writable stream which emits a "finish" event. 31 | console.log("text file written."); 32 | }); 33 | ``` 34 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/documentation/api_streamhelper/accumulate.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "accumulate([updateCallback])" 3 | layout: default 4 | section: api 5 | --- 6 | 7 | Read the whole stream and call a callback with the complete content. 8 | 9 | __Returns__ : A [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) 10 | of the full content. 11 | 12 | __Since__: v3.0.0 13 | 14 | ## Arguments 15 | 16 | name | type | description 17 | ----------------|----------|------------ 18 | updateCallback | function | the function called every time the stream updates. This function is optional. 19 | 20 | 21 | The update callback function takes 1 parameter: the metadata (see the [`on` method]({{site.baseurl}}/documentation/api_streamhelper/on.html)). 22 | 23 | ## Example 24 | 25 | ```js 26 | zip 27 | .generateInternalStream({type:"uint8array"}) 28 | .accumulate(function updateCallback(metadata) { 29 | // metadata contains for example currentFile and percent, see the generateInternalStream doc. 30 | }).then(function (data) { 31 | // data contains here the complete zip file as a uint8array (the type asked in generateInternalStream) 32 | }); 33 | ``` 34 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/documentation/api_jszip/generate_internal_stream.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "generateInternalStream(options)" 3 | layout: default 4 | section: api 5 | --- 6 | 7 | Generates the complete zip file with the internal stream implementation. 8 | 9 | __Returns__ : a [StreamHelper]({{site.baseurl}}/documentation/api_streamhelper.html). 10 | 11 | __Since__: v3.0.0 12 | 13 | ## Arguments 14 | 15 | name | type | default | description 16 | --------------------|----------|---------|------------ 17 | options | object | | the options to generate the zip file, see [the options of `generateAsync()`]({{site.baseurl}}/documentation/api_jszip/generate_async.html) 18 | 19 | __Metadata__ : see [the metadata of `generateAsync()`]({{site.baseurl}}/documentation/api_jszip/generate_async.html#onupdate-callback). 20 | 21 | ## Examples 22 | 23 | ```js 24 | zip.generateInternalStream({type:"blob"}).accumulate(function callback(err, content) { 25 | if (err) { 26 | // handle error 27 | } 28 | // see FileSaver.js 29 | saveAs(content, "hello.zip"); 30 | }, function updateCallback(metadata) { 31 | // print progression with metadata.percent and metadata.currentFile 32 | }); 33 | ``` 34 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/lib/reader/StringReader.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var DataReader = require('./DataReader'); 3 | var utils = require('../utils'); 4 | 5 | function StringReader(data) { 6 | DataReader.call(this, data); 7 | } 8 | utils.inherits(StringReader, DataReader); 9 | /** 10 | * @see DataReader.byteAt 11 | */ 12 | StringReader.prototype.byteAt = function(i) { 13 | return this.data.charCodeAt(this.zero + i); 14 | }; 15 | /** 16 | * @see DataReader.lastIndexOfSignature 17 | */ 18 | StringReader.prototype.lastIndexOfSignature = function(sig) { 19 | return this.data.lastIndexOf(sig) - this.zero; 20 | }; 21 | /** 22 | * @see DataReader.readAndCheckSignature 23 | */ 24 | StringReader.prototype.readAndCheckSignature = function (sig) { 25 | var data = this.readData(4); 26 | return sig === data; 27 | }; 28 | /** 29 | * @see DataReader.readData 30 | */ 31 | StringReader.prototype.readData = function(size) { 32 | this.checkOffset(size); 33 | // this will work because the constructor applied the "& 0xff" mask. 34 | var result = this.data.slice(this.zero + this.index, this.zero + this.index + size); 35 | this.index += size; 36 | return result; 37 | }; 38 | module.exports = StringReader; 39 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | The description in English is provided [below Japanese one](#eng). 2 | 3 | # scratch2cpp 4 | 5 | **〜 Scratch でプログラミングコンテストに参加したい方へ 〜** 6 | 7 | ここには,以下の 2 つのものがあります: 8 | 9 | 1. AtCoder に Scratch 3.0 で参加できるようになる Chrome 拡張 `Scratcher's AtCoder` のソースコード. 10 | Scratch 3.0 プロジェクトファイル (.sb3) を C++ ソース (.cpp) に変換する 11 | JavaScript コードが含まれています. 12 | 13 | 2. Scratch 2.0 のコードを C++ コード (.cpp) に変換できる,コード変換ツール.(Python3 製です.) 14 | 15 | **1 については, [こちら](/web/crx/README.md)をご覧ください.** 16 | 17 | 2 については,[こちら](/sb2-tool/README.md)をご覧ください. 18 | 19 | --- 20 | 21 | 22 | 23 | # scratch2cpp 24 | 25 | **for Scratchers who want to participate in programming contests** 26 | 27 | There are two things here: 28 | 29 | 1. Codes of the Chrome extension `Scratcher's AtCoder`, with which you can participate in AtCoder with Scratch 3.0. 30 | It contains JavaScript code which converts Scratch 3.0 project file (.sb3) into C++ source code (.cpp). 31 | 32 | 2. Code converting tool which works offline. You can convert Scratch 2.0 project file (.sb2) into C++ source code (.cpp). (developed in Python3) 33 | 34 | **For 1, please see [this page](/web/crx/README.md).** 35 | 36 | For 2, please see [this page](/sb2-tool/README.md). 37 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/documentation/api_jszip/filter.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "filter(predicate)" 3 | layout: default 4 | section: api 5 | --- 6 | 7 | Filter nested files/folders with the specified function. 8 | 9 | __Returns__ : An array of matching ZipObject. 10 | 11 | __Since__: v1.0.0 12 | 13 | ## Arguments 14 | 15 | name | type | description 16 | ----------|----------|------------ 17 | predicate | function | the predicate to use. 18 | 19 | The predicate has the following signature : `function (relativePath, file) {...}` : 20 | 21 | name | type | description 22 | -------------|-----------|------------ 23 | relativePath | string | the filename and its path, relative to the current folder. 24 | file | ZipObject | the file being tested. See [ZipObject]({{site.baseurl}}/documentation/api_zipobject.html). 25 | 26 | The predicate must return true if the file should be included, false otherwise. 27 | 28 | 29 | ## Examples 30 | 31 | ```js 32 | var zip = new JSZip().folder("dir"); 33 | zip.file("readme.txt", "content"); 34 | zip.filter(function (relativePath, file){ 35 | // relativePath == "readme.txt" 36 | // file = {name:"dir/readme.txt",options:{...},async:function} 37 | return true/false; 38 | }); 39 | ``` 40 | 41 | 42 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/lib/support.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | exports.base64 = true; 4 | exports.array = true; 5 | exports.string = true; 6 | exports.arraybuffer = typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined"; 7 | exports.nodebuffer = typeof Buffer !== "undefined"; 8 | // contains true if JSZip can read/generate Uint8Array, false otherwise. 9 | exports.uint8array = typeof Uint8Array !== "undefined"; 10 | 11 | if (typeof ArrayBuffer === "undefined") { 12 | exports.blob = false; 13 | } 14 | else { 15 | var buffer = new ArrayBuffer(0); 16 | try { 17 | exports.blob = new Blob([buffer], { 18 | type: "application/zip" 19 | }).size === 0; 20 | } 21 | catch (e) { 22 | try { 23 | var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder; 24 | var builder = new Builder(); 25 | builder.append(buffer); 26 | exports.blob = builder.getBlob('application/zip').size === 0; 27 | } 28 | catch (e) { 29 | exports.blob = false; 30 | } 31 | } 32 | } 33 | 34 | try { 35 | exports.nodestream = !!require('readable-stream').Readable; 36 | } catch(e) { 37 | exports.nodestream = false; 38 | } 39 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/lib/nodejs/NodejsStreamOutputAdapter.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Readable = require('readable-stream').Readable; 4 | 5 | var utils = require('../utils'); 6 | utils.inherits(NodejsStreamOutputAdapter, Readable); 7 | 8 | /** 9 | * A nodejs stream using a worker as source. 10 | * @see the SourceWrapper in http://nodejs.org/api/stream.html 11 | * @constructor 12 | * @param {StreamHelper} helper the helper wrapping the worker 13 | * @param {Object} options the nodejs stream options 14 | * @param {Function} updateCb the update callback. 15 | */ 16 | function NodejsStreamOutputAdapter(helper, options, updateCb) { 17 | Readable.call(this, options); 18 | this._helper = helper; 19 | 20 | var self = this; 21 | helper.on("data", function (data, meta) { 22 | if (!self.push(data)) { 23 | self._helper.pause(); 24 | } 25 | if(updateCb) { 26 | updateCb(meta); 27 | } 28 | }) 29 | .on("error", function(e) { 30 | self.emit('error', e); 31 | }) 32 | .on("end", function () { 33 | self.push(null); 34 | }); 35 | } 36 | 37 | 38 | NodejsStreamOutputAdapter.prototype._read = function() { 39 | this._helper.resume(); 40 | }; 41 | 42 | module.exports = NodejsStreamOutputAdapter; 43 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/documentation/api_jszip/for_each.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "forEach(callback)" 3 | layout: default 4 | section: api 5 | --- 6 | 7 | Call a callback function for each entry at this folder level. 8 | 9 | __Returns__ : Nothing. 10 | 11 | __Since__: v3.0.0 12 | 13 | ## Arguments 14 | 15 | name | type | description 16 | ----------|----------|------------ 17 | callback | function | the callback to use. 18 | 19 | The callback has the following signature : `function (relativePath, file) {...}` : 20 | 21 | name | type | description 22 | -------------|-----------|------------ 23 | relativePath | string | the filename and its path, relative to the current folder. 24 | file | ZipObject | the current file. See [ZipObject]({{site.baseurl}}/documentation/api_zipobject.html). 25 | 26 | 27 | ## Examples 28 | 29 | ```js 30 | var zip = new JSZip(); 31 | zip.file("package.json", "..."); 32 | zip.file("lib/index.js", "..."); 33 | zip.file("test/index.html", "..."); 34 | zip.file("test/asserts/file.js", "..."); 35 | zip.file("test/asserts/generate.js", "..."); 36 | 37 | zip.folder("test").forEach(function (relativePath, file){ 38 | console.log("iterating over", relativePath); 39 | }); 40 | 41 | // will display: 42 | // iterating over index.html 43 | // iterating over asserts/ 44 | // iterating over asserts/file.js 45 | // iterating over asserts/generate.js 46 | ``` 47 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/documentation/api_jszip/file_regex.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "file(regex)" 3 | layout: default 4 | section: api 5 | --- 6 | 7 | Search a file in the current folder and subfolders with a 8 | [regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions). 9 | The regex is tested against the relative filename. 10 | 11 | __Returns__ : An array of matching files (an empty array if none matched). Each 12 | matching file is an instance of [ZipObject]({{site.baseurl}}/documentation/api_zipobject.html). 13 | 14 | __Since__: v1.0.0 15 | 16 | ## Arguments 17 | 18 | name | type | description 19 | ------|--------|------------ 20 | regex | RegExp | the regex to use. 21 | 22 | ## Example 23 | 24 | ```js 25 | var zip = new JSZip(); 26 | zip.file("file1.txt", "content"); 27 | zip.file("file2.txt", "content"); 28 | 29 | zip.file(/file/); // array of size 2 30 | 31 | // example with a relative path : 32 | var folder = zip.folder("sub"); 33 | folder 34 | .file("file3.txt", "content") // relative path from folder : file3.txt 35 | .file("file4.txt", "content"); // relative path from folder : file4.txt 36 | 37 | folder.file(/file/); // array of size 2 38 | folder.file(/^file/); // array of size 2, the relative paths start with file 39 | 40 | // arrays contain objects in the form: 41 | // {name: "file2.txt", dir: false, async : function () {...}, ...} 42 | ``` 43 | 44 | 45 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/documentation/api_jszip/generate_node_stream.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "generateNodeStream(options[, onUpdate])" 3 | layout: default 4 | section: api 5 | --- 6 | 7 | Generates the complete zip file as a nodejs stream. 8 | 9 | __Returns__ : a [nodejs Streams3](https://github.com/nodejs/readable-stream). 10 | 11 | __Since__: v3.0.0 12 | 13 | ## Arguments 14 | 15 | name | type | default | description 16 | --------------------|----------|---------|------------ 17 | options | object | | the options to generate the zip file, see [the options of `generateAsync()`]({{site.baseurl}}/documentation/api_jszip/generate_async.html) 18 | onUpdate | function | | The optional function called on each internal update with the metadata. 19 | 20 | The `type` parameter has here the default value of `nodebuffer`. 21 | Only `nodebuffer` is currently supported. 22 | 23 | __Metadata__ : see [the metadata of `generateAsync()`]({{site.baseurl}}/documentation/api_jszip/generate_async.html#onupdate-callback). 24 | 25 | ## Examples 26 | 27 | ```js 28 | zip 29 | .generateNodeStream({streamFiles:true}) 30 | .pipe(fs.createWriteStream('out.zip')) 31 | .on('finish', function () { 32 | // JSZip generates a readable stream with a "end" event, 33 | // but is piped here in a writable stream which emits a "finish" event. 34 | console.log("out.zip written."); 35 | }); 36 | ``` 37 | -------------------------------------------------------------------------------- /web/crx/lib/Stuk-jszip-9fb481a/documentation/examples/downloader.inc/downloader.html: -------------------------------------------------------------------------------- 1 |

8 | This mini application let you choose the files you want in a list, download 9 | them, zip them and give the result to the user. 10 |
11 |12 | This demo requires a recent browser, see 13 | the howto. 14 |
15 |16 | This demo depends on the following libraries: 17 |
16 | Current version : v3.1.5 17 |
18 |19 | License : JSZip is dual-licensed. You may use it under the 20 | MIT license or the GPLv3 license. See 21 | LICENSE.markdown. 22 |
23 |
79 | With npm : npm install jszip
80 |
82 | With bower : bower install Stuk/jszip
83 |
85 | With component : component install Stuk/jszip
86 |
88 | Manually : download JSZip
89 | and include the file dist/jszip.js or dist/jszip.min.js
90 |
93 | Installed ? Great ! You can now check our 94 | guides and examples ! 95 |
96 || Opera | 104 |Firefox | 105 |Safari | 106 |Chrome | 107 |Internet Explorer | 108 |Node.js | 109 |
|---|---|---|---|---|---|
| Yes | 112 |Yes | 113 |Yes | 114 |Yes | 115 |Yes | 116 |Yes | 117 |
| Tested with the latest version | 120 |Tested with 3.0 / 3.6 / latest version | 121 |Tested with the latest version | 122 |Tested with the latest version | 123 |Tested with IE 6 / 7 / 8 / 9 / 10 | 124 |Tested with node.js 0.10 / latest version | 125 |
131 | Having trouble ? We'd like to help ! 132 |
133 |DEFLATE supported)
42 | * zip with data descriptor
43 | * ZIP64
44 | * UTF8 in file name, UTF8 in file content
45 |
46 | Zip features not (yet) supported :
47 |
48 | * password protected zip
49 | * multi-volume zip
50 |
51 | ### `base64` option
52 |
53 | ```js
54 | var zip = new JSZip();
55 | zip.loadAsync("UEsDBAoDAAAAAJxs8T...AAAAAA==", {base64: true});
56 | ```
57 |
58 | ### `checkCRC32` option
59 |
60 | The `checkCRC32` option will load every files, compute the CRC32 value and
61 | compare it against the saved value.
62 | With larger zip files, this option can have a significant performance cost.
63 |
64 | ```js
65 | // here, "bin" is a corrupted zip file
66 |
67 | zip.loadAsync(bin)
68 | .then(function (zip) {
69 | // will be called, even if content is corrupted
70 | }, function (e) {
71 | // won't be called
72 | });
73 |
74 | zip.loadAsync(bin, {
75 | checkCRC32: true
76 | })
77 | .then(function (zip) {
78 | // won't be called
79 | }, function (e) {
80 | // Error: Corrupted zip : CRC32 mismatch
81 | });
82 | ```
83 |
84 | ### `createFolders` option
85 |
86 | ```js
87 | // here, "bin" is zip file containing:
88 | // folder1/folder2/folder3/file1.txt
89 |
90 | zip.loadAsync(bin)
91 | .then(function (zip) {
92 | console.log(zip.files);
93 | // folder1/folder2/folder3/file1.txt
94 | });
95 |
96 | // with createFolders: true, all folders will be created
97 | zip.loadAsync(bin, {createFolders: true})
98 | .then(function (zip) {
99 | console.log(zip.files);
100 | // folder1/
101 | // folder1/folder2/
102 | // folder1/folder2/folder3/
103 | // folder1/folder2/folder3/file1.txt
104 | });
105 | ```
106 |
107 | ### `decodeFileName` option
108 |
109 | A zip file has a flag to say if the filename and comment are encoded with UTF-8.
110 | If it's not set, JSZip has **no way** to know the encoding used. It usually
111 | is the default encoding of the operating system. Some extra fields can give
112 | the unicode version of the filename/comment too (in that case, we use it).
113 |
114 | If we can't find an UTF-8 encoded filename/comment, we use the `decodeFileName`
115 | function (which is by default an UTF-8 decode).
116 |
117 | The function takes the bytes array (Uint8Array or Array) and returns the
118 | decoded string.
119 |
120 | ```js
121 | // here, "bin" is a russian zip file, using the cp866 encoding for file names
122 | // by default, using UTF-8 leads to wrong file names:
123 | zip.loadAsync(bin)
124 | .then(function (zip) {
125 | console.log(zip.files);
126 | // '����� �����/': ...
127 | // '����� �����/����� ⥪�⮢�� ���㬥��.txt': ...
128 | });
129 |
130 | // using the correct encoding solve the issue:
131 | var iconv = require('iconv-lite');
132 | zip.loadAsync(bin, {
133 | decodeFileName: function (bytes) {
134 | return iconv.decode(bytes, 'cp866');
135 | }
136 | })
137 | .then(function (zip) {
138 | console.log(zip.files);
139 | // 'Новая папка/': ...
140 | // 'Новая папка/Новый текстовый документ.txt': ...
141 | });
142 | ```
143 |
144 | ## Other examples
145 |
146 | ```js
147 | var zip = new JSZip();
148 | zip.loadAsync(zipDataFromXHR);
149 | ```
150 |
151 | ```js
152 | require("fs").readFile("hello.zip", function (err, data) {
153 | if (err) throw err;
154 | var zip = new JSZip();
155 | zip.loadAsync(data);
156 | }
157 | ```
158 |
159 | Using sub folders :
160 |
161 | ```js
162 | // here, "bin" is zip file containing:
163 | // file1.txt
164 | // folder1/file2.txt
165 |
166 | var zip = new JSZip();
167 | zip.folder("subfolder").loadAsync(bin)
168 | .then(function (zip) {
169 | // "zip" is still in the "subfolder" folder
170 | console.log(zip.files);
171 | // subfolder/file1.txt
172 | // subfolder/folder1/file2.txt
173 | });
174 | ```
175 |
176 | Using `loadAsync` multiple times:
177 |
178 | ```js
179 | // here, "bin1" is zip file containing:
180 | // file1.txt
181 | // file2.txt
182 | // and "bin2" is zip file containing:
183 | // file2.txt
184 | // file3.txt
185 |
186 | var zip = new JSZip();
187 | zip.loadAsync(bin1)
188 | .then(function (zip) {
189 | return zip.loadAsync(bin2);
190 | }).then(function (zip) {
191 | console.log(zip.files);
192 | // file1.txt, from bin1
193 | // file2.txt, from bin2
194 | // file3.txt, from bin2
195 | });
196 | ```
197 |
--------------------------------------------------------------------------------