Skip to content

Commit

Permalink
Removed embed support for ProxiTok #102
Browse files Browse the repository at this point in the history
  • Loading branch information
ManeraKai committed Mar 10, 2022
1 parent 77e6314 commit 76c1f3f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
20 changes: 10 additions & 10 deletions src/assets/javascripts/helpers/tiktok.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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(
Expand All @@ -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();
}
Expand Down
6 changes: 2 additions & 4 deletions src/pages/options/search/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ <h4>Protocol</h4>
<option value="tor">Tor</option>
</select>
</div>
<hr>
</div>

<div class="some-block">
Expand All @@ -129,9 +128,8 @@ <h4>Note: To use Search to it's full potential, make LibRedirect as the
</h4>
</div>

<hr>

<div id="searx">
<hr>
<div id="searx-normal">
<div class="some-block option-block">
<h4>Default Instances</h4>
Expand Down Expand Up @@ -183,7 +181,7 @@ <h4>Custom Instances</h4>
</div>

<div id="whoogle">

<hr>
<div id="whoogle-normal">
<div class="some-block option-block">
<h4>Default Instances</h4>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/options/search/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,4 @@ searchHelper.init().then(() => {
searchHelper.getWhoogleTorCustomRedirects,
searchHelper.setWhoogleTorCustomRedirects
);
});
});

0 comments on commit 76c1f3f

Please sign in to comment.