mirror of https://github.com/gorhill/uBlock.git
fixed tab selection glitch
This commit is contained in:
parent
b63995e556
commit
3bf825b4e8
|
@ -25,12 +25,13 @@
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
var loadDashboardPanel = function(tab) {
|
var loadDashboardPanel = function(tab, q) {
|
||||||
var tabButton = uDom('[data-dashboard-panel-url="' + tab + '"]');
|
var tabButton = uDom('[data-dashboard-panel-url="' + tab + '"]');
|
||||||
if ( !tabButton ) {
|
if ( !tabButton ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
uDom('iframe').attr('src', tab);
|
q = q || '';
|
||||||
|
uDom('iframe').attr('src', tab + q);
|
||||||
uDom('.tabButton').toggleClass('selected', false);
|
uDom('.tabButton').toggleClass('selected', false);
|
||||||
tabButton.toggleClass('selected', true);
|
tabButton.toggleClass('selected', true);
|
||||||
};
|
};
|
||||||
|
@ -56,7 +57,7 @@ uDom.onLoad(function() {
|
||||||
if ( !tab ) {
|
if ( !tab ) {
|
||||||
tab = '3p-filters';
|
tab = '3p-filters';
|
||||||
}
|
}
|
||||||
loadDashboardPanel(tab + '.html' + q);
|
loadDashboardPanel(tab + '.html', q);
|
||||||
uDom('.tabButton').on('click', onTabClickHandler);
|
uDom('.tabButton').on('click', onTabClickHandler);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue