A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/gorhill/uBlock/commit/35aefed92616cbfb75f12f37c7ea7fb3a3cc3369 below:

Add support to chain `:style()` to procedural operators · gorhill/uBlock@35aefed · GitHub

File tree Expand file treeCollapse file tree 11 files changed

+281

-472

lines changed

Filter options

Expand file treeCollapse file tree 11 files changed

+281

-472

lines changed Original file line number Diff line number Diff line change

@@ -56,6 +56,16 @@ window.addEventListener('webextFlavor', function() {

56 56 57 57

/******************************************************************************/

58 58 59 +

vAPI.randomToken = function() {

60 +

const n = Math.random();

61 +

return String.fromCharCode(n * 26 + 97) +

62 +

Math.floor(

63 +

(0.25 + n * 0.75) * Number.MAX_SAFE_INTEGER

64 +

).toString(36).slice(-8);

65 +

};

66 + 67 +

/******************************************************************************/

68 + 59 69

vAPI.app = {

60 70

name: manifest.name.replace(/ dev\w+ build/, ''),

61 71

version: (( ) => {

@@ -339,7 +349,10 @@ vAPI.Tabs = class {

339 349

return tabs.length !== 0 ? tabs[0] : null;

340 350

}

341 351 342 -

async insertCSS() {

352 +

async insertCSS(tabId, details) {

353 +

if ( vAPI.supportsUserStylesheets ) {

354 +

details.cssOrigin = 'user';

355 +

}

343 356

try {

344 357

await webext.tabs.insertCSS(...arguments);

345 358

}

@@ -357,7 +370,10 @@ vAPI.Tabs = class {

357 370

return Array.isArray(tabs) ? tabs : [];

358 371

}

359 372 360 -

async removeCSS() {

373 +

async removeCSS(tabId, details) {

374 +

if ( vAPI.supportsUserStylesheets ) {

375 +

details.cssOrigin = 'user';

376 +

}

361 377

try {

362 378

await webext.tabs.removeCSS(...arguments);

363 379

}

@@ -1003,9 +1019,6 @@ vAPI.messaging = {

1003 1019

frameId: sender.frameId,

1004 1020

matchAboutBlank: true

1005 1021

};

1006 -

if ( vAPI.supportsUserStylesheets ) {

1007 -

details.cssOrigin = 'user';

1008 -

}

1009 1022

if ( msg.add ) {

1010 1023

details.runAt = 'document_start';

1011 1024

}

Original file line number Diff line number Diff line change

@@ -39,9 +39,11 @@ if (

39 39

/******************************************************************************/

40 40 41 41

vAPI.randomToken = function() {

42 -

const now = Date.now();

43 -

return String.fromCharCode(now % 26 + 97) +

44 -

Math.floor((1 + Math.random()) * now).toString(36);

42 +

const n = Math.random();

43 +

return String.fromCharCode(n * 26 + 97) +

44 +

Math.floor(

45 +

(0.25 + n * 0.75) * Number.MAX_SAFE_INTEGER

46 +

).toString(36).slice(-8);

45 47

};

46 48 47 49

vAPI.sessionId = vAPI.randomToken();

Original file line number Diff line number Diff line change

@@ -138,8 +138,8 @@ const µBlock = (( ) => { // jshint ignore:line

138 138 139 139

// Read-only

140 140

systemSettings: {

141 -

compiledMagic: 28, // Increase when compiled format changes

142 -

selfieMagic: 28, // Increase when selfie format changes

141 +

compiledMagic: 29, // Increase when compiled format changes

142 +

selfieMagic: 29, // Increase when selfie format changes

143 143

},

144 144 145 145

// https://github.com/uBlockOrigin/uBlock-issues/issues/759#issuecomment-546654501

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4