Skip to content

Commit ec21fcb

Browse files
committed
new comic dock styles; fix
1 parent ff1ce40 commit ec21fcb

5 files changed

Lines changed: 1242 additions & 65 deletions

File tree

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Social Stream Ninja",
33
"description": "Powerful tooling to engage live chat on Youtube, Twitch, Zoom, and more.",
44
"manifest_version": 3,
5-
"version": "3.32.11",
5+
"version": "3.32.12",
66
"homepage_url": "http://socialstream.ninja/",
77
"icons": {
88
"128": "icons/icon-128.png"

popup.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,8 +1459,10 @@ <h2 class="streaming_chat_title">
14591459
</label>
14601460
<select id="overlay-preset-select" data-optionsetting="overlayPreset" style="padding: 5px 10px; border-radius: 4px; background: #333; color: #fff; border: 1px solid #555;">
14611461
<option value="">Default dock.html (Customizable)</option>
1462-
<option value="sampleoverlay.html">📄 Sample Overlay - Basic chat overlay</option>
1463-
<option value="themes/horizontal.html">➡️ Horizontal Scroll - Right-to-left ticker</option>
1462+
<option value="sampleoverlay.html">📄 Sample Overlay - Basic chat overlay</option>
1463+
<option value="themes/overlay-comic-pop.html">💥 Comic Pop Dock - Stackable pop art chat</option>
1464+
<option value="themes/overlay-comic-classic.html">🗯️ Comic Pop Classic - Featured style chat</option>
1465+
<option value="themes/horizontal.html">➡️ Horizontal Scroll - Right-to-left ticker</option>
14641466
<option value="themes/overlay-neon-cyberpunk.html">⚡ Neon Cyberpunk - Futuristic glitch effects</option>
14651467
<option value="themes/overlay-particles.html">✨ Particle System - Floating message effects</option>
14661468
<option value="themes/overlay-typewriter.html">⌨️ Terminal Typewriter - Retro typing effects</option>

popup.js

Lines changed: 82 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,6 +1560,86 @@ function setupPageLinks(hideLinks, baseURL, streamID, password) {
15601560
}
15611561
}
15621562

