this fixes #3

This commit is contained in:
gorhill 2014-06-24 18:29:55 -04:00
parent 8d60818be1
commit 2b96334572
12 changed files with 67 additions and 7 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -76,6 +76,7 @@ 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="about" href="#about" data-dashboard-panel-url="about.html" data-i18n="aboutPageName"></a>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 645 B

After

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 536 B

After

Width:  |  Height:  |  Size: 740 B

View File

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

View File

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

View File

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

View File

@ -61,6 +61,9 @@ p {
color: green;
cursor: pointer;
}
#switch .fa:hover {
opacity: 0.9;
}
#switch .fa.off {
color: #ccc;
}