New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests for implementation on manifest v3 #2189
Comments
Timelinehttps://developer.chrome.com/docs/extensions/mv3/mv2-sunset/
AdNauseam timelineThe fact that AdNauseam is not on chrome store gives us more time than uBlock Origin for sure, but still means that we should have a ready stable solution as soon as possible after June 2023. |
|
It seems that we would have to implement ad-detection around this function (among others) const uBOL_processNodes = ( ) => {
const t0 = Date.now();
const hashes = [];
const nodes = [];
const deadline = t0 + maxSurveyTimeSlice;
for (;;) {
pendingNodes.next(nodes);
if ( nodes.length === 0 ) { break; }
for ( const node of nodes ) {
uBOL_idFromNode(node, hashes);
uBOL_classesFromNode(node, hashes);
}
nodes.length = 0;
if ( performance.now() >= deadline ) { break; }
}
for ( const hash of hashes ) {
const selectorList = genericSelectorMap.get(hash);
if ( selectorList === undefined ) { continue; }
styleSheetSelectors.push(selectorList);
genericSelectorMap.delete(hash);
}
surveyCount += 1;
if ( styleSheetSelectors.length === 0 ) {
surveyMissCount += 1;
if (
surveyCount >= 100 &&
(surveyMissCount / surveyCount) >= stopAllRatio
) {
stopAll(`too many misses in surveyor (${surveyMissCount}/${surveyCount})`);
}
return;
}
if ( styleSheetTimer !== undefined ) { return; }
styleSheetTimer = self.requestAnimationFrame(( ) => {
styleSheetTimer = undefined;
uBOL_injectStyleSheet();
});
}; |
AdVaulthttps://developer.chrome.com/docs/extensions/mv3/migrating_to_service_workers/#state It seems that on v3 there is no persistent state for the Service Workers (read above). The stored data would need to be stored in using the Chrome Storage API, e.g.: // background.js
chrome.runtime.onMessage.addListener(({ type, name }) => {
if (type === "set-name") {
chrome.storage.local.set({ name });
}
});
chrome.action.onClicked.addListener((tab) => {
chrome.storage.local.get(["name"], ({ name }) => {
chrome.tabs.sendMessage(tab.id, { name });
});
});
[#](https://developer.chrome.com/docs/extensions/mv3/migrating_to_service_workers/#alarms) |
|
My feeling is that if it is easy to do, then we can consider the changes listed above. But I don't think we have the bandwidth for major changes, especially as we are not in the Chrome store anyhow. Not to mention the maintenance resources to support multiple versions (lite and regular). AdNauseam will work, as is, until at least June 2023, when Google may or may not start disabling MV2 extensions. Between then and now it might be a better use of our time to focus on support for other chromium-based browsers |
BraveIt seems that Brave intends to support v2 manifest version, and perhaps even have their own web extension store seprate from Chrome: brave/brave-browser#20059 (comment)
|
|
Just discovered this, think it's a great project! I'm also curious now that we're at the end of June 2023 if there's been any progress or updates on the status of moving to mv3? Based on the reading I've done it seems like it will create a lot of limitations/reworking of the extension, but was just wondering if any work has been done to prep for this change as of yet? |
|
I understand that new Adnauseam Lite will be developed and it is quite different from the original one. Will this addon appear on chrome store? |



Tests for implementation on manifest v3.
Some things we need to understand before attempting an implementation of "AdNauseam Lite":
We should somehow attempt to test these things on the UBOLite build, even though it is rather at an early stage at the moment.
Links:
The text was updated successfully, but these errors were encountered: