mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
14 lines
493 B
TypeScript
14 lines
493 B
TypeScript
import type { Page } from 'playwright-core';
|
|
|
|
export default async function insertAdPlaceholder(page: Page) {
|
|
await page.waitForSelector('#adBanner', { state: 'attached' });
|
|
await page.evaluate(() => {
|
|
const adContainer = document.getElementById('adBanner');
|
|
const adReplacer = document.createElement('div');
|
|
adReplacer.style.width = '200px';
|
|
adReplacer.style.height = '100%';
|
|
adReplacer.style.background = '#f00';
|
|
adContainer?.replaceChildren(adReplacer);
|
|
});
|
|
}
|