mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-13 07:35:33 +03:00
chore: rename popout.html to snapshot.html in trace viewer (#23842)
Turns out its caused by a uBlockOrigin EasyList entry which thinks we
are an ad since we call ourselves "popout.html". See this entry:
e7883cfe74/easylist/easylist_general_block_popup.txt (L42)
Fixes https://github.com/microsoft/playwright/issues/23799
This commit is contained in:
parent
752176fd23
commit
605dfde2be
@ -353,10 +353,10 @@ function rewriteURLsInStyleSheetForCustomProtocol(text: string): string {
|
||||
});
|
||||
}
|
||||
|
||||
// <base>/popout.html?r=<snapshotUrl> is used for "pop out snapshot" feature.
|
||||
// <base>/snapshot.html?r=<snapshotUrl> is used for "pop out snapshot" feature.
|
||||
export function unwrapPopoutUrl(url: string) {
|
||||
const u = new URL(url);
|
||||
if (u.pathname.endsWith('/popout.html'))
|
||||
if (u.pathname.endsWith('/snapshot.html'))
|
||||
return u.searchParams.get('r')!;
|
||||
return url;
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ export const SnapshotTab: React.FunctionComponent<{
|
||||
const popoutParams = new URLSearchParams();
|
||||
popoutParams.set('r', snapshotUrl);
|
||||
popoutParams.set('trace', context(snapshot.action).traceUrl);
|
||||
const popoutUrl = new URL(`popout.html?${popoutParams.toString()}`, window.location.href).toString();
|
||||
const popoutUrl = new URL(`snapshot.html?${popoutParams.toString()}`, window.location.href).toString();
|
||||
return { snapshots, snapshotInfoUrl, snapshotUrl, pointX, pointY, popoutUrl };
|
||||
}, [snapshots, snapshotTab]);
|
||||
|
||||
|
@ -45,7 +45,7 @@ export default defineConfig({
|
||||
input: {
|
||||
index: path.resolve(__dirname, 'index.html'),
|
||||
uiMode: path.resolve(__dirname, 'uiMode.html'),
|
||||
popout: path.resolve(__dirname, 'popout.html'),
|
||||
snapshot: path.resolve(__dirname, 'snapshot.html'),
|
||||
},
|
||||
output: {
|
||||
entryFileNames: () => '[name].[hash].js',
|
||||
|
Loading…
Reference in New Issue
Block a user