Prevent tracker script from being ran twice

This commit is contained in:
chylex 2016-10-30 13:35:14 +01:00
parent b9d50ddb01
commit fbbbbcd39c
2 changed files with 8 additions and 1 deletions

View File

@ -7,7 +7,7 @@ import sys
import os
EXEC_UGLIFYJS = "uglifyjs --compress --mangle --mangle-props --reserve-domprops --reserved-file reserve.txt --screw-ie8 --output \"{1}\" \"{0}\""
EXEC_UGLIFYJS = "uglifyjs --bare-returns --compress --mangle --mangle-props --reserve-domprops --reserved-file reserve.txt --screw-ie8 --output \"{1}\" \"{0}\""
EXEC_CLOSURECOMPILER = "java -jar lib/closure-compiler-v20160911.jar --js \"{0}\" --js_output_file \"{1}\""
EXEC_YUI = "java -jar lib/yuicompressor-2.4.8.jar --charset utf-8 --line-break 160 --type css -o \"{1}\" \"{0}\""

View File

@ -1,3 +1,10 @@
if (window.DHT_LOADED){
alert("Discord History Tracker is already loaded.");
return;
}
window.DHT_LOADED = true;
DISCORD.setupMessageRequestHook((channel, messages) => {
if (STATE.isTracking()){
var info = DISCORD.getSelectedChannel();