mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
[mv3] Decrease granularity of hashes of generic cosmetic selectors
This reduces the size of content scripts with no downside.
This commit is contained in:
parent
4ee38a056e
commit
be14670b76
2 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
|
|
|||
Loading…
Reference in a new issue