export default class Utils { /** Document/window width */ static get screenWidth() { return Math.max(document.documentElement.clientWidth, window.innerWidth || 0); } /** Document/window height */ static get screenHeight() { return Math.max(document.documentElement.clientHeight, window.innerHeight || 0); } static stripBOM(content) { if (content.charCodeAt(0) === 0xFEFF) { content = content.slice(1); } return content; } static getTextArea() { return $(".channelTextArea-rNsIhG textarea"); } static insertText(textarea, text) { textarea.focus(); textarea.selectionStart = 0; textarea.selectionEnd = textarea.value.length; document.execCommand("insertText", false, text); } static injectCss(uri) { $("", { type: "text/css", rel: "stylesheet", href: uri }).appendTo($("head")); } static injectJs(uri) { return new Promise(resolve => { $("