Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
thedoggybrad authored Feb 2, 2024
1 parent b1958a8 commit dadebbb
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 0 deletions.
Binary file added Chromium (Manifest v3)/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions Chromium (Manifest v3)/background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
chrome.action.onClicked.addListener(function (tab) {
const input = tab.url;
const formattedInput = doubleEncodeURL(input);
const link = formattedInput ? `https://www.virustotal.com/gui/search/${formattedInput}` : null;

if (link) {
openInNewTab(link);
}
});

const openInNewTab = (url) => {
chrome.tabs.create({ url: url });
};

const doubleEncodeURL = (input) => {
try {
const url = new URL(input);
return encodeURIComponent(encodeURIComponent(url.href));
} catch (error) {
return null;
}
};
Binary file added Chromium (Manifest v3)/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Chromium (Manifest v3)/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions Chromium (Manifest v3)/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"manifest_version": 3,
"name": "VirusTotal Website Security Check",
"version": "1.0",
"description": "Automatically opens a VirusTotal website scan page on the URL you are visiting right now, in just a click of a button.",
"permissions": ["activeTab"],
"background": {
"service_worker": "background.js"
},
"action": {
"default_icon": {
"16": "favicon-16x16.png",
"32": "favicon-32x32.png",
"192": "android-chrome-192x192.png"
}
}
}
Binary file added Firefox (Manifest v2)/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions Firefox (Manifest v2)/background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
chrome.browserAction.onClicked.addListener(function (tab) {
const input = tab.url;
const formattedInput = doubleEncodeURL(input);
const link = formattedInput ? `https://www.virustotal.com/gui/search/${formattedInput}` : null;

if (link) {
openInNewTab(link);
}
});

const openInNewTab = (url) => {
chrome.tabs.create({ url: url });
};

const doubleEncodeURL = (input) => {
try {
const url = new URL(input);
return encodeURIComponent(encodeURIComponent(url.href));
} catch (error) {
return null;
}
};
Binary file added Firefox (Manifest v2)/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Firefox (Manifest v2)/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions Firefox (Manifest v2)/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"manifest_version": 2,
"name": "VirusTotal Website Security Check",
"version": "1.0",
"description": "Automatically opens a VirusTotal website scan page on the URL you are visiting right now, in just a click of a button.",
"icons": {
"16": "favicon-16x16.png",
"32": "favicon-32x32.png",
"192": "android-chrome-192x192.png"
},
"permissions": ["activeTab"],
"background": {
"scripts": ["background.js"],
"persistent": false
},
"browser_action": {
"default_icon": {
"16": "favicon-16x16.png",
"32": "favicon-32x32.png",
"192": "android-chrome-192x192.png"
}
}
}

0 comments on commit dadebbb

Please sign in to comment.