Skip to content
This repository has been archived by the owner on Mar 26, 2022. It is now read-only.

Commit

Permalink
Formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
NDevTK authored Mar 29, 2020
1 parent ff83976 commit 6884d52
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions Gender/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,41 +54,41 @@ <h1>Welcome to Gender Detect</h1>
}

async function getRules() {
Gender("Female");
Gender("Male");
return Rules
Gender("Female");
Gender("Male");
return Rules
}

function Gender(g) {
Rules.set("https://www.gstatic.com/identity/boq/adssettingsui/demographic/i_gender_"+g.toLowerCase()+"_ee2fb99c014437125dfe9358e4ea50aa.svg", g);
Rules.set("https://www.gstatic.com/identity/boq/adssettingsui/demographic/i_gender_"+g.toLowerCase()+"_ee2fb99c014437125dfe9358e4ea50aa.svg", g);
}

async function AdPref() {
return await ifCached("https://www.gstatic.com/identity/boq/adssettingsui/demographic/i_age_ee6695b8688539f7175e364579d4a749.svg");
}

async function GenderDetect() {
setTimeout(async _ => {
var result = await AdPref();
if(!result) {
// Allow JS to finsh
setTimeout(_ => {
alert("Ad personalization is OFF");
}, 50);
return false
setTimeout(async _ => {
var result = await AdPref();
if(!result) {
// Allow JS to finsh
setTimeout(_ => {
alert("Ad personalization is OFF");
}, 50);
return false
}
result = await getWebsites();
var gender = (result.length === 1) ? result[0] : "Rather not say";
// Allow JS to finsh
setTimeout(_ => {
if(result.length > 1) {
alert("Multiple genders cached");
return false
return false
} else {
alert(gender);
return true
return true
}
}, 50)
}, 500)
}, 500)
}
</script>

0 comments on commit 6884d52

Please sign in to comment.