File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,8 +41,6 @@ if ( vAPI.canWASM === false ) {
4141 vAPI . canWASM = csp !== undefined && csp . indexOf ( "'wasm-unsafe-eval'" ) !== - 1 ;
4242}
4343
44- vAPI . supportsUserStylesheets = vAPI . webextFlavor . soup . has ( 'user_stylesheet' ) ;
45-
4644/******************************************************************************/
4745
4846vAPI . app = {
@@ -342,14 +340,9 @@ vAPI.Tabs = class {
342340 }
343341
344342 async insertCSS ( tabId , details ) {
345- if ( vAPI . supportsUserStylesheets ) {
346- details . cssOrigin = 'user' ;
347- }
348- try {
349- await webext . tabs . insertCSS ( ...arguments ) ;
350- }
351- catch {
352- }
343+ details . cssOrigin = 'user' ;
344+ try { await webext . tabs . insertCSS ( ...arguments ) ; }
345+ catch { }
353346 }
354347
355348 async query ( queryInfo ) {
@@ -363,14 +356,9 @@ vAPI.Tabs = class {
363356 }
364357
365358 async removeCSS ( tabId , details ) {
366- if ( vAPI . supportsUserStylesheets ) {
367- details . cssOrigin = 'user' ;
368- }
369- try {
370- await webext . tabs . removeCSS ( ...arguments ) ;
371- }
372- catch {
373- }
359+ details . cssOrigin = 'user' ;
360+ try { await webext . tabs . removeCSS ( ...arguments ) ; }
361+ catch { }
374362 }
375363
376364 // Properties of the details object:
Original file line number Diff line number Diff line change @@ -186,15 +186,13 @@ vAPI.webextFlavor = {
186186 flavor . isGecko = extensionOrigin . startsWith ( 'moz-extension://' ) ;
187187 if ( flavor . isGecko ) {
188188 soup . add ( 'firefox' )
189- . add ( 'user_stylesheet' )
190189 . add ( 'html_filtering' ) ;
191190 const match = / F i r e f o x \/ ( \d + ) / . exec ( ua ) ;
192191 flavor . major = match && parseInt ( match [ 1 ] , 10 ) || 115 ;
193192 } else {
194193 const match = / \b C h r o m (?: e | i u m ) \/ ( \d + ) / . exec ( ua ) ;
195194 if ( match !== null ) {
196- soup . add ( 'chromium' )
197- . add ( 'user_stylesheet' ) ;
195+ soup . add ( 'chromium' ) ;
198196 }
199197 flavor . major = match && parseInt ( match [ 1 ] , 10 ) || 120 ;
200198 // Brave can't be told apart through the user agent string, which is
Original file line number Diff line number Diff line change @@ -327,7 +327,6 @@ async function updateList(list) {
327327 'mv3' ,
328328 'ublock' ,
329329 'ubol' ,
330- 'user_stylesheet' ,
331330 ] ,
332331 } ;
333332 const asset = { urls : [ list . id ] } ;
Original file line number Diff line number Diff line change @@ -82,7 +82,6 @@ const env = [
8282 'mv3' ,
8383 'ublock' ,
8484 'ubol' ,
85- 'user_stylesheet' ,
8685 ...envExtra ,
8786] ;
8887
Original file line number Diff line number Diff line change @@ -4240,7 +4240,6 @@ export const utils = (( ) => {
42404240 [ 'env_mv3' , 'mv3' ] ,
42414241 [ 'env_safari' , 'safari' ] ,
42424242 [ 'cap_html_filtering' , 'html_filtering' ] ,
4243- [ 'cap_user_stylesheet' , 'user_stylesheet' ] ,
42444243 [ 'cap_ipaddress' , 'ipaddress' ] ,
42454244 [ 'false' , 'false' ] ,
42464245 // Hoping ABP-only list maintainers can at least make use of it to
You can’t perform that action at this time.
0 commit comments