mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01:00
commit
54a91b9374
186 changed files with 3393 additions and 1811 deletions
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
*.bak
|
||||
*.pem
|
||||
*.safariextension/
|
||||
/meta/safariextz/certs/
|
||||
/dist/build/
|
||||
/tmp/
|
22
.jshintrc
Normal file
22
.jshintrc
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"browser": true,
|
||||
"devel": true,
|
||||
"esnext": true,
|
||||
"globalstrict": true,
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
"nonew": false,
|
||||
"sub": true,
|
||||
"boss": true,
|
||||
"laxbreak": true,
|
||||
"validthis": true,
|
||||
"newcap": false,
|
||||
"-W058": true, // suppress "Missing '()' invoking a constructor" message
|
||||
"globals": {
|
||||
"self": false,
|
||||
"vAPI": false,
|
||||
"chrome": false,
|
||||
"safari": false,
|
||||
"Components": false // global variable in Firefox
|
||||
}
|
||||
}
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
1. The **user decides** what web content is acceptable or not in their browser.
|
||||
|
||||
The µBlock project does not support Adblock Plus' _"Acceptable Ads Manifesto"_,
|
||||
because the _"Acceptable Ads"_ marketing campaign is really the business
|
||||
The µBlock project does not support Adblock Plus' _"Acceptable Ads Manifesto"_,
|
||||
because the _"Acceptable Ads"_ marketing campaign is really the business
|
||||
plan of a for-profit entity.
|
||||
|
||||
Users are best placed to know what is or is not acceptable to them. µBlock's
|
||||
Users are best placed to know what is or is not acceptable to them. µBlock's
|
||||
sole purpose is to give users the mean to enforce their own choices.
|
||||
|
|
44
README.md
44
README.md
|
@ -2,10 +2,10 @@
|
|||
|
||||
**Foreword:** Using a blocker is **NOT** [theft](https://twitter.com/LeaVerou/status/518154828166725632). Do not fall for this creepy idea. The _ultimate_ logical consequence of "blocking = theft" is the criminalisation of the inalienable right to privacy.
|
||||
|
||||
See [releases page](https://github.com/gorhill/uBlock/releases) for recent changes.
|
||||
See [releases page](https://github.com/gorhill/uBlock/releases) for recent changes.
|
||||
See [Wiki](https://github.com/gorhill/uBlock/wiki) for more information.
|
||||
|
||||
An efficient blocker for Chromium-based browsers. Fast and lean. Written from scratch. Development
|
||||
An efficient blocker for Chromium-based browsers. Fast and lean. Written from scratch. Development
|
||||
through benchmarking.
|
||||
|
||||
**µBlock is not an "ad blocker", it's a blocker in the broad sense**, which happens to block ads through its support of [Adblock Plus filter syntax](https://adblockplus.org/en/filters). µBlock [extends](https://github.com/gorhill/uBlock/wiki/Filter-syntax-extensions) the syntax.
|
||||
|
@ -25,31 +25,31 @@ My main goal with µBlock is to help users neutralize as much as can be privacy-
|
|||
<p align="center">
|
||||
Chromium on Linux 64-bit<br>
|
||||
<img src="https://raw.githubusercontent.com/gorhill/uBlock/master/doc/img/ss-chromium-2.png" /><br><br>
|
||||
<sup>The screenshots above were taken after visiting links in
|
||||
<a href="https://github.com/gorhill/uBlock/wiki/Reference-benchmark">reference benchmark</a>
|
||||
plus a bit of random browsing. All blockers were active at the same time,
|
||||
thus they had to deal with exactly the same workload. Before the screenshots were
|
||||
taken, I left the browser idle for many minutes so as to let the browser's
|
||||
<sup>The screenshots above were taken after visiting links in
|
||||
<a href="https://github.com/gorhill/uBlock/wiki/Reference-benchmark">reference benchmark</a>
|
||||
plus a bit of random browsing. All blockers were active at the same time,
|
||||
thus they had to deal with exactly the same workload. Before the screenshots were
|
||||
taken, I left the browser idle for many minutes so as to let the browser's
|
||||
garbage collector kicks in. Also, after a while idling, it's good to open the dev
|
||||
console for each extension and force a garbage collection cycle by clicking a couple of times
|
||||
the trashcan icon in the _Timeline_ tab (this caused a ~15MB drop for µBlock and Adguard in Opera)
|
||||
console for each extension and force a garbage collection cycle by clicking a couple of times
|
||||
the trashcan icon in the _Timeline_ tab (this caused a ~15MB drop for µBlock and Adguard in Opera)
|
||||
as garbage collectors sometimes work in a very lazy way, so I did this for each extension.</sup>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
Being lean doesn't mean blocking less.<br>
|
||||
<img src="https://raw.githubusercontent.com/gorhill/uBlock/master/doc/benchmarks/privex-201409-30.png" /><br>
|
||||
<sup>For details of benchmark, see latest
|
||||
<sup>For details of benchmark, see latest
|
||||
<a href="https://github.com/gorhill/uBlock/wiki/%C2%B5Block-and-others:-Blocking-ads,-trackers,-malwares">µBlock and others: Blocking ads, trackers, malwares</a>.
|
||||
</p>
|
||||
|
||||
## Installation
|
||||
|
||||
From the [Chrome store](https://chrome.google.com/webstore/detail/µblock/cjpalhdlnbpafiamejdnhcphjbkeiagm),
|
||||
From the [Chrome store](https://chrome.google.com/webstore/detail/µblock/cjpalhdlnbpafiamejdnhcphjbkeiagm),
|
||||
the [Opera store](https://addons.opera.com/en-gb/extensions/details/ublock/), or [manually](https://github.com/gorhill/uBlock/tree/master/dist#install).
|
||||
|
||||
To benefit from the higher efficiency, it is of course not advised to use an
|
||||
inefficient blocker at the same time. µBlock will do as well or better than the
|
||||
To benefit from the higher efficiency, it is of course not advised to use an
|
||||
inefficient blocker at the same time. µBlock will do as well or better than the
|
||||
popular blockers out there.
|
||||
|
||||
Also of interest: [About the required permissions](https://github.com/gorhill/uBlock/wiki/About-the-required-permissions).
|
||||
|
@ -61,8 +61,8 @@ I think it is pretty obvious, except for this I suppose:
|
|||
![Popup](https://raw.githubusercontent.com/gorhill/uBlock/master/doc/img/popup-1.png)  ![Popup](https://raw.githubusercontent.com/gorhill/uBlock/master/doc/img/popup-2.png)
|
||||
|
||||
The big power button is to disable/enable µBlock **for the specific hostname
|
||||
which can be extracted from the URL address of the current page**. (It applies to
|
||||
the current web site only, it is **not** a global power button.) The state of the power
|
||||
which can be extracted from the URL address of the current page**. (It applies to
|
||||
the current web site only, it is **not** a global power button.) The state of the power
|
||||
switch for a specific site will be remembered.
|
||||
|
||||
The right-hand screenshot shows optional [dynamic filtering](https://github.com/gorhill/uBlock/wiki/Dynamic-filtering) at work.
|
||||
|
@ -71,22 +71,22 @@ The right-hand screenshot shows optional [dynamic filtering](https://github.com/
|
|||
|
||||
µBlock is born out of [HTTP Switchboard](https://github.com/gorhill/httpswitchboard).
|
||||
All the niceties of HTTPSB have been removed, and what is left is a straightforward
|
||||
blocker which support EasyList and the likes, and also support host files.
|
||||
blocker which support EasyList and the likes, and also support host files.
|
||||
Cosmetic filters ("element hiding") are supported.
|
||||
|
||||
There is nothing more to it. But it does what popular blockers out there do, at a
|
||||
fraction of CPU and memory usage for the same blocking power. Also, no unique user id
|
||||
fraction of CPU and memory usage for the same blocking power. Also, no unique user id
|
||||
and no home means no phoning home (some popular blockers do this, just be careful).
|
||||
|
||||
Free. Open source. For users by users. No donations sought.
|
||||
|
||||
Without the preset lists of filters, this extension is nothing. So if ever you
|
||||
really do want to contribute something, think about the people working hard
|
||||
to maintain the filter lists you are using, which were made available to use by
|
||||
Without the preset lists of filters, this extension is nothing. So if ever you
|
||||
really do want to contribute something, think about the people working hard
|
||||
to maintain the filter lists you are using, which were made available to use by
|
||||
all for free.
|
||||
|
||||
You may contribute by helping to translate this project. I created an
|
||||
[entry on Crowdin](https://crowdin.net/project/ublock), where you may contribute
|
||||
You may contribute by helping to translate this project. I created an
|
||||
[entry on Crowdin](https://crowdin.net/project/ublock), where you may contribute
|
||||
to the translation work.
|
||||
|
||||
## License
|
||||
|
|
|
@ -1,99 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title data-i18n="dashboardName"></title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
font: 15px httpsb,sans-serif;
|
||||
position: relative;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
#dashboard-nav {
|
||||
margin: 0;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100vw;
|
||||
height: 50px;
|
||||
z-index: 10;
|
||||
}
|
||||
#dashboard-nav-widgets {
|
||||
margin: 0;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding: 4px 0 0 0;
|
||||
white-space: nowrap;
|
||||
background-color: white;
|
||||
}
|
||||
#dashboard-nav-widgets span {
|
||||
padding: 0 0.5em;
|
||||
font-size: larger;
|
||||
}
|
||||
.tabButton {
|
||||
margin: 0;
|
||||
border: 1px solid #ccc;
|
||||
border-top-left-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding: 4px;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
top: 1px;
|
||||
color: black;
|
||||
background-color: #eee;
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
}
|
||||
.tabButton:focus {
|
||||
outline: 0;
|
||||
}
|
||||
.tabButton:active,.tabButton:visited {
|
||||
color: inherited;
|
||||
}
|
||||
.tabButton.selected {
|
||||
border-bottom: 1px solid white;
|
||||
background-color: white;
|
||||
border-bottom: 1px solid white;
|
||||
}
|
||||
iframe {
|
||||
margin: 0;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
overflow: auto;
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
width: 100%;
|
||||
height: calc(100% - 50px);
|
||||
}
|
||||
</style>
|
||||
<link href='css/common.css' rel='stylesheet' type='text/css'>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="dashboard-nav">
|
||||
<div id="dashboard-nav-widgets">
|
||||
<span>µBlock</span>
|
||||
<a class="tabButton" href="#" data-dashboard-panel-url="3p-filters.html" data-i18n="3pPageName"></a>
|
||||
<a class="tabButton" href="#" data-dashboard-panel-url="1p-filters.html" data-i18n="1pPageName"></a>
|
||||
<a class="tabButton" href="#" data-dashboard-panel-url="whitelist.html" data-i18n="whitelistPageName"></a>
|
||||
<a class="tabButton" href="#" data-dashboard-panel-url="settings.html" data-i18n="settingsPageName"></a>
|
||||
<a class="tabButton" href="#" data-dashboard-panel-url="stats.html" data-i18n="statsPageName"></a>
|
||||
<a class="tabButton" href="#" data-dashboard-panel-url="about.html" data-i18n="aboutPageName"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<iframe src=""></iframe>
|
||||
|
||||
<script src="js/udom.js"></script>
|
||||
<script src="js/i18n.js"></script>
|
||||
<script src="js/dashboard.js"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,141 +0,0 @@
|
|||
/*******************************************************************************
|
||||
|
||||
µBlock - a Chromium browser extension to block requests.
|
||||
Copyright (C) 2014 Raymond Hill
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see {http://www.gnu.org/licenses/}.
|
||||
|
||||
Home: https://github.com/gorhill/uBlock
|
||||
*/
|
||||
|
||||
// This is the reference client-side implementation of µBlock's messaging
|
||||
// infrastructure. The "server"-side implementation is in messaging.js.
|
||||
|
||||
// The client-side implementation creates a port in order to connect to
|
||||
// µBlock's background page. With this port we can "ask", "tell" or "announce":
|
||||
//
|
||||
// "ask": send a request and expect an answer using a callback.
|
||||
// "tell": send a request with no expectation of an answer.
|
||||
// "announce": send a request to be relayed to all connections -- no answer
|
||||
// expected.
|
||||
//
|
||||
// The tricky part in this implementation is to ensure all the requests are
|
||||
// uniquely identified, so that the background-page can keep track of these
|
||||
// until it is ready to send back an answer, which will be tagged with the
|
||||
// same id. The uniqueness must be true for all ports which connect to the
|
||||
// background page at any given time.
|
||||
//
|
||||
// Currently using Math.random() to generate this id... I don't know about the
|
||||
// implementation of Math.random(), but as long as I have a good expectation
|
||||
// of uniqueness, it's ok, we are not dealing with critical stuff here.
|
||||
|
||||
/* global chrome */
|
||||
|
||||
var messaging = (function(name){
|
||||
var port = null;
|
||||
var requestId = 1;
|
||||
var requestIdToCallbackMap = {};
|
||||
var listenCallback = null;
|
||||
|
||||
var onPortMessage = function(details) {
|
||||
if ( typeof details.id !== 'number' ) {
|
||||
return;
|
||||
}
|
||||
// Announcement?
|
||||
if ( details.id < 0 ) {
|
||||
if ( listenCallback ) {
|
||||
listenCallback(details.msg);
|
||||
}
|
||||
return;
|
||||
}
|
||||
var callback = requestIdToCallbackMap[details.id];
|
||||
if ( !callback ) {
|
||||
return;
|
||||
}
|
||||
// Must be removed before calling client to be sure to not execute
|
||||
// callback again if the client stops the messaging service.
|
||||
delete requestIdToCallbackMap[details.id];
|
||||
callback(details.msg);
|
||||
};
|
||||
|
||||
var start = function(name) {
|
||||
port = chrome.runtime.connect({ name: name });
|
||||
port.onMessage.addListener(onPortMessage);
|
||||
|
||||
// https://github.com/gorhill/uBlock/issues/193
|
||||
port.onDisconnect.addListener(stop);
|
||||
};
|
||||
|
||||
var stop = function() {
|
||||
listenCallback = null;
|
||||
port.disconnect();
|
||||
port = null;
|
||||
flushCallbacks();
|
||||
};
|
||||
|
||||
if ( typeof name === 'string' && name !== '' ) {
|
||||
start(name);
|
||||
}
|
||||
|
||||
var ask = function(msg, callback) {
|
||||
if ( port === null ) {
|
||||
if ( typeof callback === 'function' ) {
|
||||
callback();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if ( callback === undefined ) {
|
||||
tell(msg);
|
||||
return;
|
||||
}
|
||||
var id = requestId++;
|
||||
port.postMessage({ id: id, msg: msg });
|
||||
requestIdToCallbackMap[id] = callback;
|
||||
};
|
||||
|
||||
var tell = function(msg) {
|
||||
if ( port !== null ) {
|
||||
port.postMessage({ id: 0, msg: msg });
|
||||
}
|
||||
};
|
||||
|
||||
var listen = function(callback) {
|
||||
listenCallback = callback;
|
||||
};
|
||||
|
||||
var flushCallbacks = function() {
|
||||
var callback;
|
||||
for ( var id in requestIdToCallbackMap ) {
|
||||
if ( requestIdToCallbackMap.hasOwnProperty(id) === false ) {
|
||||
continue;
|
||||
}
|
||||
callback = requestIdToCallbackMap[id];
|
||||
if ( !callback ) {
|
||||
continue;
|
||||
}
|
||||
// Must be removed before calling client to be sure to not execute
|
||||
// callback again if the client stops the messaging service.
|
||||
delete requestIdToCallbackMap[id];
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
start: start,
|
||||
stop: stop,
|
||||
ask: ask,
|
||||
tell: tell,
|
||||
listen: listen
|
||||
};
|
||||
})();
|
252
js/messaging.js
252
js/messaging.js
|
@ -1,252 +0,0 @@
|
|||
/*******************************************************************************
|
||||
|
||||
µBlock - a Chromium browser extension to block requests.
|
||||
Copyright (C) 2014 Raymond Hill
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see {http://www.gnu.org/licenses/}.
|
||||
|
||||
Home: https://github.com/gorhill/uBlock
|
||||
*/
|
||||
|
||||
/* global chrome, µBlock */
|
||||
|
||||
// So there might be memory leaks related to the direct use of sendMessage(),
|
||||
// as per https://code.google.com/p/chromium/issues/detail?id=320723. The issue
|
||||
// is not marked as resolved, and the last message from chromium dev is:
|
||||
//
|
||||
// "You can construct Port objects (runtime.connect) and emulate sendMessage
|
||||
// "behaviour. The bug is that sendMessage doesn't clean up its Ports."
|
||||
//
|
||||
// So the point here is to have an infrastructure which allows relying more on
|
||||
// direct use of Port objects rather than going through sendMessage().
|
||||
|
||||
/******************************************************************************/
|
||||
/*******************************************************************************
|
||||
|
||||
// Here this is the "server"-side implementation.
|
||||
//
|
||||
// Reference client-side implementation is found in:
|
||||
//
|
||||
// messaging-client.js
|
||||
//
|
||||
// For instance, it needs to be cut & pasted for content scripts since
|
||||
// I can not include in a simple way js file content from another js file.
|
||||
|
||||
*******************************************************************************/
|
||||
/******************************************************************************/
|
||||
|
||||
µBlock.messaging = (function() {
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
var runtimeIdGenerator = 1;
|
||||
var nameToPortMap = {};
|
||||
var nameToListenerMap = {};
|
||||
var nullFunc = function(){};
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
var listenerNameFromPortName = function(portName) {
|
||||
var pos = portName.indexOf('/');
|
||||
if ( pos === -1 ) {
|
||||
return '';
|
||||
}
|
||||
return portName.slice(0, pos);
|
||||
};
|
||||
|
||||
var listenerFromPortName = function(portName) {
|
||||
return nameToListenerMap[listenerNameFromPortName(portName)];
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
var listen = function(portName, callback) {
|
||||
var listener = nameToListenerMap[portName];
|
||||
if ( listener && listener !== callback ) {
|
||||
throw 'Only one listener allowed';
|
||||
}
|
||||
nameToListenerMap[portName] = callback;
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
var tell = function(target, msg) {
|
||||
target += '/';
|
||||
for ( var portName in nameToPortMap ) {
|
||||
if ( nameToPortMap.hasOwnProperty(portName) === false ) {
|
||||
continue;
|
||||
}
|
||||
if ( portName.indexOf(target) === 0 ) {
|
||||
nameToPortMap[portName].postMessage({ id: -1, msg: msg });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
var announce = function(msg) {
|
||||
// Background page handler
|
||||
defaultHandler(msg, null, nullFunc);
|
||||
|
||||
// Extension pages & content scripts handlers
|
||||
for ( var portName in nameToPortMap ) {
|
||||
if ( nameToPortMap.hasOwnProperty(portName) === false ) {
|
||||
continue;
|
||||
}
|
||||
nameToPortMap[portName].postMessage({ id: -1, msg: msg });
|
||||
}
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
var onMessage = function(request, port) {
|
||||
var reqId = request.id;
|
||||
// Annoucement: dispatch everywhere.
|
||||
if ( reqId < 0 ) {
|
||||
announce(request.msg);
|
||||
return;
|
||||
}
|
||||
var listener = listenerFromPortName(port.name) || defaultHandler;
|
||||
// Being told
|
||||
if ( reqId === 0 ) {
|
||||
listener(request.msg, port.sender, nullFunc);
|
||||
return;
|
||||
}
|
||||
// Being asked
|
||||
listener(request.msg, port.sender, function(response) {
|
||||
port.postMessage({
|
||||
id: reqId,
|
||||
msg: response !== undefined ? response : null
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
// Default is for commonly used messages.
|
||||
|
||||
function defaultHandler(request, sender, callback) {
|
||||
var µb = µBlock;
|
||||
|
||||
// Async
|
||||
switch ( request.what ) {
|
||||
case 'getAssetContent':
|
||||
return µb.assets.getLocal(request.url, callback);
|
||||
|
||||
case 'loadUbiquitousAllowRules':
|
||||
return µb.loadUbiquitousWhitelists();
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Sync
|
||||
var response;
|
||||
|
||||
switch ( request.what ) {
|
||||
case 'contextMenuEvent':
|
||||
µb.contextMenuClientX = request.clientX;
|
||||
µb.contextMenuClientY = request.clientY;
|
||||
break;
|
||||
|
||||
case 'forceReloadTab':
|
||||
µb.forceReload(request.pageURL);
|
||||
break;
|
||||
|
||||
case 'getUserSettings':
|
||||
response = µb.userSettings;
|
||||
break;
|
||||
|
||||
case 'gotoExtensionURL':
|
||||
µb.utils.gotoExtensionURL(request.url);
|
||||
break;
|
||||
|
||||
case 'gotoURL':
|
||||
µb.utils.gotoURL(request);
|
||||
break;
|
||||
|
||||
case 'reloadAllFilters':
|
||||
µb.reloadPresetBlacklists(request.switches, request.update);
|
||||
break;
|
||||
|
||||
case 'userSettings':
|
||||
response = µb.changeUserSettings(request.name, request.value);
|
||||
break;
|
||||
|
||||
default:
|
||||
// console.error('µBlock> messaging.js / defaultHandler > unknown request: %o', request);
|
||||
break;
|
||||
}
|
||||
|
||||
callback(response);
|
||||
}
|
||||
|
||||
// https://www.youtube.com/watch?v=rrzRgUAHqc8
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
// Port disconnected, relay this information to apropriate listener.
|
||||
|
||||
var onDisconnect = function(port) {
|
||||
// Notify listener of the disconnection -- using a reserved message id.
|
||||
var listener = listenerFromPortName(port.name) || defaultHandler;
|
||||
var msg = {
|
||||
'what': 'disconnected',
|
||||
'which': listenerNameFromPortName(port.name)
|
||||
};
|
||||
listener(msg, port.sender, nullFunc);
|
||||
|
||||
// Cleanup port if no longer in use.
|
||||
if ( nameToPortMap.hasOwnProperty(port.name) ) {
|
||||
delete nameToPortMap[port.name];
|
||||
port.onMessage.removeListener(onMessage);
|
||||
port.onDisconnect.removeListener(onDisconnect);
|
||||
}
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
var onConnect = function(port) {
|
||||
// We must have a port name.
|
||||
if ( typeof port.name !== 'string' || port.name === '' ) {
|
||||
console.error('µBlock> messaging.js / onConnectHandler(): no port name!');
|
||||
return;
|
||||
}
|
||||
|
||||
// Ensure port name is unique
|
||||
port.name += '/' + runtimeIdGenerator++;
|
||||
|
||||
nameToPortMap[port.name] = port;
|
||||
port.onMessage.addListener(onMessage);
|
||||
port.onDisconnect.addListener(onDisconnect);
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
chrome.runtime.onConnect.addListener(onConnect);
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
return {
|
||||
listen: listen,
|
||||
tell: tell,
|
||||
announce: announce,
|
||||
defaultHandler: defaultHandler
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
})();
|
||||
|
||||
/******************************************************************************/
|
136
js/utils.js
136
js/utils.js
|
@ -1,136 +0,0 @@
|
|||
/*******************************************************************************
|
||||
|
||||
µBlock - a Chromium browser extension to block requests.
|
||||
Copyright (C) 2014 Raymond Hill
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see {http://www.gnu.org/licenses/}.
|
||||
|
||||
Home: https://github.com/gorhill/uBlock
|
||||
*/
|
||||
|
||||
/* global chrome, µBlock */
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
// This will inserted as a module in the µBlock object.
|
||||
|
||||
µBlock.utils = (function() {
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
var exports = {};
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
exports.gotoURL = function(details) {
|
||||
if ( details.tabId ) {
|
||||
chrome.tabs.update(details.tabId, { url: details.url });
|
||||
} else {
|
||||
chrome.tabs.create({ url: details.url });
|
||||
}
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
exports.gotoExtensionURL = function(url) {
|
||||
|
||||
var hasQuery = function(url) {
|
||||
return url.indexOf('?') >= 0;
|
||||
};
|
||||
|
||||
var removeQuery = function(url) {
|
||||
var pos = url.indexOf('?');
|
||||
if ( pos < 0 ) {
|
||||
return url;
|
||||
}
|
||||
return url.slice(0, pos);
|
||||
};
|
||||
var removeFragment = function(url) {
|
||||
var pos = url.indexOf('#');
|
||||
if ( pos < 0 ) {
|
||||
return url;
|
||||
}
|
||||
return url.slice(0, pos);
|
||||
};
|
||||
|
||||
var tabIndex = 9999;
|
||||
var targetUrl = chrome.extension.getURL(url);
|
||||
|
||||
var currentWindow = function(tabs) {
|
||||
var updateProperties = { active: true };
|
||||
var i = tabs.length;
|
||||
while ( i-- ) {
|
||||
if ( removeQuery(tabs[i].url) !== removeQuery(targetUrl) ) {
|
||||
continue;
|
||||
}
|
||||
// If current tab in dashboard is different, force the new one, if
|
||||
// there is one, to be activated.
|
||||
if ( tabs[i].url !== targetUrl ) {
|
||||
updateProperties.url = targetUrl;
|
||||
}
|
||||
chrome.tabs.update(tabs[i].id, updateProperties);
|
||||
return;
|
||||
}
|
||||
chrome.tabs.create({ 'url': targetUrl, index: tabIndex + 1 });
|
||||
};
|
||||
|
||||
var currentTab = function(tabs) {
|
||||
if ( tabs.length ) {
|
||||
tabIndex = tabs[0].index;
|
||||
}
|
||||
chrome.tabs.query({ currentWindow: true }, currentWindow);
|
||||
};
|
||||
|
||||
// https://github.com/gorhill/httpswitchboard/issues/150
|
||||
// Logic:
|
||||
// - If URL is already opened in a tab, just activate tab
|
||||
// - Otherwise find the current active tab and open in a tab immediately
|
||||
// to the right of the active tab
|
||||
chrome.tabs.query({ active: true }, currentTab);
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
exports.formatCount = function(count) {
|
||||
if ( typeof count !== 'number' ) {
|
||||
return '';
|
||||
}
|
||||
var s = count.toFixed(0);
|
||||
if ( count >= 1000 ) {
|
||||
if ( count < 10000 ) {
|
||||
s = '>' + s.slice(0,1) + 'K';
|
||||
} else if ( count < 100000 ) {
|
||||
s = s.slice(0,2) + 'K';
|
||||
} else if ( count < 1000000 ) {
|
||||
s = s.slice(0,3) + 'K';
|
||||
} else if ( count < 10000000 ) {
|
||||
s = s.slice(0,1) + 'M';
|
||||
} else {
|
||||
s = s.slice(0,-6) + 'M';
|
||||
}
|
||||
}
|
||||
return s;
|
||||
};
|
||||
|
||||
// https://www.youtube.com/watch?v=DyvzfyqYm_s
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
return exports;
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
})();
|
||||
|
||||
/******************************************************************************/
|
29
meta/config.json
Normal file
29
meta/config.json
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"name": "µBlock",
|
||||
"clean_name": "uBlock",
|
||||
"url": "https://github.com/gorhill/uBlock",
|
||||
"author": "Raymond Hill",
|
||||
"author_email": "rhill@raymondhill.net",
|
||||
"version": "0.7.0.10",
|
||||
"def_lang": "en",
|
||||
"vendors": {
|
||||
"crx": {
|
||||
"app_id": "cjpalhdlnbpafiamejdnhcphjbkeiagm",
|
||||
"manifest": "manifest.json",
|
||||
"locales": "_locales",
|
||||
"file_ext": ".crx",
|
||||
"private_key": "./meta/crx/key.pem"
|
||||
},
|
||||
"safariextz": {
|
||||
"app_id": "net.gorhill.uBlock",
|
||||
"manifest": {
|
||||
"Info": "Info.plist",
|
||||
"Settings": "Settings.plist"
|
||||
},
|
||||
"file_ext": ".safariextz",
|
||||
"developer_identifier": "",
|
||||
"cert_dir": "./meta/safariextz/certs/",
|
||||
"private_key": "./meta/safariextz/key.pem"
|
||||
}
|
||||
}
|
||||
}
|
61
meta/crx/manifest.json
Normal file
61
meta/crx/manifest.json
Normal file
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
"minimum_chrome_version": "22.0",
|
||||
"default_locale": "{def_lang}",
|
||||
"update_url": "https://clients2.google.com/service/update2/crx",
|
||||
|
||||
"version": "{version}",
|
||||
"name": "{name}",
|
||||
"description": "__MSG_extShortDesc__",
|
||||
"homepage_url": "{url}",
|
||||
"author": "{author}",
|
||||
"developer": {
|
||||
"name": "{author}",
|
||||
"email": "{author_email}"
|
||||
},
|
||||
|
||||
"icons": {
|
||||
"16": "img/icon_16.png",
|
||||
"128": "img/icon_128.png"
|
||||
},
|
||||
|
||||
"permissions": [
|
||||
"contextMenus",
|
||||
"storage",
|
||||
"tabs",
|
||||
"unlimitedStorage",
|
||||
"webNavigation",
|
||||
"webRequest",
|
||||
"webRequestBlocking",
|
||||
"http://*/*",
|
||||
"https://*/*"
|
||||
],
|
||||
|
||||
"background": {
|
||||
"page": "background.html"
|
||||
},
|
||||
"options_page": "dashboard.html",
|
||||
"content_scripts": [
|
||||
{
|
||||
"matches": ["http://*/*", "https://*/*"],
|
||||
"js": ["js/vapi-client.js", "js/contentscript-start.js"],
|
||||
"run_at": "document_start",
|
||||
"all_frames": true
|
||||
},
|
||||
{
|
||||
"matches": ["http://*/*", "https://*/*"],
|
||||
"js": ["js/contentscript-end.js"],
|
||||
"run_at": "document_end",
|
||||
"all_frames": true
|
||||
}
|
||||
],
|
||||
|
||||
"browser_action": {
|
||||
"default_icon": {
|
||||
"19": "img/browsericons/icon19-off.png",
|
||||
"38": "img/browsericons/icon38-off.png"
|
||||
},
|
||||
"default_title": "{name}",
|
||||
"default_popup": "popup.html"
|
||||
}
|
||||
}
|
6
meta/crx/update_crx.xml
Normal file
6
meta/crx/update_crx.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gupdate xmlns="http://www.google.com/update2/response" protocol="2.0">
|
||||
<app appid="{app_id}">
|
||||
<updatecheck codebase="{url}/{name}.crx" version="{version}"/>
|
||||
</app>
|
||||
</gupdate>
|
91
meta/safariextz/Info.plist
Normal file
91
meta/safariextz/Info.plist
Normal file
|
@ -0,0 +1,91 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Author</key>
|
||||
<string>{author}</string>
|
||||
<key>Builder Version</key>
|
||||
<string>534.57.2</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>{name}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>{app_id}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>{version}</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>{build_number}</string>
|
||||
<key>Chrome</key>
|
||||
<dict>
|
||||
<key>Database Quota</key>
|
||||
<real>52428800</real>
|
||||
<key>Global Page</key>
|
||||
<string>background.html</string>
|
||||
<key>Popovers</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Filename</key>
|
||||
<string>popup.html</string>
|
||||
<key>Height</key>
|
||||
<real>310</real>
|
||||
<key>Identifier</key>
|
||||
<string>popover</string>
|
||||
<key>Width</key>
|
||||
<real>180</real>
|
||||
</dict>
|
||||
</array>
|
||||
<key>Toolbar Items</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Identifier</key>
|
||||
<string>toolbarItem</string>
|
||||
<key>Image</key>
|
||||
<string>img/icon16.png</string>
|
||||
<key>Label</key>
|
||||
<string>{name}</string>
|
||||
<key>Popover</key>
|
||||
<string>popover</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>Content</key>
|
||||
<dict>
|
||||
<key>Scripts</key>
|
||||
<dict>
|
||||
<key>End</key>
|
||||
<array>
|
||||
<string>js/contentscript-end.js</string>
|
||||
</array>
|
||||
<key>Start</key>
|
||||
<array>
|
||||
<string>js/vapi-client.js</string>
|
||||
<string>js/contentscript-start.js</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>Whitelist</key>
|
||||
<array>
|
||||
<string>http://*/*</string>
|
||||
<string>https://*/*</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>Description</key>
|
||||
<string>{description}</string>
|
||||
<key>ExtensionInfoDictionaryVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>Permissions</key>
|
||||
<dict>
|
||||
<key>Website Access</key>
|
||||
<dict>
|
||||
<key>Include Secure Pages</key>
|
||||
<true/>
|
||||
<key>Level</key>
|
||||
<string>All</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<!-- <key>Update Manifest URL</key>
|
||||
<string>{url}update_safariextz.plist</string> -->
|
||||
<key>Website</key>
|
||||
<string>{url}</string>
|
||||
</dict>
|
||||
</plist>
|
22
meta/safariextz/Settings.plist
Normal file
22
meta/safariextz/Settings.plist
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<array>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<false/>
|
||||
<key>FalseValue</key>
|
||||
<false/>
|
||||
<key>Key</key>
|
||||
<string>open_prefs</string>
|
||||
<key>Secure</key>
|
||||
<false/>
|
||||
<key>Title</key>
|
||||
<string>Click to see the Preferences</string>
|
||||
<key>TrueValue</key>
|
||||
<true/>
|
||||
<key>Type</key>
|
||||
<string>CheckBox</string>
|
||||
</dict>
|
||||
</array>
|
||||
</plist>
|
21
meta/safariextz/update_safariextz.plist
Normal file
21
meta/safariextz/update_safariextz.plist
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Extension Updates</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>{app_id}</string>
|
||||
<key>Developer Identifier</key>
|
||||
<string>{developer_identifier}</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>{version}</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>{build_number}</string>
|
||||
<key>URL</key>
|
||||
<string>{url}/{name}.safariextz</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta charset="utf-8">
|
||||
<title>µBlock — Your filters</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/common.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/dashboard-common.css">
|
||||
|
@ -13,15 +13,16 @@
|
|||
<div>
|
||||
<p data-i18n="1pFormatHint"></p>
|
||||
<p><button id="importUserFiltersFromFile" data-i18n="1pImport"></button>   <button id="exportUserFiltersToFile" data-i18n="1pExport"></button></p>
|
||||
<input id="importFilePicker" type="file" accept="text/plain" style="display:none;">
|
||||
<input id="importFilePicker" type="file" accept="text/plain" class="hiddenFileInput">
|
||||
<textarea class="userFilters" id="userFilters" dir="auto" spellcheck="false"></textarea>
|
||||
<p><button id="userFiltersApply" disabled="true" data-i18n="1pApplyChanges"></button></p>
|
||||
</div>
|
||||
|
||||
<script src="js/vapi-common.js"></script>
|
||||
<script src="js/vapi-client.js"></script>
|
||||
<script src="js/udom.js"></script>
|
||||
<script src="js/i18n.js"></script>
|
||||
<script src="js/dashboard-common.js"></script>
|
||||
<script src="js/messaging-client.js"></script>
|
||||
<script src="js/1p-filters.js"></script>
|
||||
|
||||
</body>
|
|
@ -1,8 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>HTTP Switchboard — Ubiquitous rules</title>
|
||||
<meta charset="utf-8">
|
||||
<title>µBlock — Ubiquitous rules</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/common.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/dashboard-common.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/3p-filters.css">
|
||||
|
@ -31,10 +31,13 @@
|
|||
|
||||
<div id="busyOverlay"></div>
|
||||
|
||||
<script src="lib/publicsuffixlist.min.js"></script>
|
||||
<script src="js/vapi-common.js"></script>
|
||||
<script src="js/vapi-client.js"></script>
|
||||
<script src="js/udom.js"></script>
|
||||
<script src="js/i18n.js"></script>
|
||||
<script src="js/uritools.js"></script>
|
||||
<script src="js/dashboard-common.js"></script>
|
||||
<script src="js/messaging-client.js"></script>
|
||||
<script src="js/3p-filters.js"></script>
|
||||
|
||||
</body>
|
91
src/Info.plist
Normal file
91
src/Info.plist
Normal file
|
@ -0,0 +1,91 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Author</key>
|
||||
<string>Raymond Hill</string>
|
||||
<key>Builder Version</key>
|
||||
<string>534.57.2</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>µBlock</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>net.gorhill.uBlock</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.7.0.10</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1456132</string>
|
||||
<key>Chrome</key>
|
||||
<dict>
|
||||
<key>Database Quota</key>
|
||||
<real>52428800</real>
|
||||
<key>Global Page</key>
|
||||
<string>background.html</string>
|
||||
<key>Popovers</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Filename</key>
|
||||
<string>popup.html</string>
|
||||
<key>Height</key>
|
||||
<real>310</real>
|
||||
<key>Identifier</key>
|
||||
<string>popover</string>
|
||||
<key>Width</key>
|
||||
<real>180</real>
|
||||
</dict>
|
||||
</array>
|
||||
<key>Toolbar Items</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Identifier</key>
|
||||
<string>toolbarItem</string>
|
||||
<key>Image</key>
|
||||
<string>img/icon16.png</string>
|
||||
<key>Label</key>
|
||||
<string>µBlock</string>
|
||||
<key>Popover</key>
|
||||
<string>popover</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>Content</key>
|
||||
<dict>
|
||||
<key>Scripts</key>
|
||||
<dict>
|
||||
<key>End</key>
|
||||
<array>
|
||||
<string>js/contentscript-end.js</string>
|
||||
</array>
|
||||
<key>Start</key>
|
||||
<array>
|
||||
<string>js/vapi-client.js</string>
|
||||
<string>js/contentscript-start.js</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>Whitelist</key>
|
||||
<array>
|
||||
<string>http://*/*</string>
|
||||
<string>https://*/*</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>Description</key>
|
||||
<string>Finally, an efficient blocker for Chromium-based browsers. Easy on CPU and memory.</string>
|
||||
<key>ExtensionInfoDictionaryVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>Permissions</key>
|
||||
<dict>
|
||||
<key>Website Access</key>
|
||||
<dict>
|
||||
<key>Include Secure Pages</key>
|
||||
<true/>
|
||||
<key>Level</key>
|
||||
<string>All</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<!-- <key>Update Manifest URL</key>
|
||||
<string>https://github.com/gorhill/uBlockupdate_safariextz.plist</string> -->
|
||||
<key>Website</key>
|
||||
<string>https://github.com/gorhill/uBlock</string>
|
||||
</dict>
|
||||
</plist>
|
22
src/Settings.plist
Normal file
22
src/Settings.plist
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<array>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<false/>
|
||||
<key>FalseValue</key>
|
||||
<false/>
|
||||
<key>Key</key>
|
||||
<string>open_prefs</string>
|
||||
<key>Secure</key>
|
||||
<false/>
|
||||
<key>Title</key>
|
||||
<string>Click to see the Preferences</string>
|
||||
<key>TrueValue</key>
|
||||
<true/>
|
||||
<key>Type</key>
|
||||
<string>CheckBox</string>
|
||||
</dict>
|
||||
</array>
|
||||
</plist>
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta charset="utf-8">
|
||||
<title>µBlock — About</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/common.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/dashboard-common.css">
|
||||
|
@ -10,10 +10,10 @@
|
|||
|
||||
<body>
|
||||
|
||||
<h2>µBlock <span id="aboutVersion"></span></h2>
|
||||
<h2 id="aboutNameVer"></h2>
|
||||
<ul>
|
||||
<li><a href="https://github.com/gorhill/uBlock/releases" data-i18n="aboutChangelog"></a>
|
||||
<li><a href="https://github.com/gorhill/ublock" data-i18n="aboutCode"></a>
|
||||
<li><a href="https://github.com/gorhill/uBlock" data-i18n="aboutCode"></a>
|
||||
<li><span data-i18n="aboutContributors"></span>
|
||||
<ul>
|
||||
<li><a href="https://github.com/gorhill/uBlock/graphs/contributors">Github</a>
|
||||
|
@ -26,15 +26,17 @@
|
|||
<div style="margin:1em 0 0 0;">
|
||||
<p><button type="button" id="export" data-i18n="aboutBackupDataButton"></button>
|
||||
<button type="button" id="import" data-i18n="aboutRestoreDataButton"></button>
|
||||
<input id="restoreFilePicker" type="file" accept="text/plain" style="display:none;">
|
||||
<input id="restoreFilePicker" type="file" accept="text/plain" class="hiddenFileInput">
|
||||
<p>
|
||||
<p><button type="button" id="reset" data-i18n="aboutResetDataButton">Start from scratch...</button>
|
||||
<p><button type="button" id="reset" data-i18n="aboutResetDataButton"></button>
|
||||
</div>
|
||||
|
||||
<script src="js/vapi-common.js"></script>
|
||||
<script src="js/vapi-client.js"></script>
|
||||
<script src="js/vapi-appinfo.js"></script>
|
||||
<script src="js/udom.js"></script>
|
||||
<script src="js/i18n.js"></script>
|
||||
<script src="js/dashboard-common.js"></script>
|
||||
<script src="js/messaging-client.js"></script>
|
||||
<script src="js/about.js"></script>
|
||||
|
||||
</body>
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta charset="utf-8">
|
||||
<title>µBlock — Asset</title>
|
||||
<style>
|
||||
#content {
|
||||
|
@ -12,8 +12,10 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="content"></div>
|
||||
|
||||
<script src="js/udom.js"></script>
|
||||
<script src="js/messaging-client.js"></script>
|
||||
<script src="js/vapi-client.js"></script>
|
||||
<script src="js/asset-viewer.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue