mirror of
https://github.com/ClearURLs/Addon.git
synced 2024-10-03 22:58:10 +03:00
ETag filtering
This commit is contained in:
parent
7358f0c2a4
commit
14a0832973
@ -15,10 +15,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Require Firefox >= 55
|
||||
- Require Chrome >= 37
|
||||
|
||||
## [1.27.0] - 2022-XX-XX
|
||||
## [1.27.0] - 2023-XX-XX
|
||||
|
||||
### Fixed
|
||||
- [#276](https://github.com/ClearURLs/Addon/issues/276)
|
||||
- [#196](https://github.com/ClearURLs/Addon/issues/196)
|
||||
|
||||
# Removed
|
||||
- ETag filtering for Firefox. Since Firefox 85, ETags can no longer be used for tracking users over multiple sites.
|
||||
|
||||
### Compatibility note
|
||||
- Require Firefox >= 55
|
||||
|
@ -65,8 +65,14 @@ function generateDummyEtag(len, quotes = true, w = false) {
|
||||
return rtn;
|
||||
}
|
||||
|
||||
browser.webRequest.onHeadersReceived.addListener(
|
||||
eTagFilter,
|
||||
{urls: ["<all_urls>"]},
|
||||
["blocking", "responseHeaders"]
|
||||
);
|
||||
/**
|
||||
* Since Firefox 85, eTags can no longer be
|
||||
* used for tracking users over multiple sites.
|
||||
*/
|
||||
if(getBrowser() !== "Firefox") {
|
||||
browser.webRequest.onHeadersReceived.addListener(
|
||||
eTagFilter,
|
||||
{urls: ["<all_urls>"]},
|
||||
["blocking", "responseHeaders"]
|
||||
);
|
||||
}
|
@ -44,7 +44,7 @@ function historyCleaner(details) {
|
||||
if(urlBefore !== urlAfter) {
|
||||
browser.tabs.executeScript(details.tabId, {
|
||||
frameId: details.frameId,
|
||||
code: 'history.replaceState({state: "cleaned_history"},"",'+JSON.stringify(urlAfter)+');'
|
||||
code: 'history.replaceState({state: null},"",'+JSON.stringify(urlAfter)+');'
|
||||
}).then(() => {}, onError);
|
||||
}
|
||||
}
|
||||
|
@ -147,6 +147,20 @@ function getData() {
|
||||
changeSwitchButton("domainBlocking", "domainBlocking");
|
||||
changeSwitchButton("pingBlocking", "pingBlocking");
|
||||
changeSwitchButton("eTagFiltering", "eTagFiltering");
|
||||
})
|
||||
.then(() => {
|
||||
/**
|
||||
* Since Firefox 85, eTags can no longer be
|
||||
* used for tracking users over multiple sites.
|
||||
*/
|
||||
browser.runtime.sendMessage({
|
||||
function: "getBrowser",
|
||||
params: []
|
||||
}).then(resp => {
|
||||
if(resp.response === "Firefox") {
|
||||
document.getElementById('etag_p').remove();
|
||||
}
|
||||
}, null);
|
||||
}).catch(handleError);
|
||||
}
|
||||
|
||||
|
@ -157,7 +157,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<p id="etag_p">
|
||||
<label id="eTag_filtering_enabled" style="font-weight: bold;"></label><br />
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="eTagFiltering">
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"manifest_version": 2,
|
||||
"name": "ClearURLs",
|
||||
"version": "1.26.1",
|
||||
"version": "1.27.0",
|
||||
"author": "Kevin Roebert",
|
||||
"description": "__MSG_extension_description__",
|
||||
"homepage_url": "https://docs.clearurls.xyz",
|
||||
|
Loading…
Reference in New Issue
Block a user