Move away from focusing on "China"

Signed-off-by: Chris Abraham <cjyabraham@gmail.com>
This commit is contained in:
Chris Abraham 2024-07-10 13:58:29 +07:00
parent 8e5f618abb
commit d1d7bf210d
No known key found for this signature in database
GPG Key ID: 60A2BD1DA7D4B0F0
1 changed files with 8 additions and 8 deletions

View File

@ -80,20 +80,20 @@
}
async function runBlockedContentTest() {
if (getCookie("in_china") === "") {
if (getCookie("can_google") === "") {
const isBlocked = await checkBlockedSite("https://www.google.com/favicon.ico");
if ( isBlocked ) {
// Site is blocked so we think you are in China.
console.log("We think you ARE in China")
document.cookie = "in_china=true;" + path + expires
// Google is blocked.
console.log("Google is blocked")
document.cookie = "can_google=false;" + path + expires
window.renderPageFindSearchResults()
} else {
// Site isn't blocked so we think you are NOT in China.
console.log("We think you are NOT in China")
document.cookie = "in_china=false;" + path + expires
// Google is not blocked.
console.log("Google is NOT blocked")
document.cookie = "can_google=true;" + path + expires
window.renderGoogleSearchResults()
}
} else if (getCookie("in_china") == "true") {
} else if (getCookie("can_google") == "false") {
window.addEventListener('DOMContentLoaded', (event) => {
window.renderPageFindSearchResults()
});