Removed embed support for ProxiTok #102
This commit is contained in:
parent
77e63148c3
commit
76c1f3ff18
|
@ -100,7 +100,7 @@ function redirect(url, type) {
|
||||||
// https://www.tiktok.com/@keysikaspol/video/7061265241887345946
|
// https://www.tiktok.com/@keysikaspol/video/7061265241887345946
|
||||||
// https://www.tiktok.com/@keysikaspol
|
// https://www.tiktok.com/@keysikaspol
|
||||||
|
|
||||||
if (type != "main_frame" && type != "sub_frame" && type != "xmlhttprequest") return null;
|
if (type != "main_frame") return null;
|
||||||
|
|
||||||
let instancesList;
|
let instancesList;
|
||||||
if (protocol == 'normal') instancesList = [...proxiTokNormalRedirectsChecks, ...proxiTokNormalCustomRedirects];
|
if (protocol == 'normal') instancesList = [...proxiTokNormalRedirectsChecks, ...proxiTokNormalCustomRedirects];
|
||||||
|
@ -114,7 +114,7 @@ function redirect(url, type) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
return new Promise((resolve) => {
|
return new Promise(resolve => {
|
||||||
fetch('/instances/data.json').then(response => response.text()).then(data => {
|
fetch('/instances/data.json').then(response => response.text()).then(data => {
|
||||||
let dataJson = JSON.parse(data);
|
let dataJson = JSON.parse(data);
|
||||||
browser.storage.local.get(
|
browser.storage.local.get(
|
||||||
|
@ -130,18 +130,18 @@ async function init() {
|
||||||
|
|
||||||
"tiktokProtocol"
|
"tiktokProtocol"
|
||||||
],
|
],
|
||||||
(result) => {
|
r => {
|
||||||
disable = result.disableTiktok ?? false;
|
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];
|
proxiTokNormalRedirectsChecks = r.proxiTokNormalRedirectsChecks ?? [...redirects.proxiTok.normal];
|
||||||
proxiTokNormalCustomRedirects = result.proxiTokNormalCustomRedirects ?? [];
|
proxiTokNormalCustomRedirects = r.proxiTokNormalCustomRedirects ?? [];
|
||||||
|
|
||||||
proxiTokTorRedirectsChecks = result.proxiTokTorRedirectsChecks ?? [...redirects.proxiTok.tor];
|
proxiTokTorRedirectsChecks = r.proxiTokTorRedirectsChecks ?? [...redirects.proxiTok.tor];
|
||||||
proxiTokTorCustomRedirects = result.proxiTokTorCustomRedirects ?? [];
|
proxiTokTorCustomRedirects = r.proxiTokTorCustomRedirects ?? [];
|
||||||
|
|
||||||
resolve();
|
resolve();
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,7 +120,6 @@
|
||||||
<option value="tor">Tor</option>
|
<option value="tor">Tor</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="some-block">
|
<div class="some-block">
|
||||||
|
@ -129,9 +128,8 @@
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<div id="searx">
|
<div id="searx">
|
||||||
|
<hr>
|
||||||
<div id="searx-normal">
|
<div id="searx-normal">
|
||||||
<div class="some-block option-block">
|
<div class="some-block option-block">
|
||||||
<h4>Default Instances</h4>
|
<h4>Default Instances</h4>
|
||||||
|
@ -183,7 +181,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="whoogle">
|
<div id="whoogle">
|
||||||
|
<hr>
|
||||||
<div id="whoogle-normal">
|
<div id="whoogle-normal">
|
||||||
<div class="some-block option-block">
|
<div class="some-block option-block">
|
||||||
<h4>Default Instances</h4>
|
<h4>Default Instances</h4>
|
||||||
|
|
|
@ -124,4 +124,4 @@ searchHelper.init().then(() => {
|
||||||
searchHelper.getWhoogleTorCustomRedirects,
|
searchHelper.getWhoogleTorCustomRedirects,
|
||||||
searchHelper.setWhoogleTorCustomRedirects
|
searchHelper.setWhoogleTorCustomRedirects
|
||||||
);
|
);
|
||||||
});
|
});
|
Loading…
Reference in New Issue