mirror of https://github.com/gorhill/uBlock.git
code review for #3428
This commit is contained in:
parent
7f41875cca
commit
0414ce80a0
|
@ -48,7 +48,9 @@ var removeAllChildren = logger.removeAllChildren = function(node) {
|
||||||
|
|
||||||
var tabIdFromClassName = function(className) {
|
var tabIdFromClassName = function(className) {
|
||||||
var matches = className.match(/\btab_([^ ]+)\b/);
|
var matches = className.match(/\btab_([^ ]+)\b/);
|
||||||
return matches !== null ? matches[1] : '';
|
if ( matches === null ) { return 0; }
|
||||||
|
if ( matches[1] === 'bts' ) { return -1; }
|
||||||
|
return parseInt(matches[1], 10);
|
||||||
};
|
};
|
||||||
|
|
||||||
var tabIdFromPageSelector = logger.tabIdFromPageSelector = function() {
|
var tabIdFromPageSelector = logger.tabIdFromPageSelector = function() {
|
||||||
|
@ -1609,12 +1611,7 @@ var popupManager = (function() {
|
||||||
var toggleOn = function(td) {
|
var toggleOn = function(td) {
|
||||||
var tr = td.parentNode;
|
var tr = td.parentNode;
|
||||||
realTabId = localTabId = tabIdFromClassName(tr.className);
|
realTabId = localTabId = tabIdFromClassName(tr.className);
|
||||||
if ( realTabId === '' ) {
|
if ( realTabId === 0 ) { return; }
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ( localTabId === 'bts' ) {
|
|
||||||
realTabId = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
container = uDom.nodeFromId('popupContainer');
|
container = uDom.nodeFromId('popupContainer');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue