go-style switch-case

This commit is contained in:
gorhill 2015-05-19 13:59:53 -04:00
parent 9dc9116fa9
commit 6c3217d9af
1 changed files with 141 additions and 141 deletions

View File

@ -1,7 +1,7 @@
/******************************************************************************* /*******************************************************************************
µBlock - a browser extension to block requests. uBlock - a browser extension to block requests.
Copyright (C) 2014 Raymond Hill Copyright (C) 2014-2015 Raymond Hill
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -66,7 +66,7 @@ var onMessage = function(request, sender, callback) {
/* falls through */ /* falls through */
case 'cosmeticFiltersActivated': case 'cosmeticFiltersActivated':
// Net-based cosmetic filters are of no interest for logging purpose. // Net-based cosmetic filters are of no interest for logging purpose.
if ( µb.logger.isObserved() && request.type !== 'net' ) { if ( µb.logger.isEnabled() && request.type !== 'net' ) {
µb.logCosmeticFilters(tabId); µb.logCosmeticFilters(tabId);
} }
break; break;
@ -555,7 +555,7 @@ var µb = µBlock;
/******************************************************************************/ /******************************************************************************/
var logCosmeticFilters = function(tabId, details) { var logCosmeticFilters = function(tabId, details) {
if ( µb.logger.isObserved() === false ) { if ( µb.logger.isEnabled() === false ) {
return; return;
} }