this fixes #16: don't mix with window.addEventListener('load')

This commit is contained in:
gorhill 2014-06-26 09:46:38 -04:00
parent a58097b8cd
commit 059ff13407
6 changed files with 8 additions and 17 deletions

View File

@ -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>

View File

@ -23,7 +23,7 @@
/******************************************************************************/
$(function() {
window.addEventListener('load', function() {
/******************************************************************************/

View File

@ -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,

View File

@ -21,7 +21,7 @@
/******************************************************************************/
$(function() {
window.addEventListener('load', function() {
/******************************************************************************/
@ -35,7 +35,6 @@ $('.whatisthis').on('click', function() {
.toggleClass('whatisthis-expanded');
});
/******************************************************************************/
});

View File

@ -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);
});

View File

@ -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;
};