remove dependency on aria-label
This commit is contained in:
parent
6ef16b9625
commit
f5217dfdfa
|
@ -81,11 +81,16 @@ setInterval(() => {
|
||||||
});
|
});
|
||||||
hiddenElements.length = 0;
|
hiddenElements.length = 0;
|
||||||
} else {
|
} else {
|
||||||
for (const el of document.querySelectorAll(
|
for (const el of [
|
||||||
'[aria-label="Share Your Screen"]'
|
document.getElementsByClassName("actionButtons-2vEOUh")?.[0]?.children[1],
|
||||||
)) {
|
document.querySelector(
|
||||||
|
".wrapper-3t3Yqv > div > div > div > div > .controlButton-2PMNom"
|
||||||
|
),
|
||||||
|
]) {
|
||||||
|
if (!el) continue;
|
||||||
|
if (el.classList.contains("discord-screenaudio-cloned")) continue;
|
||||||
|
el.classList.add("discord-screenaudio-cloned");
|
||||||
elClone = el.cloneNode(true);
|
elClone = el.cloneNode(true);
|
||||||
elClone.ariaLabel = "Share Your Screen with Audio";
|
|
||||||
elClone.title = "Share Your Screen with Audio";
|
elClone.title = "Share Your Screen with Audio";
|
||||||
elClone.addEventListener("click", () => {
|
elClone.addEventListener("click", () => {
|
||||||
console.log("!discord-screenaudio-start-stream");
|
console.log("!discord-screenaudio-start-stream");
|
||||||
|
|
Loading…
Reference in New Issue