File tree Expand file tree Collapse file tree 6 files changed +19
-8
lines changed Expand file tree Collapse file tree 6 files changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ body.needSave #revertRules {
211
211
font-size : 1.6em ;
212
212
}
213
213
214
- # basicTools : not (.canPick ) . needPick {
214
+ # basicTools . needPick : not (.canPick ) {
215
215
visibility : hidden;
216
216
}
217
217
Original file line number Diff line number Diff line change @@ -139,6 +139,8 @@ vAPI.commands.onCommand.addListener(async command => {
139
139
140
140
switch ( command ) {
141
141
case 'launch-element-picker' :
142
+ if ( µb . userFiltersAreEnabled ( ) === false ) { break ; }
143
+ /* fall through */
142
144
case 'launch-element-zapper' : {
143
145
µb . epickerArgs . mouse = false ;
144
146
µb . elementPickerExec (
Original file line number Diff line number Diff line change @@ -200,7 +200,11 @@ let currentBits = 0;
200
200
201
201
const update = function ( tabId = undefined ) {
202
202
let newBits = 0 ;
203
- if ( µb . userSettings . contextMenuEnabled && tabId !== undefined ) {
203
+ if (
204
+ µb . userSettings . contextMenuEnabled &&
205
+ µb . userFiltersAreEnabled ( ) &&
206
+ tabId !== undefined
207
+ ) {
204
208
const pageStore = µb . pageStoreFromTabId ( tabId ) ;
205
209
if ( pageStore && pageStore . getNetFilteringSwitch ( ) ) {
206
210
if ( pageStore . shouldApplySpecificCosmeticFilters ( 0 ) ) {
Original file line number Diff line number Diff line change @@ -369,6 +369,7 @@ const popupDataFromTabId = function(tabId, tabTitle) {
369
369
fontSize : µbhs . popupFontSize ,
370
370
godMode : µbhs . filterAuthorMode ,
371
371
netFilteringSwitch : false ,
372
+ userFiltersAreEnabled : µb . userFiltersAreEnabled ( ) ,
372
373
rawURL : tabContext . rawURL ,
373
374
pageURL : tabContext . normalURL ,
374
375
pageHostname : rootHostname ,
Original file line number Diff line number Diff line change @@ -614,11 +614,11 @@ const renderPopup = function() {
614
614
}
615
615
}
616
616
617
- dom . cl . toggle (
618
- '#basicTools' ,
619
- 'canPick' ,
620
- popupData . canElementPicker === true && isFiltering
621
- ) ;
617
+ const canPick = popupData . canElementPicker && isFiltering ;
618
+
619
+ dom . cl . toggle ( '#gotoZap' , 'canPick' , canPick ) ;
620
+ dom . cl . toggle ( '#gotoPick' , 'canPick' , canPick && popupData . userFiltersAreEnabled ) ;
621
+ dom . cl . toggle ( '#gotoReport' , 'canPick' , canPick ) ;
622
622
623
623
let blocked , total ;
624
624
if ( popupData . pageCounts !== undefined ) {
@@ -675,7 +675,7 @@ const renderPopup = function() {
675
675
total ? Math . min ( total , 99 ) . toLocaleString ( ) : ''
676
676
) ;
677
677
678
- // Unprocesseed request(s) warning
678
+ // Unprocessed request(s) warning
679
679
dom . cl . toggle ( dom . root , 'warn' , popupData . hasUnprocessedRequest === true ) ;
680
680
681
681
dom . cl . toggle ( dom . html , 'colorBlind' , popupData . colorBlindFriendly === true ) ;
Original file line number Diff line number Diff line change @@ -628,6 +628,10 @@ onBroadcast(msg => {
628
628
) ;
629
629
} ;
630
630
631
+ µb . userFiltersAreEnabled = function ( ) {
632
+ return this . selectedFilterLists . includes ( this . userFiltersPath ) ;
633
+ } ;
634
+
631
635
/******************************************************************************/
632
636
633
637
µb . autoSelectRegionalFilterLists = function ( lists ) {
You can’t perform that action at this time.
0 commit comments