Lightly massage some of the generated JavaScript

This commit is contained in:
Arlo Breault 2019-07-06 15:20:07 +02:00
parent 31ad9566e6
commit 1867a3f121
19 changed files with 986 additions and 989 deletions

View file

@ -1,28 +1,26 @@
// Generated by CoffeeScript 2.4.1
/*
Entry point.
*/
var broker, config, dbg, debug, init, log, snowflake, ui, update;
debug = false;
var debug = false;
snowflake = null;
var snowflake = null;
config = null;
var config = null;
broker = null;
var broker = null;
ui = null;
var ui = null;
// Log to both console and UI if applicable.
// Requires that the snowflake and UI objects are hooked up in order to
// log to console.
log = function(msg) {
var log = function(msg) {
console.log('Snowflake: ' + msg);
return snowflake != null ? snowflake.ui.log(msg) : void 0;
};
dbg = function(msg) {
var dbg = function(msg) {
if (debug) {
return log(msg);
}
@ -37,7 +35,7 @@ if (!Util.featureDetect()) {
return;
}
init = function() {
var init = function() {
config = new Config;
ui = new WebExtUI();
broker = new Broker(config.brokerUrl);
@ -46,7 +44,7 @@ init = function() {
return ui.initToggle();
};
update = function() {
var update = function() {
if (!ui.enabled) {
// Do not activate the proxy if any number of conditions are true.
snowflake.disable();