-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackground.html
More file actions
27 lines (25 loc) · 799 Bytes
/
background.html
File metadata and controls
27 lines (25 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<html>
<head>
<script>
function removeCookies(cookieList){
for(var i = 0; i < cookieList.length; i++){
console.log("removing fb cookie " + cookieList[i].name);
chrome.cookies.remove({
name: cookieList[i].name,
url: "http://www.facebook.com"
});
}
};
chrome.extension.onRequest.addListener(
function(request, sender, sendResponse) {
if (request.action == "clear"){
// remove known tracking cookies from FB
chrome.cookies.getAll({
session: false,
domain: "facebook.com"
}, removeCookies);
}
});
</script>
</head>
</html>