mirror of
https://github.com/imputnet/cobalt.git
synced 2025-07-17 02:38:29 +00:00
actually fix dynamic URL reference for reddit/twitter
This commit is contained in:
parent
197c1dc0e6
commit
56be4ece8c
@ -22,6 +22,9 @@ async function getAccessToken() {
|
||||
|| Number(values.expiry) > new Date().getTime();
|
||||
if (!needRefresh) return values.access_token;
|
||||
|
||||
let redditURL = "reddit.com";
|
||||
if (global.torEnabled) redditURL = "reddittorjg6rue252oqsxryoxengawnmo46qy4kyii5wtqnwfj4ooad.onion";
|
||||
|
||||
const data = await fetch(`https://www.${redditURL}/api/v1/access_token`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
@ -49,11 +52,8 @@ async function getAccessToken() {
|
||||
}
|
||||
|
||||
export default async function(obj) {
|
||||
let redditURL;
|
||||
let regularURL = "reddit.com";
|
||||
let torURL = "reddittorjg6rue252oqsxryoxengawnmo46qy4kyii5wtqnwfj4ooad.onion";
|
||||
redditURL = regularURL;
|
||||
if (global.torEnabled) redditURL = torURL;
|
||||
let redditURL = "reddit.com";
|
||||
if (global.torEnabled) redditURL = "reddittorjg6rue252oqsxryoxengawnmo46qy4kyii5wtqnwfj4ooad.onion";
|
||||
|
||||
let twitterDispatcher;
|
||||
twitterDispatcher = false;
|
||||
|
@ -6,11 +6,8 @@ function bestQuality(arr) {
|
||||
}
|
||||
|
||||
export default async function(obj) {
|
||||
let twitterURL;
|
||||
let regularURL = "twitter.com";
|
||||
let torURL = "twitter3e4tixl4xyajtrzo62zg5vztmjuricljdp2c5kshju4avyoid.onion";
|
||||
twitterURL = regularURL;
|
||||
if (global.torEnabled) twitterURL = torURL;
|
||||
let twitterURL = "twitter.com";
|
||||
if (global.torEnabled) twitterURL = "twitter3e4tixl4xyajtrzo62zg5vztmjuricljdp2c5kshju4avyoid.onion";
|
||||
|
||||
let twitterDispatcher;
|
||||
twitterDispatcher = false;
|
||||
|
Loading…
Reference in New Issue
Block a user