mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Merge pull request #116 from keepassxreboot/save_only_domain
Added save domain only option
This commit is contained in:
commit
63587bc86e
3 changed files with 15 additions and 2 deletions
|
|
@ -6,7 +6,8 @@ const defaultSettings = {
|
|||
autoFillSingleEntry: false,
|
||||
autoRetrieveCredentials: true,
|
||||
showNotifications: true,
|
||||
showLoginNotifications: true
|
||||
showLoginNotifications: true,
|
||||
saveDomainOnly: true
|
||||
};
|
||||
|
||||
var page = {};
|
||||
|
|
@ -42,6 +43,9 @@ page.initSettings = function() {
|
|||
if (!('showLoginNotifications' in page.settings)) {
|
||||
page.settings.showLoginNotifications = defaultSettings.showLoginNotifications;
|
||||
}
|
||||
if (!('saveDomainOnly' in page.settings)) {
|
||||
page.settings.saveDomainOnly = defaultSettings.saveDomainOnly;
|
||||
}
|
||||
browser.storage.local.set({'settings': page.settings});
|
||||
resolve(page.settings);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1766,7 +1766,7 @@ cip.rememberCredentials = function(usernameValue, passwordValue) {
|
|||
|
||||
let url = jQuery(this)[0].action;
|
||||
if (!url) {
|
||||
url = document.location.href;
|
||||
url = cip.settings.saveDomainOnly ? document.location.origin : document.location.href;
|
||||
if (url.indexOf('?') > 0) {
|
||||
url = url.substring(0, url.indexOf('?'));
|
||||
if (url.length < document.location.origin.length) {
|
||||
|
|
|
|||
|
|
@ -139,6 +139,15 @@
|
|||
</div>
|
||||
</p>
|
||||
<hr />
|
||||
<p>
|
||||
<div class="checkbox">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="saveDomainOnly" value="true" /> Save domain only.
|
||||
</label>
|
||||
<span class="help-block">When saving new credentials save only the domain instead of full URL.</span>
|
||||
</div>
|
||||
</p>
|
||||
<hr />
|
||||
<p>
|
||||
Check for updates of KeePassXC:
|
||||
<br />
|
||||
|
|
|
|||
Loading…
Reference in a new issue