-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b1958a8
commit dadebbb
Showing
10 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} | ||
} |