Skip to content

Commit

Permalink
Now extension will collect hostname from current tab and put it on se…
Browse files Browse the repository at this point in the history
…arch
  • Loading branch information
Ziga committed Jun 1, 2021
1 parent 50039ee commit d62979d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions js/passwords.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@ function displayPasswords(){

displayPasswords();

try{
chrome.tabs.query({active: true, lastFocusedWindow: true}, tabs => {
if(tabs[0].url !== null && typeof(tabs[0].url) !== 'undefined'){
document.getElementById("search").value = new URL(tabs[0].url).hostname.replace("www.", "");
filterPasswords();
}
});
}catch{}

document.getElementById("search").addEventListener("keyup", () => {
filterPasswords();
});
Expand Down
3 changes: 2 additions & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "Passky",
"description": "Simple and secure password manager",
"version": "1.0.3",
"version": "1.0.4",
"manifest_version": 2,
"author": "Rabbit Company LLC",
"permissions": ["clipboardWrite", "tabs"],
"browser_action": {
"default_icon": "/images/logo32.png",
"default_title": "Passky",
Expand Down

0 comments on commit d62979d

Please sign in to comment.