diff --git a/static/openInApp.js b/static/openInApp.js index 4a5b283..c4161a7 100644 --- a/static/openInApp.js +++ b/static/openInApp.js @@ -13,21 +13,21 @@ function detectOS() { } function openTweet(tweetId){ - var preference = localStorage.getItem("openLinksPreference"); - if (preference === "true"){ + if (localStorage.getItem("openLinksPreference") === "true") { const os = detectOS(); - url = `twitter://status?id=${tweetId}` if(os === 'android'){ window.location = url; }else if (os === 'ios'){ window.location.replace(url); } - }else{ + } else if (localStorage.getItem("frontendToggle") === "true" && localStorage.getItem("frontendUrl") !== null) { + window.location = `${localStorage.getItem("frontendUrl")}/i/status/${tweetId}` + } else { window.location = `https://x.com/i/status/${tweetId}` } setTimeout(() => { window.location = `https://x.com/i/status/${tweetId}` }, 1000) -} \ No newline at end of file +} diff --git a/static/preferences.html b/static/preferences.html index e82a613..953c6d4 100644 --- a/static/preferences.html +++ b/static/preferences.html @@ -6,10 +6,8 @@ @@ -35,17 +63,50 @@ - - Redirection settings + + App settings - + Open links in app When you open a link on this device, vxTwitter will try to redirect you to the official X (formerly Twitter) app instead of using your browser. + + + Frontend settings (EXPERIMENTAL) + + + + + + Redirect to Nitter + When you open a link on this browser, vxTwitter will redirect you to your chosen Nitter instance instead of X / Twitter + + + Search + Search for Nitter instances + Use the Nitter health tracker API to query available instances. + + + Choose a Nitter instance + Choose which instance to use for redirection. You can only pick one instance, and Nitter is currently almost dead, so the instance with the highest score is probably your best bet. + + + + Selected + Instance + Healthy + Score + + + + + + +
When you open a link on this device, vxTwitter will try to redirect you to the official X (formerly Twitter) app instead of using your browser.
When you open a link on this browser, vxTwitter will redirect you to your chosen Nitter instance instead of X / Twitter
Use the Nitter health tracker API to query available instances.
Choose which instance to use for redirection. You can only pick one instance, and Nitter is currently almost dead, so the instance with the highest score is probably your best bet.