[mv3] Decrease granularity of hashes of generic cosmetic selectors

This reduces the size of content scripts with no downside.
This commit is contained in:
Raymond Hill 2025-10-04 13:32:16 -04:00
parent 4ee38a056e
commit be14670b76
No known key found for this signature in database
GPG key ID: F5630CAE62A14316
2 changed files with 3 additions and 3 deletions

View file

@ -61,7 +61,7 @@ const hashFromStr = (type, s) => {
for ( let i = 0; i < len; i += step ) {
hash = (hash << 5) + hash ^ s.charCodeAt(i);
}
return hash & 0xFFFFFF;
return hash & 0xFFF;
};
/******************************************************************************/
@ -224,7 +224,7 @@ const uBOL_injectCSS = css => {
/******************************************************************************/
const stopAll = reason => {
const stopAll = ( ) => {
if ( domChangeTimer !== undefined ) {
self.clearTimeout(domChangeTimer);
domChangeTimer = undefined;

View file

@ -757,7 +757,7 @@ const hashFromStr = (type, s) => {
for ( let i = 0; i < len; i += step ) {
hash = (hash << 5) + hash ^ s.charCodeAt(i);
}
return hash & 0xFFFFFF;
return hash & 0xFFF;
};
/******************************************************************************/