Skip to content

Instantly share code, notes, and snippets.

@dumbmoron
Last active January 20, 2025 01:36
Show Gist options
  • Save dumbmoron/d24cd6590efa5a4f896267f3ed7a4176 to your computer and use it in GitHub Desktop.
Save dumbmoron/d24cd6590efa5a4f896267f3ed7a4176 to your computer and use it in GitHub Desktop.
// ==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();
})();
@nastywishful
Copy link

sorry if this isn't the right place for issues i can't find this repo on normal github

@dumbmoron
Copy link
Author

dumbmoron commented Jan 19, 2025

unable to login 💔 you stated you were able to log in to over 4 accounts, right? script is active too

@nastywishful this looks like a vpn ratelimit issue, if you are using a public provider maybe try a different server/location

@nastywishful
Copy link

unable to login 💔 you stated you were able to log in to over 4 accounts, right? script is active too

@nastywishful this looks like a vpn ratelimit issue, if you are using a public provider maybe try a different server/location

YES that was it!! thank you ❤❤❤❤❤

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment