@@ -115,19 +115,38 @@ var onVersionReady = function(lastVersion) {
115
115
// certainly cause too much breakage in Firefox legacy given that uBO can
116
116
// see ALL network requests.
117
117
// Remove when everybody is beyond 1.15.19b8.
118
- if ( vAPI . firefox === undefined ) {
119
- var match = / ^ ( \d + ) \. ( \d + ) \. ( \d + ) (?: \D + ( \d + ) ) ? / . exec ( lastVersion ) ;
120
- if ( match !== null ) {
121
- var v1 =
122
- parseInt ( match [ 1 ] , 10 ) * 1000 * 1000 * 1000 +
123
- parseInt ( match [ 2 ] , 10 ) * 1000 * 1000 +
124
- parseInt ( match [ 3 ] , 10 ) * 1000 +
125
- ( match [ 4 ] ? parseInt ( match [ 4 ] , 10 ) : 0 ) ;
126
- if ( v1 <= 1015019008 ) {
127
- µb . toggleNetFilteringSwitch ( 'http://behind-the-scene/' , '' , true ) ;
128
- }
118
+ ( function patch1015019008 ( s ) {
119
+ if ( vAPI . firefox !== undefined ) { return ; }
120
+ var match = / ^ ( \d + ) \. ( \d + ) \. ( \d + ) (?: \D + ( \d + ) ) ? / . exec ( s ) ;
121
+ if ( match === null ) { return ; }
122
+ var v =
123
+ parseInt ( match [ 1 ] , 10 ) * 1000 * 1000 * 1000 +
124
+ parseInt ( match [ 2 ] , 10 ) * 1000 * 1000 +
125
+ parseInt ( match [ 3 ] , 10 ) * 1000 +
126
+ ( match [ 4 ] ? parseInt ( match [ 4 ] , 10 ) : 0 ) ;
127
+ if ( / r c \d + $ / . test ( s ) ) { v += 100 ; }
128
+ if ( v > 1015019008 ) { return ; }
129
+ if ( µb . getNetFilteringSwitch ( 'http://behind-the-scene/' ) !== true ) {
130
+ return ;
129
131
}
130
- }
132
+ var fwRules = [
133
+ 'behind-the-scene * * noop' ,
134
+ 'behind-the-scene * image noop' ,
135
+ 'behind-the-scene * 3p noop' ,
136
+ 'behind-the-scene * inline-script noop' ,
137
+ 'behind-the-scene * 1p-script noop' ,
138
+ 'behind-the-scene * 3p-script noop' ,
139
+ 'behind-the-scene * 3p-frame noop'
140
+ ] . join ( '\n' ) ;
141
+ µb . sessionFirewall . fromString ( fwRules , true ) ;
142
+ µb . permanentFirewall . fromString ( fwRules , true ) ;
143
+ µb . savePermanentFirewallRules ( ) ;
144
+ µb . hnSwitches . fromString ( [
145
+ 'behind-the-scene: no-large-media false'
146
+ ] . join ( '\n' ) , true ) ;
147
+ µb . saveHostnameSwitches ( ) ;
148
+ µb . toggleNetFilteringSwitch ( 'http://behind-the-scene/' , '' , true ) ;
149
+ } ) ( lastVersion ) ;
131
150
132
151
vAPI . storage . set ( { version : vAPI . app . version } ) ;
133
152
} ;
@@ -271,9 +290,19 @@ var fromFetch = function(to, fetched) {
271
290
var onSelectedFilterListsLoaded = function ( ) {
272
291
var fetchableProps = {
273
292
'compiledMagic' : '' ,
274
- 'dynamicFilteringString' : 'behind-the-scene * 3p noop\nbehind-the-scene * 3p-frame noop' ,
293
+ 'dynamicFilteringString' : [
294
+ 'behind-the-scene * * noop' ,
295
+ 'behind-the-scene * image noop' ,
296
+ 'behind-the-scene * 3p noop' ,
297
+ 'behind-the-scene * inline-script noop' ,
298
+ 'behind-the-scene * 1p-script noop' ,
299
+ 'behind-the-scene * 3p-script noop' ,
300
+ 'behind-the-scene * 3p-frame noop'
301
+ ] . join ( '\n' ) ,
275
302
'urlFilteringString' : '' ,
276
- 'hostnameSwitchesString' : '' ,
303
+ 'hostnameSwitchesString' : [
304
+ 'behind-the-scene: no-large-media false'
305
+ ] . join ( '\n' ) ,
277
306
'lastRestoreFile' : '' ,
278
307
'lastRestoreTime' : 0 ,
279
308
'lastBackupFile' : '' ,
0 commit comments