1563+
function applyFeaturedOverlayPreset(presetValue) {
1564+
const overlayDiv = document.getElementById('overlay');
1565+
const overlayLink = document.getElementById('overlaylink');
1566+
const presetSelector = document.getElementById('featured-preset-select');
1567+
1568+
if (!overlayDiv || !overlayLink) {
1569+
return;
1570+
}
1571+
1572+
if (typeof presetValue === 'string' && presetSelector && presetSelector.value !== presetValue) {
1573+
presetSelector.value = presetValue;
1574+
}
1575+
1576+
document.querySelectorAll('.preset-config-section').forEach(section => {
1577+
section.style.display = 'none';
1578+
});
1579+
1580+
const toggleClassicOptions = (show) => {
1581+
document.querySelectorAll('.wrapper:has(.options_group.single_message)').forEach(wrapper => {
1582+
wrapper.style.display = show ? '' : 'none';
1583+
});
1584+
};
1585+
1586+
if (presetValue) {
1587+
const presetUrl = baseURL + presetValue;
1588+
let currentParams = overlayDiv.raw?.split('?')[1] || '';
1589+
let session = '';
1590+
1591+
if (currentParams) {
1592+
const params = new URLSearchParams(currentParams);
1593+
session = params.get('session') || params.get('room') || '';
1594+
}
1595+
1596+
if (!session) {
1597+
const sessionInput = document.getElementById('sessionid');
1598+
if (sessionInput && sessionInput.value) {
1599+
session = sessionInput.value;
1600+
}
1601+
}
1602+
1603+
let newUrl = presetUrl;
1604+
if (session) {
1605+
newUrl += (presetUrl.includes('?') ? '&' : '?') + 'session=' + session;
1606+
}
1607+
1608+
overlayDiv.raw = newUrl;
1609+
overlayLink.href = newUrl;
1610+
overlayLink.innerText = document.body.classList.contains('hidelinks') ? 'Click to open link' : newUrl;
1611+
1612+
toggleClassicOptions(false);
1613+
1614+
const presetType = presetValue.match(/featured-(\w+)\.html/)?.[1];
1615+
if (presetType) {
1616+
const presetConfigSection = document.getElementById(`preset-config-${presetType}`);
1617+
if (presetConfigSection) {
1618+
presetConfigSection.style.display = 'block';
1619+
}
1620+
}
1621+
} else {
1622+
let currentParams = overlayDiv.raw?.split('?')[1] || '';
1623+
1624+
if (!currentParams) {
1625+
const sessionInput = document.getElementById('sessionid');
1626+
if (sessionInput && sessionInput.value) {
1627+
currentParams = 'session=' + sessionInput.value;
1628+
}
1629+
}
1630+
1631+
const classicUrl = baseURL + 'featured.html' + (currentParams ? '?' + currentParams : '');
1632+
1633+
overlayDiv.raw = classicUrl;
1634+
overlayLink.href = classicUrl;
1635+
overlayLink.innerText = document.body.classList.contains('hidelinks') ? 'Click to open link' : classicUrl;
1636+
1637+
toggleClassicOptions(true);
1638+
}
1639+
1640+
refreshLinks();
1641+
}
1642+
15631643
function removeTTSProviderParams(url, selectedProvider=null) {
15641644
if (!url) return url;
15651645

@@ -1878,9 +1958,7 @@ function processObjectSetting(key, settingObj, sync, paramNums, response) { // A
18781958
} else if (key == "ttsProvider") {
18791959
handleTTSProviderVisibility(ele.value);
18801960
} else if (key == "featuredOverlayStyle" ) {
1881-
document.querySelectorAll('.wrapper:has(.options_group.single_message)').forEach(wrapper => {
1882-
wrapper.style.display = 'none';
1883-
});
1961+
applyFeaturedOverlayPreset(ele.value);
18841962
} else if (key == "overlayPreset") {
18851963
// Update the dock URL to match the saved overlay preset
18861964
const dockDiv = document.getElementById('dock');
@@ -5700,65 +5778,7 @@ document.addEventListener("DOMContentLoaded", async function(event) {
57005778
const presetSelector = document.getElementById('featured-preset-select');
57015779
if (presetSelector) {
57025780
presetSelector.addEventListener('change', function() {
5703-
const overlayDiv = document.getElementById('overlay');
5704-
const overlayLink = document.getElementById('overlaylink');
5705-
5706-
if (!overlayDiv || !overlayLink) return;
5707-
5708-
// Hide all preset configuration sections first
5709-
document.querySelectorAll('.preset-config-section').forEach(section => {
5710-
section.style.display = 'none';
5711-
});
5712-
5713-
if (this.value) {
5714-
// A preset is selected - use the preset URL
5715-
const presetUrl = baseURL + this.value;
5716-
5717-
// Get the current parameters from the classic featured.html
5718-
const currentParams = overlayDiv.raw?.split('?')[1] || '';
5719-
5720-
// Extract session/room parameter
5721-
const urlParams = new URLSearchParams(currentParams);
5722-
const session = urlParams.get('session') || urlParams.get('room') || '';
5723-
5724-
// Build the new URL with session parameter
5725-
let newUrl = presetUrl;
5726-
if (session) {
5727-
newUrl += (presetUrl.includes('?') ? '&' : '?') + 'session=' + session;
5728-
}
5729-
5730-
// Update the display
5731-
overlayDiv.raw = newUrl;
5732-
overlayLink.href = newUrl;
5733-
overlayLink.innerText = document.body.classList.contains("hidelinks") ? "Click to open link" : newUrl;
5734-
5735-
// Hide classic customization options
5736-
document.querySelectorAll('.wrapper:has(.options_group.single_message)').forEach(wrapper => {
5737-
wrapper.style.display = 'none';
5738-
});
5739-
5740-
// Show the specific preset configuration based on selection
5741-
const presetType = this.value.match(/featured-(\w+)\.html/)?.[1];
5742-
if (presetType) {
5743-
const presetConfigSection = document.getElementById(`preset-config-${presetType}`);
5744-
if (presetConfigSection) {
5745-
presetConfigSection.style.display = 'block';
5746-
}
5747-
}
5748-
} else {
5749-
// Classic mode selected - restore featured.html
5750-
const currentParams = overlayDiv.raw?.split('?')[1] || '';
5751-
const classicUrl = baseURL + 'featured.html' + (currentParams ? '?' + currentParams : '');
5752-
5753-
overlayDiv.raw = classicUrl;
5754-
overlayLink.href = classicUrl;
5755-
overlayLink.innerText = document.body.classList.contains("hidelinks") ? "Click to open link" : classicUrl;
5756-
5757-
// Show classic customization options
5758-
document.querySelectorAll('.wrapper:has(.options_group.single_message)').forEach(wrapper => {
5759-
wrapper.style.display = '';
5760-
});
5761-
}
5781+
applyFeaturedOverlayPreset(this.value);
57625782
});
57635783
}
57645784

0 commit comments

Comments
 (0)