mirror of https://github.com/gorhill/uBlock.git
code review
This commit is contained in:
parent
8b1ecfc09c
commit
c15a943ec0
|
@ -34,7 +34,7 @@ body {
|
||||||
#toolbar .button:hover {
|
#toolbar .button:hover {
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
}
|
}
|
||||||
#toolbar #filterButton.off {
|
body.filterOff #toolbar #filterButton {
|
||||||
opacity: 0.25;
|
opacity: 0.25;
|
||||||
}
|
}
|
||||||
#content {
|
#content {
|
||||||
|
@ -58,7 +58,7 @@ body {
|
||||||
#content table tr.maindoc {
|
#content table tr.maindoc {
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
}
|
}
|
||||||
#content table tr.hidden {
|
body:not(.filterOff) #content table tr.hidden {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
#content table tr td {
|
#content table tr td {
|
||||||
|
|
|
@ -245,16 +245,13 @@ var unapplyFilter = function() {
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
var onFilterButton = function() {
|
var onFilterButton = function() {
|
||||||
uDom('#filterButton').toggleClass('off');
|
uDom('body').toggleClass('filterOff');
|
||||||
onFilterChanged();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
var onFilterChanged = function() {
|
var onFilterChanged = function() {
|
||||||
var filterRaw = uDom('#filterButton').hasClass('off') ?
|
var filterRaw = uDom('#filterExpression').val().trim();
|
||||||
'' :
|
|
||||||
uDom('#filterExpression').val().trim();
|
|
||||||
|
|
||||||
if ( filterRaw === '') {
|
if ( filterRaw === '') {
|
||||||
reFilter = null;
|
reFilter = null;
|
||||||
|
|
Loading…
Reference in New Issue