- openModalPeople: function() {
- window.doClick("modalPeople");
- document.getElementById("inputChat").focus();
+ cleanBeforeDestroy: function() {
+ document.removeEventListener('visibilitychange', this.visibilityChange);
+ window.removeEventListener('focus', this.onFocus);
+ window.removeEventListener('blur', this.onBlur);
+ window.removeEventListener("beforeunload", this.cleanBeforeDestroy);
+ clearTimeout(this.reopenTimeout);
+ this.send("disconnect");
+ this.conn = null;
+ },
+ getRandomnessClass: function(pc) {
+ const opts = pc.options;
+ if (opts.randomness === undefined && opts.random === undefined)
+ return {};
+ if (opts.randomness !== undefined)
+ return { ["random-" + opts.randomness]: true };
+ return { ["random-" + (opts.random ? 2 : 0)]: true };