From 059ff13407d8558273df88bbee65f9d311b6a5c0 Mon Sep 17 00:00:00 2001 From: gorhill Date: Thu, 26 Jun 2014 09:46:38 -0400 Subject: [PATCH] this fixes #16: don't mix with window.addEventListener('load') --- dashboard.html | 2 +- js/about.js | 2 +- js/background.js | 5 ----- js/dashboard-common.js | 3 +-- js/dashboard.js | 2 +- js/ublock.js | 11 ++++------- 6 files changed, 8 insertions(+), 17 deletions(-) diff --git a/dashboard.html b/dashboard.html index 9f2b69c05..434fd85b2 100644 --- a/dashboard.html +++ b/dashboard.html @@ -76,9 +76,9 @@ iframe {
µBlock - +
diff --git a/js/about.js b/js/about.js index a89bc202d..49a38d207 100644 --- a/js/about.js +++ b/js/about.js @@ -23,7 +23,7 @@ /******************************************************************************/ -$(function() { +window.addEventListener('load', function() { /******************************************************************************/ diff --git a/js/background.js b/js/background.js index 0ef8e0327..7974539f9 100644 --- a/js/background.js +++ b/js/background.js @@ -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, diff --git a/js/dashboard-common.js b/js/dashboard-common.js index fabc7e413..c950a9a8a 100644 --- a/js/dashboard-common.js +++ b/js/dashboard-common.js @@ -21,7 +21,7 @@ /******************************************************************************/ -$(function() { +window.addEventListener('load', function() { /******************************************************************************/ @@ -35,7 +35,6 @@ $('.whatisthis').on('click', function() { .toggleClass('whatisthis-expanded'); }); - /******************************************************************************/ }); diff --git a/js/dashboard.js b/js/dashboard.js index 12029fd48..7caac69de 100644 --- a/js/dashboard.js +++ b/js/dashboard.js @@ -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); }); diff --git a/js/ublock.js b/js/ublock.js index de95047eb..cab1a6233 100644 --- a/js/ublock.js +++ b/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; }; -