(function() { var Connector, LiveReload, Options, ProtocolError, Reloader, Timer, hasProp = {}.hasOwnProperty; Connector = require('./connector').Connector; Timer = require('./timer').Timer; Options = require('./options').Options; Reloader = require('./reloader').Reloader; ProtocolError = require('./protocol').ProtocolError; exports.LiveReload = LiveReload = (function() { function LiveReload(window1) { var k, ref, v; this.window = window1; this.listeners = {}; this.plugins = []; this.pluginIdentifiers = {}; this.console = this.window.console && this.window.console.log && this.window.console.error ? this.window.location.href.match(/LR-verbose/) ? this.window.console : { log: function() {}, error: this.window.console.error.bind(this.window.console) } : { log: function() {}, error: function() {} }; if (!(this.WebSocket = this.window.WebSocket || this.window.MozWebSocket)) { this.console.error("LiveReload disabled because the browser does not seem to support web sockets"); return; } if ('LiveReloadOptions' in window) { this.options = new Options(); ref = window['LiveReloadOptions']; for (k in ref) { if (!hasProp.call(ref, k)) continue; v = ref[k]; this.options.set(k, v); } } else { this.options = Options.extract(this.window.document); if (!this.options) { this.console.error("LiveReload disabled because it could not find its own