1
0
mirror of https://github.com/taigrr/searchBGon synced 2025-01-18 05:03:12 -08:00

Added initial extension

This commit is contained in:
Tai Groot 2019-05-23 15:18:04 -07:00
parent 26f1d5e5b7
commit c9d6244b53
Signed by: taigrr
GPG Key ID: 249AAAEE09A8861F
9 changed files with 41 additions and 0 deletions

15
background.js Normal file
View File

@ -0,0 +1,15 @@
function announce_close(){
console.log("closing all search tabs")
chrome.tabs.query({}, function(tabs) {
var closeable=[];
for (var i=0; i<tabs.length; ++i) {
console.log(tabs[i]);
if(tabs[i].url.includes("https://www.google.com/search?"))
{
closeable.push(tabs[i].id)
}
chrome.tabs.remove(closeable);
}
});
}
chrome.browserAction.onClicked.addListener(function(tab){announce_close()});

BIN
docs/screenCapture.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

26
manifest.json Normal file
View File

@ -0,0 +1,26 @@
{
"manifest_version": 2,
"name": "Close Search Tabs",
"description": "Closes all Google Search tabs when clicked to free up tabs and save your sanity.",
"short_name":"SearchBGon",
"author": "Tai Groot",
"version": "1.0.2",
"browser_action": {
"default_icon": "static/icon.png"
},
"background": {
"scripts": [
"background.js"
]
},
"permissions": [
"tabs"
],
"icons": {
"16": "static/icon-16.png",
"32": "static/icon-32.png",
"48": "static/icon-48.png",
"64": "static/icon-64.png",
"128": "static/icon-128.png"
}
}

BIN
static/icon-128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
static/icon-16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

BIN
static/icon-32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
static/icon-48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
static/icon-64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

BIN
static/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB