Skip to content

Commit

Permalink
Fixed the addon auto clearing the cookie to init the new redesign
Browse files Browse the repository at this point in the history
  • Loading branch information
zusorio committed Jul 22, 2019
1 parent 74e937d commit 6f0b816
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
10 changes: 9 additions & 1 deletion background.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,12 @@ var requestFilter = {
return blockingResponse;
};

chrome.webRequest.onBeforeSendHeaders.addListener(handler, requestFilter, extraInfoSpec);
function removeCookie() {
chrome.cookies.remove({"url": "https://*.twitter.com/*", "name": "ct0"})
// var clear = chrome.cookies.removeA({
// hostnames: ["twitter.com"]
// });
}

chrome.webRequest.onBeforeSendHeaders.addListener(handler, requestFilter, extraInfoSpec);
chrome.runtime.onInstalled.addListener(removeCookie);
5 changes: 3 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"name": "GoodTwitter",
"version": "1.0",
"version": "1.2",
"description": "Forces your browser to use old twitter.",
"manifest_version": 2,
"permissions": [
"webRequest",
"webRequestBlocking",
"*://*.twitter.com/"
"*://*.twitter.com/",
"cookies"
],

"background": {
Expand Down

0 comments on commit 6f0b816

Please sign in to comment.