mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Updated the fork with latest chromeIPass changes and updated the version to 0.1.1
This commit is contained in:
parent
2e74725d23
commit
19901de311
5 changed files with 47 additions and 32 deletions
|
|
@ -7,8 +7,7 @@ page.initOpenedTabs();
|
|||
// initial connection with KeePassXC
|
||||
keepass.connectToNative();
|
||||
keepass.generateNewKeyPair();
|
||||
//keepass.getDatabaseHash(null, null);
|
||||
//keepass.changePublicKeys();
|
||||
keepass.changePublicKeys();
|
||||
keepass.getDatabaseHash(function(res) {
|
||||
keepass.changePublicKeys();
|
||||
}, null);
|
||||
|
|
@ -148,6 +147,26 @@ chrome.contextMenus.create({
|
|||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Listen for keyboard shortcuts specified by user
|
||||
*/
|
||||
chrome.commands.onCommand.addListener(function(command) {
|
||||
if (command === "fill-username-password") {
|
||||
chrome.tabs.query({ active: true, currentWindow: true }, function(tabs) {
|
||||
if (tabs.length) {
|
||||
chrome.tabs.sendMessage(tabs[0].id, { action: "fill_user_pass" });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (command === "fill-password") {
|
||||
chrome.tabs.query({ active: true, currentWindow: true }, function(tabs) {
|
||||
if (tabs.length) {
|
||||
chrome.tabs.sendMessage(tabs[0].id, { action: "fill_pass_only" });
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Interval which updates the browserAction (e.g. blinking icon)
|
||||
|
|
|
|||
|
|
@ -480,7 +480,7 @@ keepass.getDatabaseHash = function (callback, tab, triggerUnlock) {
|
|||
}
|
||||
|
||||
keepass.changePublicKeys = function(tab) {
|
||||
if (!keepass.isConnected || !keepass.databaseHash || keepass.databaseHash !== "no-hash") {
|
||||
if (!keepass.isConnected || keepass.serverPublicKey) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,26 +58,6 @@ chrome.extension.onMessage.addListener(function(req, sender, callback) {
|
|||
}
|
||||
});
|
||||
|
||||
// Hotkeys for every page
|
||||
// ctrl + shift + p = fill only password
|
||||
// ctrl + shift + u = fill username + password
|
||||
window.addEventListener("keydown", function(e) {
|
||||
if (e.ctrlKey && e.shiftKey) {
|
||||
if (e.key == "KeyP" || e.keyIdentifier == "U+0050") { // P
|
||||
e.preventDefault();
|
||||
cip.receiveCredentialsIfNecessary();
|
||||
cip.fillInFromActiveElementPassOnly(false);
|
||||
} else if (e.key == "KeyU" || e.keyIdentifier == "U+0055") { // U
|
||||
e.preventDefault();
|
||||
cip.receiveCredentialsIfNecessary();
|
||||
cip.fillInFromActiveElement(false);
|
||||
var field =_f(cipFields.combinations[0].username);
|
||||
cipAutocomplete.init(field);
|
||||
field.click();
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
|
||||
function _f(fieldId) {
|
||||
var field = (fieldId) ? jQuery("input[data-cip-id='"+fieldId+"']:first") : [];
|
||||
return (field.length > 0) ? field : null;
|
||||
|
|
@ -1168,12 +1148,12 @@ cip.initCredentialFields = function(forceCall) {
|
|||
cip.url = document.location.origin;
|
||||
cip.submitUrl = cip.getFormActionUrl(cipFields.combinations[0]);
|
||||
|
||||
if (cip.settings.autoRetrieveCredentials) {
|
||||
chrome.extension.sendMessage({
|
||||
'action': 'retrieve_credentials',
|
||||
'args': [ cip.url, cip.submitUrl ]
|
||||
}, cip.retrieveCredentialsCallback);
|
||||
}
|
||||
if (cip.settings.autoRetrieveCredentials) {
|
||||
chrome.extension.sendMessage({
|
||||
'action': 'retrieve_credentials',
|
||||
'args': [ cip.url, cip.submitUrl ]
|
||||
}, cip.retrieveCredentialsCallback);
|
||||
}
|
||||
} // end function init
|
||||
|
||||
cip.initPasswordGenerator = function(inputs) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "chromeKeePassXC",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"manifest_version": 2,
|
||||
"description": "KeePassXC integration for Chrome",
|
||||
"icons": {
|
||||
|
|
@ -53,6 +53,22 @@
|
|||
"all_frames": true
|
||||
}
|
||||
],
|
||||
"commands": {
|
||||
"fill-username-password": {
|
||||
"description": "Insert username + password",
|
||||
"suggested_key": {
|
||||
"default": "Ctrl+Shift+U",
|
||||
"mac": "Command+Shift+U"
|
||||
}
|
||||
},
|
||||
"fill-password": {
|
||||
"description": "Insert a password",
|
||||
"suggested_key": {
|
||||
"default": "Ctrl+Shift+P",
|
||||
"mac": "Command+Shift+P"
|
||||
}
|
||||
}
|
||||
},
|
||||
"web_accessible_resources": [
|
||||
"jquery.min.map",
|
||||
"icons/key_16x16.png",
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@
|
|||
<h2>General Settings</h2>
|
||||
<hr />
|
||||
<p>
|
||||
If you just want to insert username + password into the fields where your focus is, press Ctrl + Shift + U.
|
||||
If you just want to insert username + password into the fields where your focus is, press <code>Ctrl + Shift + U</code>.
|
||||
<br />
|
||||
If you only want to insert the password, just press Ctrl + Shift + P.
|
||||
If you only want to insert the password, just press <code>Ctrl + Shift + P</code>. You can customize these shortcuts on <code>chrome://extensions/configureCommands</code> page
|
||||
</p>
|
||||
<p>
|
||||
<div class="form-group">
|
||||
|
|
|
|||
Loading…
Reference in a new issue