@@ -111,33 +111,16 @@ const onVersionReady = function(lastVersion) {
111
111
µb . redirectEngine . invalidateResourcesSelfie ( ) ;
112
112
113
113
const lastVersionInt = vAPI . app . intFromVersion ( lastVersion ) ;
114
+ if ( lastVersionInt === 0 ) { return ; }
114
115
115
- // https://github.com/uBlockOrigin/uBlock-issues /issues/494
116
- // Remove useless per-site switches .
117
- if ( lastVersionInt <= 1019003007 ) {
118
- µb . sessionSwitches . toggle ( 'no-scripting ' , 'behind-the-scene ' , 0 ) ;
119
- µb . permanentSwitches . toggle ( 'no-scripting ' , 'behind-the-scene ' , 0 ) ;
116
+ // https://github.com/LiCybora/NanoDefenderFirefox /issues/196
117
+ // Toggle on the blocking of CSP reports by default .
118
+ if ( lastVersionInt <= 1031003011 ) {
119
+ µb . sessionSwitches . toggle ( 'no-csp-reports ' , '* ' , 1 ) ;
120
+ µb . permanentSwitches . toggle ( 'no-csp-reports ' , '* ' , 1 ) ;
120
121
µb . saveHostnameSwitches ( ) ;
121
122
}
122
123
123
- // Configure new popup panel according to classic popup panel
124
- // configuration.
125
- if ( lastVersionInt !== 0 ) {
126
- if ( lastVersionInt <= 1026003014 ) {
127
- µb . userSettings . popupPanelSections =
128
- µb . userSettings . dynamicFilteringEnabled === true ? 0b11111 : 0b01111 ;
129
- µb . userSettings . dynamicFilteringEnabled = undefined ;
130
- µb . saveUserSettings ( ) ;
131
- } else if (
132
- lastVersionInt <= 1026003016 &&
133
- ( µb . userSettings . popupPanelSections & 1 ) !== 0
134
- ) {
135
- µb . userSettings . popupPanelSections =
136
- ( µb . userSettings . popupPanelSections << 1 | 1 ) & 0b111111 ;
137
- µb . saveUserSettings ( ) ;
138
- }
139
- }
140
-
141
124
vAPI . storage . set ( { version : vAPI . app . version } ) ;
142
125
} ;
143
126
@@ -240,13 +223,14 @@ const fromFetch = function(to, fetched) {
240
223
const createDefaultProps = function ( ) {
241
224
const fetchableProps = {
242
225
'dynamicFilteringString' : [
226
+ 'no-csp-reports: * true' ,
243
227
'behind-the-scene * * noop' ,
244
228
'behind-the-scene * image noop' ,
245
229
'behind-the-scene * 3p noop' ,
246
230
'behind-the-scene * inline-script noop' ,
247
231
'behind-the-scene * 1p-script noop' ,
248
232
'behind-the-scene * 3p-script noop' ,
249
- 'behind-the-scene * 3p-frame noop'
233
+ 'behind-the-scene * 3p-frame noop' ,
250
234
] . join ( '\n' ) ,
251
235
'urlFilteringString' : '' ,
252
236
'hostnameSwitchesString' : [
0 commit comments