Skip to content

Commit 4db73d5

Browse files
committed
Disable Invidious support in safari due to permission bug
Will be re-enabled later #2227
1 parent 19020d2 commit 4db73d5

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

public/options/options.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ <h2>__MSG_exportOtherData__</h2>
566566

567567
<div id="advanced" class="option-group hidden">
568568

569-
<div id="support-invidious" data-type="toggle" data-sync="supportInvidious">
569+
<div id="support-invidious" data-type="toggle" data-sync="supportInvidious" data-no-safari="true">
570570
<div class="switch-container">
571571
<label class="switch">
572572
<input id="supportInvidious" type="checkbox">
@@ -581,7 +581,7 @@ <h2>__MSG_exportOtherData__</h2>
581581
<div class="small-description">__MSG_supportOtherSitesDescription__ </div>
582582
</div>
583583

584-
<div data-type="private-text-change" data-sync="invidiousInstances" data-dependent-on="supportInvidious">
584+
<div data-type="private-text-change" data-sync="invidiousInstances" data-dependent-on="supportInvidious" data-no-safari="true">
585585
<div class="option-button trigger-button">
586586
__MSG_addInvidiousInstance__
587587
</div>

src/options.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,25 @@ async function init() {
114114

115115
if (await shouldHideOption(optionsElements[i]) || (dependentOn && (isDependentOnReversed ? Config.config[dependentOnName] : !Config.config[dependentOnName]))) {
116116
optionsElements[i].classList.add("hidden", "hiding");
117-
if (!dependentOn)
117+
if (!dependentOn) {
118+
if (optionsElements[i].getAttribute("data-no-safari") === "true" && optionsElements[i].id === "support-invidious") {
119+
// Put message about being disabled on safari
120+
const infoBox = document.createElement("div");
121+
infoBox.innerText = chrome.i18n.getMessage("invidiousDisabledSafari");
122+
123+
const link = document.createElement("a");
124+
link.style.display = "block";
125+
const url = "https://bugs.webkit.org/show_bug.cgi?id=290508";
126+
link.href = url;
127+
link.innerText = url;
128+
129+
infoBox.appendChild(link);
130+
131+
optionsElements[i].parentElement.insertBefore(infoBox, optionsElements[i].nextSibling);
132+
}
133+
118134
continue;
135+
}
119136
}
120137

121138
const option = optionsElements[i].getAttribute("data-sync");

0 commit comments

Comments
 (0)