1
0
mirror of https://github.com/chylex/Discord-History-Tracker.git synced 2025-01-09 13:42:50 +01:00
Desktop app & browser script that saves Discord chat history into a file, and an offline viewer that displays the file. https://dht.chylex.com
Go to file
2016-11-02 22:59:57 +01:00
lib Add Google Closure Compiler for ES6 support and update build script 2016-10-23 23:52:49 +02:00
src Add a base for renderer settings modal 2016-11-02 22:59:57 +01:00
.gitignore Add a build script 2016-10-22 17:26:07 +02:00
build.py Prevent tracker script from being ran twice 2016-10-30 13:35:14 +01:00
LICENSE.md Rename LICENSE to LICENSE.md 2016-10-27 18:10:40 +02:00
README.md Fix readme section with npm install command 2016-10-31 03:45:16 +01:00
reserve.txt Fix HTML escaping in renderer getting renamed by UglifyJS 2016-10-27 20:12:05 +02:00

Usage

TODO

Building

The build script requires Python 3. For automatic build, run python build.py, and a bld folder with the track script and renderer will be created.

The track.js script is ready to be added as a bookmark in a browser, or ran in a browser console.

Minification

The build process has support for JS and CSS minification.

If possible, it uses YUI Compressor for CSS, and UglifyJS for JavaScript (falls back to Google Closure Compiler if UglifyJS is not available). If the required programs are not found on the system path, minification will be disabled without warnings.

It is possible to disable minification completely using the --nominify flag, or to force Google Closure Compiler to be used using the --closure flag.

Requirements

  • Java 7+ (YUI, Closure Compiler)
  • npm (UglifyJS)
  • uglify-js-harmony (UglifyJS)

Setting Up UglifyJS

Once you install npm, use the following command to download UglifyJS with ES6 support and add it to your system path:

npm install uglify-js-harmony -g

UglifyJS vs Google Closure Compiler

Closure Compiler compiles into ES5, which adds support for older browsers that don't have some of the used ES6 functionality, however it is at the expense of several additional kilobytes to the file size.