Lekensteyn / apk-downloader

APK Downloader Chrome Extension
https://lekensteyn.nl/apk-downloader/
328 stars 86 forks source link

how to assess jsxcompressor.min.js #25

Closed integerbasic closed 8 years ago

integerbasic commented 8 years ago

I am interested in using this extension; I'd like to completely review the code first, and then package it myself.

But I am hampered by the compressed script; 'jsxcompressor.min.js'. The compression makes it impossible to review, of course. Is there an uncompressed version of this script available? If so, can I package the extension with the uncompressed script?

Thanks for the excellent work and any advice you can provide.

Lekensteyn commented 8 years ago

I guess that I searched for "unzip gzip javascript" and then found this library via Stackoverflow which points to http://jsxgraph.uni-bayreuth.de/wp/jsxcompressor.html

The exact source is unknown, though I was able to find two versions which result in the same minimized code:

# HEAD is b62b025d15bb32e9298350f840a86f5a83bf58c4
git clone https://github.com/jsxgraph/jsxgraph.git
# stdout: ccf4edf5bed4ceca6784ee76717fcceab18d6933737a0c037153c9f882775a36
git show 262e84130755fff5a9bf2819e789f6881f14ea1b:./jsxcompressor.zip |
bsdtar -xOf- JSXCompressor/jsxcompressor.js |
closure --compilation_level SIMPLE_OPTIMIZATIONS | sha256sum

# HEAD is 0ee6d49dc4f4303507faf9a4e2d66869e0188d85
git clone https://github.com/Lekensteyn/apk-downloader.git
# stdout: ccf4edf5bed4ceca6784ee76717fcceab18d6933737a0c037153c9f882775a36
closure --compilation_level SIMPLE_OPTIMIZATIONS < jsxcompressor.min.js | sha256sum

closure is included with closure-compiler 20160315-1 on Arch Linux. I have pushed the unminified file to the jsxcompressor-unminified branch. Hope it helps and thank you for your interest in reviewing.

Note that it is possible that the current code does not work anymore, changes are probably needed to introduce an alternative authentication method such that the Google APIs can be used.

integerbasic commented 8 years ago

I see some comments in the jsxgraph project about how to create 'jsxcompressor.min.js'. I'll work on that. Thanks for the reference.