-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Testing setup * Remove dead code * Page store: prevent Firefox bug breaking previous page chain * Update packages/reporting/src/webrequest-pipeline/page-store.js Co-authored-by: Philipp Claßen <philipp.classen@posteo.de> --------- Co-authored-by: Philipp Claßen <philipp.classen@posteo.de>
- Loading branch information
1 parent
c7449af
commit 3b68b58
Showing
9 changed files
with
90 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>wtm/reporting inspector</title> | ||
<script type="module" src="./index.js"></script> | ||
</head> | ||
<body> | ||
<h1>WTM Reporting Inspector</h1> | ||
<label for="filter">Filter:</label><input id="filter" type="text"/> | ||
<section> | ||
<h2>Page Store</h2> | ||
<pre id="page-store"></pre> | ||
</section> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
const browser = globalThis.browser || globalThis.chrome; | ||
const $container = document.querySelector('#page-store'); | ||
const $filter = document.querySelector('#filter'); | ||
|
||
$filter.value = localStorage.filter || ''; | ||
$filter.addEventListener('input', () => { | ||
localStorage.filter = $filter.value; | ||
}); | ||
|
||
async function render() { | ||
let { tabs } = await browser.runtime.sendMessage({ action: 'debug' }); | ||
|
||
if (localStorage.filter) { | ||
const matchById = tabs.find( | ||
(tab) => tab.id === Number(localStorage.filter), | ||
); | ||
|
||
tabs = matchById | ||
? [matchById] | ||
: tabs.filter((tab) => tab.url.includes(localStorage.filter)); | ||
} | ||
$container.innerHTML = JSON.stringify(tabs, null, 2); | ||
} | ||
|
||
await render(); | ||
|
||
setInterval(render, 500); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>wtm/reporting test1</title> | ||
</head> | ||
<body> | ||
<a href="https://ghostery.com" id="a">go to ghostery.com (forces process switch on Firefox)</a> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters