You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
527 B
29 lines
527 B
/** |
|
* This script checks if a site is a gdpr policy. |
|
* It returns true or false |
|
*/ |
|
function checkpolicy(){ |
|
try { |
|
let result = 0; |
|
|
|
let keywords = ["gdpr", "legal", "article", "policy", "privacy", "CCPA"]; |
|
|
|
|
|
$("body *").each(function() { |
|
let tmp = $(this).text().toLowerCase(); |
|
for(let i = 0; i < keywords.length; i++){ |
|
if(tmp.includes(keywords[i])){ |
|
result = result + 1; |
|
} |
|
} |
|
}); |
|
|
|
if(result > 11){ |
|
return true; |
|
} else { |
|
return false; |
|
} |
|
} catch(e) { |
|
console.log(e); |
|
} |
|
} |