Check for is peak before connecting to gateway

This commit is contained in:
Jeremy Zhang
2018-11-17 20:33:39 +00:00
parent a9d41cdb28
commit 140083b9c8
3 changed files with 13 additions and 4 deletions

View File

@ -20,6 +20,7 @@
/* global wdtEmojiBundle */
/* global EmojiConvertor */
/* global post_timeout */
/* global is_peak */
(function () {
const theme_options = ["DiscordDark", "FireWyvern", "IceWyvern", "MetroEdge", "BetterTitan"]; // All the avaliable theming names
@ -249,11 +250,13 @@
}
// is not in iframe
if (!inIframe() || isSameDomain()) {
if ((!inIframe() || isSameDomain()) && !is_peak) {
shouldUtilizeGateway = true;
} else {
$(document).on("click focus", enableGateway);
$("main").on("mousewheel", enableGateway);
if (!is_peak) {
$("main").on("mousewheel", enableGateway);
}
}
$('select').material_select();