mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2024-11-24 02:13:43 +03:00
Refactor slightly, change badge color
This commit is contained in:
parent
cf448ee3e2
commit
0aeae88bc4
|
@ -35,8 +35,8 @@ window.antiCensorRu = {
|
|||
}
|
||||
},
|
||||
Оба_и_на_свитчах: {
|
||||
pacUrl: 'https://drive.google.com/uc?export=download&id=0B-ZCVSvuNWf0akpCOURNS2VCTmc',
|
||||
//pacUrl: 'https://drive.google.com/uc?export=download&id=0B-ZCVSvuNWf0WGczNmJzY3gzMWc', // Beta
|
||||
//pacUrl: 'https://drive.google.com/uc?export=download&id=0B-ZCVSvuNWf0akpCOURNS2VCTmc',
|
||||
pacUrl: 'https://drive.google.com/uc?export=download&id=0B-ZCVSvuNWf0WGczNmJzY3gzMWc', // Beta
|
||||
proxyHosts: ['proxy.antizapret.prostovpn.org', 'gw2.anticenz.org'],
|
||||
proxyIps: {
|
||||
'195.123.209.38': 'proxy.antizapret.prostovpn.org',
|
||||
|
@ -256,20 +256,14 @@ chrome.storage.local.get(null, (oldStorage) => {
|
|||
}
|
||||
|
||||
/*
|
||||
|
||||
History of Changes to Storage (Migration Guide)
|
||||
-----------------------------------------------
|
||||
|
||||
Version 0.0.0.10
|
||||
|
||||
* Added this.version
|
||||
* PacProvider.proxyIps changed from {ip -> Boolean} to {ip -> hostname}
|
||||
|
||||
Version 0.0.0.8-9
|
||||
|
||||
* Changed storage.ifNotInstalled to storage.ifFirstInstall
|
||||
* Added storage.lastPacUpdateStamp
|
||||
|
||||
**/
|
||||
});
|
||||
|
||||
|
@ -283,6 +277,7 @@ function asyncLogGroup() {
|
|||
console.groupEnd();
|
||||
console.log('Group finished.');
|
||||
return cb.apply(this, arguments);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -445,15 +440,16 @@ function setPacScriptFromProvider(provider, cb) {
|
|||
|
||||
httpGet(
|
||||
provider.pacUrl,
|
||||
(err, res) => {
|
||||
(err, pacData) => {
|
||||
|
||||
if (err) {
|
||||
err.clarification = {
|
||||
message: 'Не удалось скачать PAC-скрипт с адреса: '+ provider.pacUrl +'.',
|
||||
message: 'Не удалось скачать PAC-скрипт с адреса: ' + provider.pacUrl + '.',
|
||||
prev: err.clarification
|
||||
};
|
||||
return cb(err);
|
||||
}
|
||||
|
||||
console.log('Clearing chrome proxy settings...');
|
||||
return chrome.proxy.settings.clear({}, () => {
|
||||
|
||||
|
@ -461,7 +457,7 @@ function setPacScriptFromProvider(provider, cb) {
|
|||
mode: 'pac_script',
|
||||
pacScript: {
|
||||
mandatory: false,
|
||||
data: res
|
||||
data: pacData
|
||||
}
|
||||
};
|
||||
console.log('Setting chrome proxy settings...');
|
||||
|
@ -469,4 +465,4 @@ function setPacScriptFromProvider(provider, cb) {
|
|||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
|
@ -12,13 +12,11 @@
|
|||
Crazy parallel Chrome.
|
||||
**/
|
||||
|
||||
window.tabWithError2ip = {}; // For errors only: Error? -> Check this IP!
|
||||
window.chrome.browserAction.setBadgeBackgroundColor({
|
||||
color: '#D00000'
|
||||
});
|
||||
|
||||
function createLink(url) {
|
||||
const a = document.createElement('a');
|
||||
a.href = url;
|
||||
return a;
|
||||
}
|
||||
window.tabWithError2ip = {}; // For errors only: Error? -> Check this IP!
|
||||
|
||||
+function() {
|
||||
|
||||
|
@ -83,7 +81,7 @@ function createLink(url) {
|
|||
var ifTitleSetAlready = /\n/.test(title);
|
||||
var proxyHost = window.antiCensorRu.pacProvider.proxyIps[ requestDetails.ip ];
|
||||
|
||||
var hostname = createLink( requestDetails.url ).hostname;
|
||||
var hostname = new URL( requestDetails.url ).hostname;
|
||||
|
||||
var ifShouldUpdateTitle = false;
|
||||
var indent = ' ';
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
|
||||
"name": "Обход блокировок Рунета",
|
||||
"description": "Аргументы против цензуры: https://git.io/vEkI9",
|
||||
"version": "0.0.0.14",
|
||||
"version": "0.0.0.15",
|
||||
"icons": {
|
||||
"128": "/icons/ribbon128.png"
|
||||
},
|
||||
"author": "ilyaigpetrov@gmail.com",
|
||||
"homepage_url": "https://github.com/ilyaigpetrov/anti-censorship-russia",
|
||||
"homepage_url": "https://github.com/anticensorship-russia/chromium-extension",
|
||||
|
||||
"permissions": [
|
||||
"proxy",
|
||||
|
@ -23,7 +23,7 @@
|
|||
"scripts": ["1-sync-pac-script-with-pac-provider.js", "2-block-informer.js", "3-context-menus.js"]
|
||||
},
|
||||
"browser_action": {
|
||||
"default_title": "Этот сайт благословлён РКН",
|
||||
"default_title": "Этот сайт благословлён",
|
||||
"default_popup": "/pages/choose-pac-provider/index.html"
|
||||
},
|
||||
"options_ui": {
|
||||
|
|
Loading…
Reference in New Issue
Block a user