mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-21 07:46:15 +08:00
showing consent in both ad controllers
This commit is contained in:
parent
ce82379dce
commit
1157f1e7c0
|
@ -256,6 +256,17 @@ export function updateTestPageAds(visible: boolean): void {
|
|||
}
|
||||
}
|
||||
|
||||
export function showConsentPopup(): void {
|
||||
if (choice === "eg") {
|
||||
//@ts-ignore
|
||||
window.__tcfapi("displayConsentUi", 2, function () {
|
||||
//
|
||||
});
|
||||
} else {
|
||||
//todo
|
||||
}
|
||||
}
|
||||
|
||||
export function destroyResult(): void {
|
||||
// $("#ad-result-wrapper").empty();
|
||||
// $("#ad-result-small-wrapper").empty();
|
||||
|
|
|
@ -3,6 +3,7 @@ import { focusWords } from "../test/test-ui";
|
|||
import * as Notifications from "../elements/notifications";
|
||||
import * as Skeleton from "./skeleton";
|
||||
import { isPopupVisible } from "../utils/misc";
|
||||
import * as AdController from "../controllers/ad-controller";
|
||||
|
||||
const wrapperId = "cookiePopupWrapper";
|
||||
|
||||
|
@ -148,10 +149,7 @@ $(document).on("keypress", (e) => {
|
|||
|
||||
$("#cookiePopup .cookie.ads .textButton").on("click", () => {
|
||||
try {
|
||||
//@ts-ignore
|
||||
window.__tcfapi("displayConsentUi", 2, function () {
|
||||
//
|
||||
});
|
||||
AdController.showConsentPopup();
|
||||
} catch (e) {
|
||||
console.error("Failed to open ad consent UI");
|
||||
Notifications.add(
|
||||
|
|
Loading…
Reference in a new issue