Skip to content

Commit

Permalink
Disable app ads clicks
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically committed Nov 12, 2024
1 parent 7bb3059 commit 5ab1263
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions apps/frontend/src/public/promo-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,22 @@
]);
});

window.addEventListener(
"message",
(event) => {
if (event.data.modrinthAdClick && window.__TAURI_INTERNALS__) {
window.__TAURI_INTERNALS__.invoke("plugin:ads|record_ads_click", {});
}

if (event.data.modrinthOpenUrl && window.__TAURI_INTERNALS__) {
window.__TAURI_INTERNALS__.invoke("plugin:ads|open_link", {
path: event.data.modrinthOpenUrl,
origin: event.origin,
});
}
},
false,
);
// window.addEventListener(
// "message",
// (event) => {
// if (event.data.modrinthAdClick && window.__TAURI_INTERNALS__) {
// window.__TAURI_INTERNALS__.invoke("plugin:ads|record_ads_click", {});
// }
//
// if (event.data.modrinthOpenUrl && window.__TAURI_INTERNALS__) {
// window.__TAURI_INTERNALS__.invoke("plugin:ads|open_link", {
// path: event.data.modrinthOpenUrl,
// origin: event.origin,
// });
// }
// },
// false,
// );

window.addEventListener("mousewheel", (event) => {
if (window.__TAURI_INTERNALS__) {
Expand Down

0 comments on commit 5ab1263

Please sign in to comment.