matrix-by-lmx-svg 1.7.2 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/emulator/player.html +3 -1
- package/index.svg +6 -0
- package/package.json +1 -1
package/emulator/player.html
CHANGED
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
<title>Matrix Emulator</title>
|
|
7
7
|
<style>
|
|
8
8
|
html,body,#game{width:100%;height:100%;margin:0;overflow:hidden;background:#000;color:#d7e9ff;font-family:Arial,sans-serif}
|
|
9
|
-
#game{display:
|
|
9
|
+
#game{position:relative;display:block;min-width:0;min-height:0}
|
|
10
|
+
#game.ejs_parent{width:100%!important;height:100%!important}
|
|
11
|
+
#game .ejs_canvas_parent,#game .ejs_canvas{display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important}
|
|
10
12
|
#status{position:fixed;inset:0;display:grid;place-items:center;background:#03070d;color:#9fcfff;letter-spacing:.08em}
|
|
11
13
|
#status.error{padding:24px;color:#ff9ca9;text-align:center;white-space:pre-wrap}
|
|
12
14
|
</style>
|
package/index.svg
CHANGED
|
@@ -232,6 +232,12 @@ document.querySelectorAll("[data-settings-tab]").forEach(function(b){b.onclick=f
|
|
|
232
232
|
try{await proxyServerReady();return await originalUv(title,url)}
|
|
233
233
|
catch(error){var player=byId("player"),frame=byId("frame");byId("pt").textContent=title;player.classList.add("on");frame.removeAttribute("src");frame.srcdoc=matrixStatusPage("Browser unavailable","<p>"+escapeStatus(error.message||"The Matrix relay did not respond.")+"</p>");byId("player-state").textContent="Browser unavailable"}
|
|
234
234
|
};
|
|
235
|
+
(function tidyChatFeeds(){
|
|
236
|
+
var busy=false,siteFeed=byId("chat-messages"),discordFeed=byId("discord-messages");
|
|
237
|
+
function tidy(){if(busy)return;busy=true;try{var seen={};if(siteFeed)siteFeed.querySelectorAll(".chat-message").forEach(function(row){var name=row.querySelector(".chat-copy>b"),author=name?name.textContent.trim():"";row.classList.toggle("chat-continuation",!!(author&&seen[author]));if(author)seen[author]=true});if(discordFeed){var rows=Array.from(discordFeed.querySelectorAll(".chat-message")),hasText=rows.some(function(row){var p=row.querySelector("p");return p&&p.textContent.trim()});discordFeed.classList.toggle("content-withheld",rows.length>0&&!hasText);var old=discordFeed.querySelector(".discord-content-warning");if(rows.length&&!hasText&&!old){var warning=document.createElement("div");warning.className="system-message discord-content-warning";warning.textContent="Discord is withholding message text. Enable Message Content Intent for the MATRIX CHAT bot.";discordFeed.insertBefore(warning,discordFeed.firstChild)}else if(hasText&&old)old.remove()}}finally{busy=false}}
|
|
238
|
+
var observer=new MutationObserver(tidy);if(siteFeed)observer.observe(siteFeed,{childList:true,subtree:true});if(discordFeed)observer.observe(discordFeed,{childList:true,subtree:true});tidy();
|
|
239
|
+
var chatStyle=document.createElement("style");chatStyle.textContent="#chat-messages .chat-continuation{margin-top:-8px}#chat-messages .chat-continuation .chat-avatar,#chat-messages .chat-continuation .chat-copy>b{visibility:hidden}.discord-content-warning{margin-bottom:12px;color:#ffcf7b!important;border-color:#785d2c!important}";document.head.appendChild(chatStyle);
|
|
240
|
+
})();
|
|
235
241
|
var playerFrameStyle=document.createElement("style");playerFrameStyle.textContent=".player iframe{background:#050912!important;color-scheme:dark}";document.head.appendChild(playerFrameStyle);
|
|
236
242
|
})();
|
|
237
243
|
]]></script></body></html></foreignObject></svg>
|