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,
|
autoFillSingleEntry: false,
|
||||||
autoRetrieveCredentials: true,
|
autoRetrieveCredentials: true,
|
||||||
showNotifications: true,
|
showNotifications: true,
|
||||||
showLoginNotifications: true
|
showLoginNotifications: true,
|
||||||
|
saveDomainOnly: true
|
||||||
};
|
};
|
||||||
|
|
||||||
var page = {};
|
var page = {};
|
||||||
|
|
@ -42,6 +43,9 @@ page.initSettings = function() {
|
||||||
if (!('showLoginNotifications' in page.settings)) {
|
if (!('showLoginNotifications' in page.settings)) {
|
||||||
page.settings.showLoginNotifications = defaultSettings.showLoginNotifications;
|
page.settings.showLoginNotifications = defaultSettings.showLoginNotifications;
|
||||||
}
|
}
|
||||||
|
if (!('saveDomainOnly' in page.settings)) {
|
||||||
|
page.settings.saveDomainOnly = defaultSettings.saveDomainOnly;
|
||||||
|
}
|
||||||
browser.storage.local.set({'settings': page.settings});
|
browser.storage.local.set({'settings': page.settings});
|
||||||
resolve(page.settings);
|
resolve(page.settings);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1766,7 +1766,7 @@ cip.rememberCredentials = function(usernameValue, passwordValue) {
|
||||||
|
|
||||||
let url = jQuery(this)[0].action;
|
let url = jQuery(this)[0].action;
|
||||||
if (!url) {
|
if (!url) {
|
||||||
url = document.location.href;
|
url = cip.settings.saveDomainOnly ? document.location.origin : document.location.href;
|
||||||
if (url.indexOf('?') > 0) {
|
if (url.indexOf('?') > 0) {
|
||||||
url = url.substring(0, url.indexOf('?'));
|
url = url.substring(0, url.indexOf('?'));
|
||||||
if (url.length < document.location.origin.length) {
|
if (url.length < document.location.origin.length) {
|
||||||
|
|
|
||||||
|
|
@ -139,6 +139,15 @@
|
||||||
</div>
|
</div>
|
||||||
</p>
|
</p>
|
||||||
<hr />
|
<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>
|
<p>
|
||||||
Check for updates of KeePassXC:
|
Check for updates of KeePassXC:
|
||||||
<br />
|
<br />
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue