mirror of https://github.com/gorhill/uBlock.git
this fixes #16: don't mix with window.addEventListener('load')
This commit is contained in:
parent
a58097b8cd
commit
059ff13407
|
@ -76,9 +76,9 @@ iframe {
|
|||
<div id="dashboard-nav">
|
||||
<div id="dashboard-nav-widgets">
|
||||
<span>µBlock</span>
|
||||
<a class="tabButton" id="settings" href="#settings" data-dashboard-panel-url="settings.html" data-i18n="settingsPageName"></a>
|
||||
<a class="tabButton" id="thirdparty-filters" href="#thirdparty-filters" data-dashboard-panel-url="3p-filters.html" data-i18n="3pPageName"></a>
|
||||
<a class="tabButton" id="firstparty-filters" href="#firstparty-filters" data-dashboard-panel-url="1p-filters.html" data-i18n="1pPageName"></a>
|
||||
<a class="tabButton" id="settings" href="#settings" data-dashboard-panel-url="settings.html" data-i18n="settingsPageName"></a>
|
||||
<a class="tabButton" id="about" href="#about" data-dashboard-panel-url="about.html" data-i18n="aboutPageName"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
/******************************************************************************/
|
||||
|
||||
$(function() {
|
||||
window.addEventListener('load', function() {
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
|
|
|
@ -52,14 +52,9 @@ return {
|
|||
// 3rd-party lists fetched dynamically
|
||||
},
|
||||
|
||||
// urls stats are kept on the back burner while waiting to be reactivated
|
||||
// in a tab or another.
|
||||
pageStores: {},
|
||||
pageStoreDump: {},
|
||||
|
||||
// Power switch to disengage µBlock
|
||||
off: false,
|
||||
|
||||
storageQuota: chrome.storage.local.QUOTA_BYTES,
|
||||
storageUsed: 0,
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
/******************************************************************************/
|
||||
|
||||
$(function() {
|
||||
window.addEventListener('load', function() {
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
|
@ -35,7 +35,6 @@ $('.whatisthis').on('click', function() {
|
|||
.toggleClass('whatisthis-expanded');
|
||||
});
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
});
|
||||
|
|
|
@ -45,7 +45,7 @@ $(function() {
|
|||
$(window).on('hashchange', onTabClickHandler);
|
||||
var hash = window.location.hash;
|
||||
if ( hash.length < 2 ) {
|
||||
hash = '#settings';
|
||||
hash = '#thirdparty-filters';
|
||||
}
|
||||
loadDashboardPanel(hash);
|
||||
});
|
||||
|
|
11
js/ublock.js
11
js/ublock.js
|
@ -121,9 +121,8 @@
|
|||
|
||||
// Pre-change
|
||||
switch ( name ) {
|
||||
|
||||
default:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Change
|
||||
|
@ -131,9 +130,8 @@
|
|||
|
||||
// Post-change
|
||||
switch ( name ) {
|
||||
|
||||
default:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
µb.saveUserSettings();
|
||||
|
@ -179,4 +177,3 @@
|
|||
}
|
||||
return s;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue