-
Notifications
You must be signed in to change notification settings - Fork 115
Open
Description
const adsEnabled = async () => {
let ads = true;
try {
const url = `https://ads.google.com?=${new Date().getTime()}`;
await fetch(url, { mode: "no-cors" });
} catch (error) {
if (error.message === "Failed to fetch") {
ads = false;
}
}
return ads;
};
// check
const isAdEnabled = await adsEnabled();
console.log(isAdEnabled);
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels