|
1 | 1 | // ==UserScript== |
2 | 2 | // @name autodarts-xconfig |
3 | 3 | // @namespace https://github.com/thomasasen/autodarts-xconfig |
4 | | -// @version 2.4.6 |
| 4 | +// @version 2.4.7 |
5 | 5 | // @description Modular, side-effect resistant Tampermonkey runtime for Autodarts enhancements. |
6 | 6 | // @author Thomas Asen |
7 | 7 | // @license MIT |
@@ -12926,7 +12926,6 @@ ${scopedClassSelector(selectorPrefix, EFFECT_CLASSES["fade-blink"])} { |
12926 | 12926 |
|
12927 | 12927 | // src/features/x01-bust-active-player-highlight/logic.js |
12928 | 12928 | var TURN_POINTS_SELECTOR2 = ".ad-ext-turn-points"; |
12929 | | - var TURN_THROW_SELECTOR = "#ad-ext-turn .ad-ext-turn-throw, .ad-ext-turn-throw"; |
12930 | 12929 | var ACTIVE_PLAYER_SELECTOR = "#ad-ext-player-display .ad-ext-player.ad-ext-player-active, #ad-ext-player-display .ad-ext-player-active, .ad-ext-player.ad-ext-player-active, .ad-ext-player-active"; |
12931 | 12930 | var SHAKE_DURATION_MS = 3e3; |
12932 | 12931 | var BUST_SOUND_VOLUME = 0.9; |
@@ -12996,26 +12995,12 @@ ${scopedClassSelector(selectorPrefix, EFFECT_CLASSES["fade-blink"])} { |
12996 | 12995 | } |
12997 | 12996 | return queryOne2(documentRef, ACTIVE_PLAYER_SELECTOR); |
12998 | 12997 | } |
12999 | | - function readComputedValue(style, propertyName, fallbackValue) { |
13000 | | - const value = String(style?.[propertyName] || "").trim(); |
13001 | | - return value || fallbackValue; |
13002 | | - } |
13003 | | - function resolveBustCardVisuals(documentRef, windowRef = null) { |
13004 | | - const throwNode = queryOne2(documentRef, TURN_THROW_SELECTOR); |
13005 | | - const getComputedStyleRef3 = windowRef && typeof windowRef.getComputedStyle === "function" ? windowRef.getComputedStyle.bind(windowRef) : null; |
13006 | | - const style = throwNode && getComputedStyleRef3 ? getComputedStyleRef3(throwNode) : null; |
| 12998 | + function resolveBustCardVisuals() { |
13007 | 12999 | return { |
13008 | | - background: readComputedValue(style, "background", FALLBACK_BUST_CARD_VISUALS.background), |
13009 | | - backgroundColor: readComputedValue( |
13010 | | - style, |
13011 | | - "backgroundColor", |
13012 | | - FALLBACK_BUST_CARD_VISUALS.backgroundColor |
13013 | | - ), |
13014 | | - border: readComputedValue(style, "border", FALLBACK_BUST_CARD_VISUALS.border), |
13015 | | - borderColor: readComputedValue(style, "borderColor", "rgb(207, 52, 52)"), |
13016 | | - borderStyle: readComputedValue(style, "borderStyle", "solid"), |
13017 | | - borderWidth: readComputedValue(style, "borderWidth", "0.8px"), |
13018 | | - boxShadow: readComputedValue(style, "boxShadow", FALLBACK_BUST_CARD_VISUALS.boxShadow) |
| 13000 | + ...FALLBACK_BUST_CARD_VISUALS, |
| 13001 | + borderColor: "rgb(207, 52, 52)", |
| 13002 | + borderStyle: "solid", |
| 13003 | + borderWidth: "0.8px" |
13019 | 13004 | }; |
13020 | 13005 | } |
13021 | 13006 | function setStylePropertyIfChanged(node, propertyName, value) { |
@@ -13434,7 +13419,7 @@ ${scopedClassSelector(selectorPrefix, EFFECT_CLASSES["fade-blink"])} { |
13434 | 13419 | clearNodeState(state.activeNode); |
13435 | 13420 | } |
13436 | 13421 | const enteredBust = state.wasBust !== true; |
13437 | | - const visuals = resolveBustCardVisuals(documentRef, windowRef); |
| 13422 | + const visuals = resolveBustCardVisuals(); |
13438 | 13423 | activeNode.classList.add(BUST_ACTIVE_CLASS); |
13439 | 13424 | applyBustCardVisuals(activeNode, visuals); |
13440 | 13425 | state.activeNode = activeNode; |
@@ -41964,7 +41949,7 @@ ${buildTurnSuggestionDartGuardStyleBlock()}`; |
41964 | 41949 |
|
41965 | 41950 | // src/core/bootstrap.js |
41966 | 41951 | var GLOBAL_NAMESPACE_KEY = "__adXConfig"; |
41967 | | - var API_VERSION = "2.4.6"; |
| 41952 | + var API_VERSION = "2.4.7"; |
41968 | 41953 | var STARTUP_DEFER_INTERVAL_MS = 16; |
41969 | 41954 | function getWindowTimerApi(windowRef) { |
41970 | 41955 | let setTimeoutRef = null; |
|
0 commit comments