Skip to content

Instantly share code, notes, and snippets.

@dumbmoron
Last active March 5, 2026 22:26
Show Gist options
  • Select an option

  • Save dumbmoron/d24cd6590efa5a4f896267f3ed7a4176 to your computer and use it in GitHub Desktop.

Select an option

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();
})();
@DjSalas2002-afk
Copy link

g

@DjSalas2002-afk
Copy link

#ehugeuhhofhyorkfokoj

@DjSalas2002-afk
Copy link

trg

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