From a6a519b214c5c259b5744fa9f09a72191e059da7 Mon Sep 17 00:00:00 2001 From: vm-silicons Date: Fri, 19 Dec 2025 22:11:09 -0800 Subject: [PATCH] nuke ie11 checks --- code/modules/client/client_procs.dm | 3 +++ tgui/global.d.ts | 20 -------------------- tgui/packages/tgui-panel/Panel.js | 6 ------ tgui/packages/tgui-panel/audio/player.js | 4 ---- tgui/packages/tgui-panel/chat/renderer.js | 6 +----- tgui/packages/tgui/components/Box.tsx | 12 ------------ tgui/packages/tgui/components/Button.js | 1 - tgui/packages/tgui/components/ByondUi.js | 12 ------------ tgui/packages/tgui/components/Chart.js | 3 +-- tgui/packages/tgui/components/Flex.tsx | 7 ------- tgui/packages/tgui/components/Knob.js | 7 ------- tgui/packages/tgui/components/NumberInput.js | 3 +-- tgui/packages/tgui/components/RoundGauge.js | 6 ------ tgui/packages/tgui/components/Section.tsx | 1 - tgui/packages/tgui/components/Slider.js | 6 ------ tgui/packages/tgui/layouts/Window.js | 2 +- tgui/public/tgui.html | 16 +++------------- 17 files changed, 10 insertions(+), 105 deletions(-) diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index aab2d1ec1a..a84c89bf15 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -253,6 +253,9 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( GLOB.clients += src GLOB.directory[ckey] = src + if(byond_version >= 516) + winset(src, null, list("browser-options" = "find,refresh,byondstorage,devtools")) + // Instantiate tgui panel tgui_panel = new(src) diff --git a/tgui/global.d.ts b/tgui/global.d.ts index 7f2cc8f728..1ba3d8c3b1 100644 --- a/tgui/global.d.ts +++ b/tgui/global.d.ts @@ -28,26 +28,6 @@ declare global { */ IS_BYOND: boolean; - /** - * True if browser is IE8 or lower. - */ - IS_LTE_IE8: boolean; - - /** - * True if browser is IE9 or lower. - */ - IS_LTE_IE9: boolean; - - /** - * True if browser is IE10 or lower. - */ - IS_LTE_IE10: boolean; - - /** - * True if browser is IE11 or lower. - */ - IS_LTE_IE11: boolean; - /** * Makes a BYOND call. * diff --git a/tgui/packages/tgui-panel/Panel.js b/tgui/packages/tgui-panel/Panel.js index 6ed6ffb27c..d61cbe61ec 100644 --- a/tgui/packages/tgui-panel/Panel.js +++ b/tgui/packages/tgui-panel/Panel.js @@ -14,12 +14,6 @@ import { PingIndicator } from './ping'; import { SettingsPanel, useSettings } from './settings'; export const Panel = (props, context) => { - // IE8-10: Needs special treatment due to missing Flex support - if (Byond.IS_LTE_IE10) { - return ( - - ); - } const audio = useAudio(context); const settings = useSettings(context); const game = useGame(context); diff --git a/tgui/packages/tgui-panel/audio/player.js b/tgui/packages/tgui-panel/audio/player.js index 7848533e84..34916064d7 100644 --- a/tgui/packages/tgui-panel/audio/player.js +++ b/tgui/packages/tgui-panel/audio/player.js @@ -10,10 +10,6 @@ const logger = createLogger('AudioPlayer'); export class AudioPlayer { constructor() { - // Doesn't support HTMLAudioElement - if (Byond.IS_LTE_IE9) { - return; - } // Set up the HTMLAudioElement node this.node = document.createElement('audio'); this.node.style.setProperty('display', 'none'); diff --git a/tgui/packages/tgui-panel/chat/renderer.js b/tgui/packages/tgui-panel/chat/renderer.js index 495ed32228..b34fb49356 100644 --- a/tgui/packages/tgui-panel/chat/renderer.js +++ b/tgui/packages/tgui-panel/chat/renderer.js @@ -332,7 +332,7 @@ class ChatRenderer { if (!message.type) { // IE8: Does not support querySelector on elements that // are not yet in the document. - const typeDef = !Byond.IS_LTE_IE8 && MESSAGE_TYPES + const typeDef = MESSAGE_TYPES .find(typeDef => ( typeDef.selector && node.querySelector(typeDef.selector) )); @@ -432,10 +432,6 @@ class ChatRenderer { } saveToDisk() { - // Allow only on IE11 - if (Byond.IS_LTE_IE10) { - return; - } // Compile currently loaded stylesheets as CSS text let cssText = ''; const styleSheets = document.styleSheets; diff --git a/tgui/packages/tgui/components/Box.tsx b/tgui/packages/tgui/components/Box.tsx index 9b0682661f..e39d88aec5 100644 --- a/tgui/packages/tgui/components/Box.tsx +++ b/tgui/packages/tgui/components/Box.tsx @@ -64,16 +64,9 @@ export interface BoxProps { */ export const unit = (value: unknown): string | undefined => { if (typeof value === 'string') { - // Transparently convert pixels into rem units - if (value.endsWith('px') && !Byond.IS_LTE_IE8) { - return parseFloat(value) / 12 + 'rem'; - } return value; } if (typeof value === 'number') { - if (Byond.IS_LTE_IE8) { - return value * 12 + 'px'; - } return value + 'rem'; } }; @@ -217,11 +210,6 @@ export const computeBoxProps = (props: BoxProps) => { if (propName === 'style') { continue; } - // IE8: onclick workaround - if (Byond.IS_LTE_IE8 && propName === 'onClick') { - computedProps.onclick = props[propName]; - continue; - } const propValue = props[propName]; const mapPropToStyle = styleMapperByPropName[propName]; if (mapPropToStyle) { diff --git a/tgui/packages/tgui/components/Button.js b/tgui/packages/tgui/components/Button.js index a56c7dfa0d..000caedb5e 100644 --- a/tgui/packages/tgui/components/Button.js +++ b/tgui/packages/tgui/components/Button.js @@ -66,7 +66,6 @@ export const Button = props => { className, ])} tabIndex={!disabled && '0'} - unselectable={Byond.IS_LTE_IE8} onClick={e => { if (!disabled && onClick) { onClick(e); diff --git a/tgui/packages/tgui/components/ByondUi.js b/tgui/packages/tgui/components/ByondUi.js index 07be451e9d..00417f10b1 100644 --- a/tgui/packages/tgui/components/ByondUi.js +++ b/tgui/packages/tgui/components/ByondUi.js @@ -94,20 +94,12 @@ export class ByondUi extends Component { } componentDidMount() { - // IE8: It probably works, but fuck you anyway. - if (Byond.IS_LTE_IE10) { - return; - } window.addEventListener('resize', this.handleResize); this.componentDidUpdate(); this.handleResize(); } componentDidUpdate() { - // IE8: It probably works, but fuck you anyway. - if (Byond.IS_LTE_IE10) { - return; - } const { params = {}, } = this.props; @@ -122,10 +114,6 @@ export class ByondUi extends Component { } componentWillUnmount() { - // IE8: It probably works, but fuck you anyway. - if (Byond.IS_LTE_IE10) { - return; - } window.removeEventListener('resize', this.handleResize); this.byondUiElement.unmount(); } diff --git a/tgui/packages/tgui/components/Chart.js b/tgui/packages/tgui/components/Chart.js index 77913779db..a5a1155f3d 100644 --- a/tgui/packages/tgui/components/Chart.js +++ b/tgui/packages/tgui/components/Chart.js @@ -120,7 +120,6 @@ LineChart.defaultHooks = pureComponentHooks; const Stub = props => null; -// IE8: No inline svg support export const Chart = { - Line: Byond.IS_LTE_IE8 ? Stub : LineChart, + Line: LineChart, }; diff --git a/tgui/packages/tgui/components/Flex.tsx b/tgui/packages/tgui/components/Flex.tsx index fbb5ab0b96..85313e3d9e 100644 --- a/tgui/packages/tgui/components/Flex.tsx +++ b/tgui/packages/tgui/components/Flex.tsx @@ -28,11 +28,6 @@ export const computeFlexProps = (props: FlexProps) => { return { className: classes([ 'Flex', - Byond.IS_LTE_IE10 && ( - direction === 'column' - ? 'Flex--iefix--column' - : 'Flex--iefix' - ), inline && 'Flex--inline', className, ]), @@ -77,8 +72,6 @@ export const computeFlexItemProps = (props: FlexItemProps) => { return { className: classes([ 'Flex__item', - Byond.IS_LTE_IE10 && 'Flex__item--iefix', - Byond.IS_LTE_IE10 && grow > 0 && 'Flex__item--iefix--grow', className, ]), style: { diff --git a/tgui/packages/tgui/components/Knob.js b/tgui/packages/tgui/components/Knob.js index 175792471b..35f5f5de49 100644 --- a/tgui/packages/tgui/components/Knob.js +++ b/tgui/packages/tgui/components/Knob.js @@ -11,13 +11,6 @@ import { DraggableControl } from './DraggableControl'; import { NumberInput } from './NumberInput'; export const Knob = props => { - // IE8: I don't want to support a yet another component on IE8. - // IE8: It also can't handle SVG. - if (Byond.IS_LTE_IE8) { - return ( - - ); - } const { // Draggable props (passthrough) animated, diff --git a/tgui/packages/tgui/components/NumberInput.js b/tgui/packages/tgui/components/NumberInput.js index 306772c8a5..ac544da28b 100644 --- a/tgui/packages/tgui/components/NumberInput.js +++ b/tgui/packages/tgui/components/NumberInput.js @@ -168,8 +168,7 @@ export class NumberInput extends Component { // IE8: Use an "unselectable" prop because "user-select" doesn't work. const renderContentElement = value => (
+ className="NumberInput__content"> {value + (unit ? ' ' + unit : '')}
); diff --git a/tgui/packages/tgui/components/RoundGauge.js b/tgui/packages/tgui/components/RoundGauge.js index cbe1f910a6..7a45e0c4df 100644 --- a/tgui/packages/tgui/components/RoundGauge.js +++ b/tgui/packages/tgui/components/RoundGauge.js @@ -10,12 +10,6 @@ import { AnimatedNumber } from './AnimatedNumber'; import { Box, computeBoxClassName, computeBoxProps } from './Box'; export const RoundGauge = props => { - // Support for IE8 is for losers sorry B) - if (Byond.IS_LTE_IE8) { - return ( - - ); - } const { value, diff --git a/tgui/packages/tgui/components/Section.tsx b/tgui/packages/tgui/components/Section.tsx index dc226fad61..7fe8805e29 100644 --- a/tgui/packages/tgui/components/Section.tsx +++ b/tgui/packages/tgui/components/Section.tsx @@ -60,7 +60,6 @@ export class Section extends Component {
{ - // IE8: I don't want to support a yet another component on IE8. - if (Byond.IS_LTE_IE8) { - return ( - - ); - } const { // Draggable props (passthrough) animated, diff --git a/tgui/packages/tgui/layouts/Window.js b/tgui/packages/tgui/layouts/Window.js index a291cc6d5a..621351f962 100644 --- a/tgui/packages/tgui/layouts/Window.js +++ b/tgui/packages/tgui/layouts/Window.js @@ -217,7 +217,7 @@ const TitleBar = (props, context) => { // IE8: Use a plain character instead of a unicode symbol. // eslint-disable-next-line react/no-unknown-property onclick={onClose}> - {Byond.IS_LTE_IE8 ? 'x' : '×'} + {'×'}
)} diff --git a/tgui/public/tgui.html b/tgui/public/tgui.html index 84b00709bb..e43bff9b97 100644 --- a/tgui/public/tgui.html +++ b/tgui/public/tgui.html @@ -54,10 +54,6 @@ if (window.__windowId__ === '[' + 'tgui:windowId' + ']') { // Version constants Byond.IS_BYOND = isByond; - Byond.IS_LTE_IE8 = tridentVersion !== null && tridentVersion <= 4; - Byond.IS_LTE_IE9 = tridentVersion !== null && tridentVersion <= 5; - Byond.IS_LTE_IE10 = tridentVersion !== null && tridentVersion <= 6; - Byond.IS_LTE_IE11 = tridentVersion !== null && tridentVersion <= 7; // Callbacks for asynchronous calls Byond.__callbacks__ = []; @@ -66,14 +62,12 @@ if (window.__windowId__ === '[' + 'tgui:windowId' + ']') { // IE8: No reviver for you! // See: https://stackoverflow.com/questions/1288962 var byondJsonReviver; - if (!Byond.IS_LTE_IE8) { byondJsonReviver = function (key, value) { if (typeof value === 'object' && value !== null && value.__number__) { return parseFloat(value.__number__); } return value; }; - } // Makes a BYOND call. // See: https://secure.byond.com/docs/ref/skinparams.html @@ -257,9 +251,7 @@ if (window.__windowId__ === '[' + 'tgui:windowId' + ']') { var node = document.createElement('script'); node.type = 'text/javascript'; // IE8: Prefer non-https protocols - node.src = Byond.IS_LTE_IE9 - ? url.replace('https://', 'http://') - : url; + node.src =url; if (sync) { node.defer = true; } @@ -281,9 +273,7 @@ if (window.__windowId__ === '[' + 'tgui:windowId' + ']') { node.type = 'text/css'; node.rel = 'stylesheet'; // IE8: Prefer non-https protocols - node.href = Byond.IS_LTE_IE9 - ? url.replace('https://', 'http://') - : url; + node.href = url; // Temporarily set media to something inapplicable // to ensure it'll fetch without blocking render if (!sync) { @@ -339,7 +329,7 @@ window.onerror = function (msg, url, line, col, error) { else { window.onerror.__stack__ = stack; } - var textProp = Byond.IS_LTE_IE8 ? 'innerText' : 'textContent'; + var textProp = 'textContent'; errorStack[textProp] = window.onerror.__stack__; } // Set window geometry