feat: Initial commit

This commit is contained in:
ptrcnull 2021-10-07 18:57:34 +02:00
commit 731417edd7
3 changed files with 26 additions and 0 deletions

3
README.md Normal file
View file

@ -0,0 +1,3 @@
# twitter-switch
Switch Twitter accounts without losing current page

7
background.js Normal file
View file

@ -0,0 +1,7 @@
browser.webRequest.onCompleted.addListener(
() => browser.tabs.reload(),
{
urls: [ "https://twitter.com/i/api/1.1/account/multi/switch.json" ],
types: [ "xmlhttprequest" ]
}
);

16
manifest.json Normal file
View file

@ -0,0 +1,16 @@
{
"description": "Twitter account switch fixer",
"manifest_version": 2,
"name": "twitter-switch",
"version": "1.0",
"permissions": [
"webRequest",
"webRequestBlocking",
"https://twitter.com/"
],
"background": {
"scripts": ["background.js"]
}
}