diff --git a/_locales/de/messages.json b/_locales/de/messages.json index e9751b777..9e3e8f90c 100644 --- a/_locales/de/messages.json +++ b/_locales/de/messages.json @@ -7,6 +7,10 @@ "message": "Finally, an efficient blocker for Chromium-based browsers. Easy on CPU and memory.", "description": "this will in chrome web store: must be 132 characters or less" }, + "settingsPageName": { + "message": "Einstellungen", + "description": "appears as tab name in dashboard" + }, "3pPageName" : { "message": "3rd-party filters", "description": "appears as tab name in dashboard" @@ -35,6 +39,12 @@ }, + "settingsIconBadgePrompt" : { + "message": "Show the number of blocked requests on the icon", + "description": "English: Show the number of blocked requests on the icon" + }, + + "3pListsOfBlockedHostsPrompt2" : { "message": "{{ubiquitousBlacklistCount}} eindeutig blockierte Hostnamen aus:", "description": "English: {{ubiquitousBlacklistCount}} distinct blocked hostnames from:" diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 854e23622..708677808 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -7,6 +7,10 @@ "message": "Finally, an efficient blocker for Chromium-based browsers. Easy on CPU and memory.", "description": "this will be in the chrome web store: must be 132 characters or less" }, + "settingsPageName": { + "message": "Settings", + "description": "appears as tab name in dashboard." + }, "3pPageName" : { "message": "3rd-party filters", "description": "appears as tab name in dashboard." @@ -35,6 +39,12 @@ }, + "settingsIconBadgePrompt" : { + "message": "Show the number of blocked requests on the icon", + "description": "English: Show the number of blocked requests on the icon" + }, + + "3pListsOfBlockedHostsPrompt2" : { "message": "{{ubiquitousBlacklistCount}} network filters from:", "description": "English: {{ubiquitousBlacklistCount}} network filters from:" diff --git a/_locales/fr/messages.json b/_locales/fr/messages.json index f955e6104..1642abc7c 100644 --- a/_locales/fr/messages.json +++ b/_locales/fr/messages.json @@ -7,6 +7,10 @@ "message": "Finally, an efficient blocker for Chromium-based browsers. Easy on CPU and memory.", "description": "this will in chrome web store: must be 132 characters or less" }, + "settingsPageName": { + "message": "Paramètres", + "description": "appears as tab name in dashboard" + }, "3pPageName" : { "message": "Listes de filtres", "description": "appears as tab name in dashboard" @@ -35,6 +39,12 @@ }, + "settingsIconBadgePrompt" : { + "message": "Afficher le nombre de requêtes bloquées sur l'icône", + "description": "English: Show the number of blocked requests on the icon" + }, + + "3pListsOfBlockedHostsPrompt2" : { "message": "{{ubiquitousBlacklistCount}} filtres actuellement en action :", "description": "English: {{ubiquitousBlacklistCount}} network filters from:" diff --git a/_locales/ru/messages.json b/_locales/ru/messages.json index 6f400f081..7ebdc0827 100644 --- a/_locales/ru/messages.json +++ b/_locales/ru/messages.json @@ -7,6 +7,10 @@ "message": "Finally, an efficient blocker for Chromium-based browsers. Easy on CPU and memory.", "description": "this will in chrome web store: must be 132 characters or less" }, + "settingsPageName": { + "message": "Настройки", + "description": "appears as tab name in dashboard." + }, "3pPageName" : { "message": "Third-party filters", "description": "appears as tab name in dashboard" @@ -35,6 +39,12 @@ }, + "settingsIconBadgePrompt" : { + "message": "Show the number of blocked requests on the icon", + "description": "English: Show the number of blocked requests on the icon" + }, + + "3pListsOfBlockedHostsPrompt2" : { "message": "{{ubiquitousBlacklistCount}} блокируется хостов, помимо:", "description": "English: {{ubiquitousBlacklistCount}} distinct blocked hostnames from:" diff --git a/_locales/zh_CN/messages.json b/_locales/zh_CN/messages.json index 78cff649c..4e8b7d9db 100644 --- a/_locales/zh_CN/messages.json +++ b/_locales/zh_CN/messages.json @@ -7,14 +7,18 @@ "message": "Finally, an efficient blocker for Chromium-based browsers. Easy on CPU and memory.", "description": "this will be in the chrome web store: must be 132 characters or less" }, - "1pPageName" : { - "message": "Your filters", + "settingsPageName": { + "message": "设置", "description": "appears as tab name in dashboard." }, "3pPageName" : { "message": "Third-party filters", "description": "appears as tab name in dashboard." }, + "1pPageName" : { + "message": "Your filters", + "description": "appears as tab name in dashboard." + }, "aboutPageName": { "message": "关于", "description": "appears as tab name in dashboard." @@ -35,6 +39,12 @@ }, + "settingsIconBadgePrompt" : { + "message": "Show the number of blocked requests on the icon", + "description": "English: Show the number of blocked requests on the icon" + }, + + "3pListsOfBlockedHostsPrompt2" : { "message": "共{{ubiquitousBlacklistCount}}个不同的屏蔽站点名,来自:", "description": "English: {{ubiquitousBlacklistCount}} distinct blocked hostnames from:" diff --git a/dashboard.html b/dashboard.html index bfd900192..9f2b69c05 100644 --- a/dashboard.html +++ b/dashboard.html @@ -76,6 +76,7 @@ iframe {
µBlock + diff --git a/img/browsericons/icon19-off.png b/img/browsericons/icon19-off.png index 6a495a622..fe7256482 100644 Binary files a/img/browsericons/icon19-off.png and b/img/browsericons/icon19-off.png differ diff --git a/img/browsericons/icon19.png b/img/browsericons/icon19.png index f91c8ee5e..81c29fb37 100644 Binary files a/img/browsericons/icon19.png and b/img/browsericons/icon19.png differ diff --git a/js/dashboard.js b/js/dashboard.js index 7caac69de..12029fd48 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 = '#thirdparty-filters'; + hash = '#settings'; } loadDashboardPanel(hash); }); diff --git a/js/pagestore.js b/js/pagestore.js index 823f3b987..8921b897d 100644 --- a/js/pagestore.js +++ b/js/pagestore.js @@ -117,13 +117,13 @@ PageStore.prototype.recordRequest = function(type, url, block) { // notifying me, and this causes internal cached state to be out of sync. PageStore.prototype.updateBadge = function() { - var netFilteringSwitch = µBlock.getNetFilteringSwitch(this.pageHostname); + var netFilteringSwitch = µb.getNetFilteringSwitch(this.pageHostname); var iconPath = netFilteringSwitch ? 'img/browsericons/icon19.png' : 'img/browsericons/icon19-off.png'; chrome.browserAction.setIcon({ tabId: this.tabId, path: iconPath }); var iconStr = ''; - if ( netFilteringSwitch && this.perLoadBlockedRequestCount ) { + if ( µb.userSettings.showIconBadge && netFilteringSwitch && this.perLoadBlockedRequestCount ) { iconStr = µb.formatCount(this.perLoadBlockedRequestCount); } chrome.browserAction.setBadgeText({ diff --git a/js/ublock.js b/js/ublock.js index 95fe994b0..de95047eb 100644 --- a/js/ublock.js +++ b/js/ublock.js @@ -97,13 +97,19 @@ /******************************************************************************/ +// Return all settings if none specified. + µBlock.changeUserSettings = function(name, value) { + var µb = µBlock; + + if ( name === undefined ) { + return µb.userSettings; + } + if ( typeof name !== 'string' || name === '' ) { return; } - var µb = µBlock; - // Do not allow an unknown user setting to be created if ( µb.userSettings[name] === undefined ) { return; diff --git a/popup.html b/popup.html index 6a4a5160e..ae126ea98 100644 --- a/popup.html +++ b/popup.html @@ -61,6 +61,9 @@ p { color: green; cursor: pointer; } +#switch .fa:hover { + opacity: 0.9; + } #switch .fa.off { color: #ccc; }