Last active
January 20, 2025 01:36
-
-
Save dumbmoron/d24cd6590efa5a4f896267f3ed7a4176 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name bypass tiktok block | |
// @namespace http://tampermonkey.net/ | |
// @version 2025-01-19 | |
// @description replaces the `store-country-code` cookie with a non-US one | |
// @author jj | |
// @match https://www.tiktok.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=tiktok.com | |
// @grant GM_cookie | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const fixCookie = () => { | |
GM_cookie.list( | |
{ url: 'https://www.tiktok.com/', name: 'store-country-code' }, | |
(cookies, error) => { | |
const cookie = cookies[0]; | |
if (!error) { | |
if (cookie?.value === 'us') { | |
cookie.value = ['au', 'ie', 'gb', 'ca'][Math.floor(Math.random() * 4)]; | |
GM_cookie.set(cookie, err => { | |
if (err) { | |
alert('fail'); | |
} | |
}); | |
} | |
if (window.location.pathname === '/us-landing') { | |
window.location.pathname = '/'; | |
} | |
} else console.error(error); | |
} | |
); | |
setTimeout(fixCookie, 500); | |
} | |
fixCookie(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
YES that was it!! thank you ❤❤❤❤❤