Skip to content

Commit 43fb7b3

Browse files
committed
lightmode + outline fix
1 parent adcba61 commit 43fb7b3

File tree

2 files changed

+55
-25
lines changed

2 files changed

+55
-25
lines changed

background.html

Lines changed: 46 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -775,11 +775,11 @@ <h3>Test Flow</h3>
775775
<textarea id="test-message" rows="3">Hello, world!</textarea>
776776
</div>
777777

778-
<div class="test-options">
779-
<label class="test-checkbox">
780-
<input type="checkbox" id="test-mod">
781-
Moderator
782-
</label>
778+
<div class="test-options">
779+
<label class="test-checkbox">
780+
<input type="checkbox" id="test-mod">
781+
Moderator
782+
</label>
783783

784784
<label class="test-checkbox">
785785
<input type="checkbox" id="test-vip">
@@ -791,22 +791,47 @@ <h3>Test Flow</h3>
791791
Admin
792792
</label>
793793

794-
<label class="test-checkbox">
795-
<input type="checkbox" id="test-donation">
796-
Has Donation
797-
</label>
798-
</div>
799-
800-
<div id="donation-amount" class="test-group" style="display: none;">
801-
<label for="test-donation-amount">Donation Amount:</label>
802-
<input type="text" id="test-donation-amount" value="$5.00">
803-
</div>
804-
805-
<div class="test-options">
806-
<label class="test-checkbox">
807-
<input type="checkbox" id="test-all-active-flows">
808-
Test against all active flows (not just current flow)
809-
</label>
794+
<label class="test-checkbox">
795+
<input type="checkbox" id="test-donation">
796+
Has Donation
797+
</label>
798+
</div>
799+
800+
<div id="donation-amount" class="test-group" style="display: none;">
801+
<label for="test-donation-amount">Donation Amount:</label>
802+
<input type="text" id="test-donation-amount" value="$5.00">
803+
</div>
804+
805+
<div class="test-options">
806+
<label class="test-checkbox">
807+
<input type="checkbox" id="test-firsttime">
808+
First-time chatter
809+
</label>
810+
811+
<label class="test-checkbox">
812+
<input type="checkbox" id="test-lastactivity">
813+
Set last activity
814+
</label>
815+
</div>
816+
817+
<div id="lastactivity-controls" class="test-group" style="display: none;">
818+
<label for="test-lastactivity-value">Last activity</label>
819+
<div style="display: flex; gap: 8px; align-items: center;">
820+
<input type="number" id="test-lastactivity-value" value="60" min="0" style="width: 110px;">
821+
<select id="test-lastactivity-unit">
822+
<option value="minutes" selected>Minutes ago</option>
823+
<option value="hours">Hours ago</option>
824+
<option value="days">Days ago</option>
825+
</select>
826+
</div>
827+
<p class="test-help" style="color: #a0a0a0; font-size: 13px; margin: 6px 0 0 0;">Applies to message-properties “last activity” filters using the current time as reference.</p>
828+
</div>
829+
830+
<div class="test-options">
831+
<label class="test-checkbox">
832+
<input type="checkbox" id="test-all-active-flows">
833+
Test against all active flows (not just current flow)
834+
</label>
810835
</div>
811836

812837
<div class="test-warning" id="unsaved-flow-warning" style="display: none; color: #e76f51; margin: 10px 0;">

dock.html

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2902,7 +2902,7 @@ <h3>Status</h3>
29022902
var width = parseNumericValue(widthValue);
29032903
var color = colorValue || "#000000";
29042904
var shadow = buildOutlineShadow(width === null ? 2 : width, color);
2905-
document.documentElement.style.setProperty("--text-shadow", shadow);
2905+
setTextShadow(shadow);
29062906
}
29072907

29082908
function resolveGlowColor(colorValue) {
@@ -2938,6 +2938,11 @@ <h3>Status</h3>
29382938
var glowShadow = buildGlowShadow(widthValue, colorValue);
29392939
document.documentElement.style.setProperty("--text-glow", glowShadow);
29402940
}
2941+
2942+
function setTextShadow(shadowValue) {
2943+
document.documentElement.style.setProperty("--text-shadow", shadowValue);
2944+
document.body.style.setProperty("--text-shadow", shadowValue);
2945+
}
29412946

29422947
var tainted = false;
29432948

@@ -4840,7 +4845,7 @@ <h3>Status</h3>
48404845
}
48414846

48424847
if (urlParams.has("nooutline")) {
4843-
document.documentElement.style.setProperty("--text-shadow", "0 0 #0000");
4848+
setTextShadow("0 0 #0000");
48444849
if (!darkmode){
48454850
document.getElementById("topbar").style.color = "white";
48464851
document.getElementById("topbar").style.fontWeight = "700";
@@ -4849,10 +4854,10 @@ <h3>Status</h3>
48494854
applyTextOutline(customOutlineWidthParam, customOutlineColorParam || customStrokeColorParam);
48504855
} else if (urlParams.has("bolder")) {
48514856
var bolderShadow = "-3px -3px #000000, -3px -1.5px #000000, -3px 0px #000000, -3px 1.5px #000000, -3px 3px #000000, -1.5px -3px #000000, -1.5px -1.5px #000000, -1.5px 0px #000000, -1.5px 1.5px #000000, -1.5px 3px #000000, 0px -3px #000000, 0px -1.5px #000000, 0px 0px #000000, 0px 1.5px #000000, 0px 3px #000000, 1.5px -3px #000000, 1.5px -1.5px #000000, 1.5px 0px #000000, 1.5px 1.5px #000000, 1.5px 3px #000000, 3px -3px #000000, 3px -1.5px #000000, 3px 0px #000000, 3px 1.5px #000000, 3px 3px #000000";
4852-
document.documentElement.style.setProperty("--text-shadow", bolderShadow);
4857+
setTextShadow(bolderShadow);
48534858
} else if (urlParams.has("thinner")) {
48544859
var thinnerShadow = "-1.5px -1.5px #000000, -1.5px -0.75px #000000, -1.5px 0px #000000, -1.5px 0.75px #000000, -1.5px 1.5px #000000, -0.75px -1.5px #000000, -0.75px -0.75px #000000, -0.75px 0px #000000, -0.75px 0.75px #000000, -0.75px 1.5px #000000, 0px -1.5px #000000, 0px -0.75px #000000, 0px 0px #000000, 0px 0.75px #000000, 0px 1.5px #000000, 0.75px -1.5px #000000, 0.75px -0.75px #000000, 0.75px 0px #000000, 0.75px 0.75px #000000, 0.75px 1.5px #000000, 1.5px -1.5px #000000, 1.5px -0.75px #000000, 1.5px 0px #000000, 1.5px 0.75px #000000, 1.5px 1.5px #000000";
4855-
document.documentElement.style.setProperty("--text-shadow", thinnerShadow);
4860+
setTextShadow(thinnerShadow);
48564861
}
48574862

48584863
if (hasTextGlow) {

0 commit comments

Comments
 (0)