mirror of https://github.com/gorhill/uBlock.git
this fixes #3
This commit is contained in:
parent
8d60818be1
commit
2b96334572
|
@ -7,6 +7,10 @@
|
||||||
"message": "Finally, an efficient blocker for Chromium-based browsers. Easy on CPU and memory.",
|
"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"
|
"description": "this will in chrome web store: must be 132 characters or less"
|
||||||
},
|
},
|
||||||
|
"settingsPageName": {
|
||||||
|
"message": "Einstellungen",
|
||||||
|
"description": "appears as tab name in dashboard"
|
||||||
|
},
|
||||||
"3pPageName" : {
|
"3pPageName" : {
|
||||||
"message": "3rd-party filters",
|
"message": "3rd-party filters",
|
||||||
"description": "appears as tab name in dashboard"
|
"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" : {
|
"3pListsOfBlockedHostsPrompt2" : {
|
||||||
"message": "{{ubiquitousBlacklistCount}} eindeutig blockierte Hostnamen aus:",
|
"message": "{{ubiquitousBlacklistCount}} eindeutig blockierte Hostnamen aus:",
|
||||||
"description": "English: {{ubiquitousBlacklistCount}} distinct blocked hostnames from:"
|
"description": "English: {{ubiquitousBlacklistCount}} distinct blocked hostnames from:"
|
||||||
|
|
|
@ -7,6 +7,10 @@
|
||||||
"message": "Finally, an efficient blocker for Chromium-based browsers. Easy on CPU and memory.",
|
"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"
|
"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" : {
|
"3pPageName" : {
|
||||||
"message": "3rd-party filters",
|
"message": "3rd-party filters",
|
||||||
"description": "appears as tab name in dashboard."
|
"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" : {
|
"3pListsOfBlockedHostsPrompt2" : {
|
||||||
"message": "{{ubiquitousBlacklistCount}} network filters from:",
|
"message": "{{ubiquitousBlacklistCount}} network filters from:",
|
||||||
"description": "English: {{ubiquitousBlacklistCount}} network filters from:"
|
"description": "English: {{ubiquitousBlacklistCount}} network filters from:"
|
||||||
|
|
|
@ -7,6 +7,10 @@
|
||||||
"message": "Finally, an efficient blocker for Chromium-based browsers. Easy on CPU and memory.",
|
"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"
|
"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" : {
|
"3pPageName" : {
|
||||||
"message": "Listes de filtres",
|
"message": "Listes de filtres",
|
||||||
"description": "appears as tab name in dashboard"
|
"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" : {
|
"3pListsOfBlockedHostsPrompt2" : {
|
||||||
"message": "{{ubiquitousBlacklistCount}} filtres actuellement en action :",
|
"message": "{{ubiquitousBlacklistCount}} filtres actuellement en action :",
|
||||||
"description": "English: {{ubiquitousBlacklistCount}} network filters from:"
|
"description": "English: {{ubiquitousBlacklistCount}} network filters from:"
|
||||||
|
|
|
@ -7,6 +7,10 @@
|
||||||
"message": "Finally, an efficient blocker for Chromium-based browsers. Easy on CPU and memory.",
|
"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"
|
"description": "this will in chrome web store: must be 132 characters or less"
|
||||||
},
|
},
|
||||||
|
"settingsPageName": {
|
||||||
|
"message": "Настройки",
|
||||||
|
"description": "appears as tab name in dashboard."
|
||||||
|
},
|
||||||
"3pPageName" : {
|
"3pPageName" : {
|
||||||
"message": "Third-party filters",
|
"message": "Third-party filters",
|
||||||
"description": "appears as tab name in dashboard"
|
"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" : {
|
"3pListsOfBlockedHostsPrompt2" : {
|
||||||
"message": "{{ubiquitousBlacklistCount}} блокируется хостов, помимо:",
|
"message": "{{ubiquitousBlacklistCount}} блокируется хостов, помимо:",
|
||||||
"description": "English: {{ubiquitousBlacklistCount}} distinct blocked hostnames from:"
|
"description": "English: {{ubiquitousBlacklistCount}} distinct blocked hostnames from:"
|
||||||
|
|
|
@ -7,14 +7,18 @@
|
||||||
"message": "Finally, an efficient blocker for Chromium-based browsers. Easy on CPU and memory.",
|
"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"
|
"description": "this will be in the chrome web store: must be 132 characters or less"
|
||||||
},
|
},
|
||||||
"1pPageName" : {
|
"settingsPageName": {
|
||||||
"message": "Your filters",
|
"message": "设置",
|
||||||
"description": "appears as tab name in dashboard."
|
"description": "appears as tab name in dashboard."
|
||||||
},
|
},
|
||||||
"3pPageName" : {
|
"3pPageName" : {
|
||||||
"message": "Third-party filters",
|
"message": "Third-party filters",
|
||||||
"description": "appears as tab name in dashboard."
|
"description": "appears as tab name in dashboard."
|
||||||
},
|
},
|
||||||
|
"1pPageName" : {
|
||||||
|
"message": "Your filters",
|
||||||
|
"description": "appears as tab name in dashboard."
|
||||||
|
},
|
||||||
"aboutPageName": {
|
"aboutPageName": {
|
||||||
"message": "关于",
|
"message": "关于",
|
||||||
"description": "appears as tab name in dashboard."
|
"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" : {
|
"3pListsOfBlockedHostsPrompt2" : {
|
||||||
"message": "共{{ubiquitousBlacklistCount}}个不同的屏蔽站点名,来自:",
|
"message": "共{{ubiquitousBlacklistCount}}个不同的屏蔽站点名,来自:",
|
||||||
"description": "English: {{ubiquitousBlacklistCount}} distinct blocked hostnames from:"
|
"description": "English: {{ubiquitousBlacklistCount}} distinct blocked hostnames from:"
|
||||||
|
|
|
@ -76,6 +76,7 @@ iframe {
|
||||||
<div id="dashboard-nav">
|
<div id="dashboard-nav">
|
||||||
<div id="dashboard-nav-widgets">
|
<div id="dashboard-nav-widgets">
|
||||||
<span>µBlock</span>
|
<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="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="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>
|
<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 |
|
@ -45,7 +45,7 @@ $(function() {
|
||||||
$(window).on('hashchange', onTabClickHandler);
|
$(window).on('hashchange', onTabClickHandler);
|
||||||
var hash = window.location.hash;
|
var hash = window.location.hash;
|
||||||
if ( hash.length < 2 ) {
|
if ( hash.length < 2 ) {
|
||||||
hash = '#thirdparty-filters';
|
hash = '#settings';
|
||||||
}
|
}
|
||||||
loadDashboardPanel(hash);
|
loadDashboardPanel(hash);
|
||||||
});
|
});
|
||||||
|
|
|
@ -117,13 +117,13 @@ PageStore.prototype.recordRequest = function(type, url, block) {
|
||||||
// notifying me, and this causes internal cached state to be out of sync.
|
// notifying me, and this causes internal cached state to be out of sync.
|
||||||
|
|
||||||
PageStore.prototype.updateBadge = function() {
|
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';
|
var iconPath = netFilteringSwitch ? 'img/browsericons/icon19.png' : 'img/browsericons/icon19-off.png';
|
||||||
|
|
||||||
chrome.browserAction.setIcon({ tabId: this.tabId, path: iconPath });
|
chrome.browserAction.setIcon({ tabId: this.tabId, path: iconPath });
|
||||||
|
|
||||||
var iconStr = '';
|
var iconStr = '';
|
||||||
if ( netFilteringSwitch && this.perLoadBlockedRequestCount ) {
|
if ( µb.userSettings.showIconBadge && netFilteringSwitch && this.perLoadBlockedRequestCount ) {
|
||||||
iconStr = µb.formatCount(this.perLoadBlockedRequestCount);
|
iconStr = µb.formatCount(this.perLoadBlockedRequestCount);
|
||||||
}
|
}
|
||||||
chrome.browserAction.setBadgeText({
|
chrome.browserAction.setBadgeText({
|
||||||
|
|
10
js/ublock.js
10
js/ublock.js
|
@ -97,13 +97,19 @@
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
|
// Return all settings if none specified.
|
||||||
|
|
||||||
µBlock.changeUserSettings = function(name, value) {
|
µBlock.changeUserSettings = function(name, value) {
|
||||||
|
var µb = µBlock;
|
||||||
|
|
||||||
|
if ( name === undefined ) {
|
||||||
|
return µb.userSettings;
|
||||||
|
}
|
||||||
|
|
||||||
if ( typeof name !== 'string' || name === '' ) {
|
if ( typeof name !== 'string' || name === '' ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var µb = µBlock;
|
|
||||||
|
|
||||||
// Do not allow an unknown user setting to be created
|
// Do not allow an unknown user setting to be created
|
||||||
if ( µb.userSettings[name] === undefined ) {
|
if ( µb.userSettings[name] === undefined ) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -61,6 +61,9 @@ p {
|
||||||
color: green;
|
color: green;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
#switch .fa:hover {
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
#switch .fa.off {
|
#switch .fa.off {
|
||||||
color: #ccc;
|
color: #ccc;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue