Removed embed support for ProxiTok #102

This commit is contained in:
ManeraKai 2022-03-10 15:34:09 +03:00
parent 77e63148c3
commit 76c1f3ff18
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
3 changed files with 13 additions and 15 deletions

View File

@ -100,7 +100,7 @@ function redirect(url, type) {
// https://www.tiktok.com/@keysikaspol/video/7061265241887345946
// https://www.tiktok.com/@keysikaspol
if (type != "main_frame" && type != "sub_frame" && type != "xmlhttprequest") return null;
if (type != "main_frame") return null;
let instancesList;
if (protocol == 'normal') instancesList = [...proxiTokNormalRedirectsChecks, ...proxiTokNormalCustomRedirects];
@ -114,7 +114,7 @@ function redirect(url, type) {
}
async function init() {
return new Promise((resolve) => {
return new Promise(resolve => {
fetch('/instances/data.json').then(response => response.text()).then(data => {
let dataJson = JSON.parse(data);
browser.storage.local.get(
@ -130,18 +130,18 @@ async function init() {
"tiktokProtocol"
],
(result) => {
disable = result.disableTiktok ?? false;
r => {
disable = r.disableTiktok ?? false;
protocol = result.tiktokProtocol ?? "normal";
protocol = r.tiktokProtocol ?? "normal";
if (result.tiktokRedirects) redirects = result.tiktokRedirects;
if (r.tiktokRedirects) redirects = r.tiktokRedirects;
proxiTokNormalRedirectsChecks = result.proxiTokNormalRedirectsChecks ?? [...redirects.proxiTok.normal];
proxiTokNormalCustomRedirects = result.proxiTokNormalCustomRedirects ?? [];
proxiTokNormalRedirectsChecks = r.proxiTokNormalRedirectsChecks ?? [...redirects.proxiTok.normal];
proxiTokNormalCustomRedirects = r.proxiTokNormalCustomRedirects ?? [];
proxiTokTorRedirectsChecks = result.proxiTokTorRedirectsChecks ?? [...redirects.proxiTok.tor];
proxiTokTorCustomRedirects = result.proxiTokTorCustomRedirects ?? [];
proxiTokTorRedirectsChecks = r.proxiTokTorRedirectsChecks ?? [...redirects.proxiTok.tor];
proxiTokTorCustomRedirects = r.proxiTokTorCustomRedirects ?? [];
resolve();
}

View File

@ -120,7 +120,6 @@
<option value="tor">Tor</option>
</select>
</div>
<hr>
</div>
<div class="some-block">
@ -129,9 +128,8 @@
</h4>
</div>
<hr>
<div id="searx">
<hr>
<div id="searx-normal">
<div class="some-block option-block">
<h4>Default Instances</h4>
@ -183,7 +181,7 @@
</div>
<div id="whoogle">
<hr>
<div id="whoogle-normal">
<div class="some-block option-block">
<h4>Default Instances</h4>

View File

@ -124,4 +124,4 @@ searchHelper.init().then(() => {
searchHelper.getWhoogleTorCustomRedirects,
searchHelper.setWhoogleTorCustomRedirects
);
});
});