Update jQuery from 3.2.1 to 3.3.1

This commit is contained in:
varjolintu 2018-02-13 15:13:09 +02:00
parent 6c95eaa98a
commit 1feefc3a22
11 changed files with 34 additions and 27 deletions

View file

@ -29,7 +29,7 @@ The following improvements and features have been made after the fork. At this p
- Input forms are detected even if the login div has been hidden or is created after the page was loaded
- It is possible to use the active database from multiple browsers at the same time with keepassxc-proxy option
- Deprecated JavaScript functions are removed and everything is asynchronous
- Updated Bootstrap to version 3.3.7 and jQuery to version 3.2.1
- Updated Bootstrap to version 3.3.7 and jQuery to version 3.3.1
- New buttons, icons and settings page graphics
- Redesigned password generator dialog
- Password generator supports diceware passphrases and extended ASCII characters

File diff suppressed because one or more lines are too long

2
keepassxc-browser/jquery-3.3.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -623,7 +623,7 @@ cipDefine.initDescription = function() {
fieldIds.push(cipFields.prepareId(i));
}
cip.settings['defined-credential-fields'][document.location.origin] = {
cip.settings['defined-credential-fields'][document.location.href] = {
username: cipDefine.selection.username,
password: cipDefine.selection.password,
fields: fieldIds
@ -643,7 +643,7 @@ cipDefine.initDescription = function() {
$description.append($btnAgain);
$description.append($btnDismiss);
if (cip.settings['defined-credential-fields'] && cip.settings['defined-credential-fields'][document.location.origin]) {
if (cip.settings['defined-credential-fields'] && cip.settings['defined-credential-fields'][document.location.href]) {
const $p = jQuery('<p>').html('For this page credential fields are already selected and will be overwritten.<br />');
const $btnDiscard = jQuery('<button>')
.attr('id', 'btn-warning')
@ -653,7 +653,7 @@ cipDefine.initDescription = function() {
.addClass('btn-sm')
.addClass('btn-danger')
.click(function(e) {
delete cip.settings['defined-credential-fields'][document.location.origin];
delete cip.settings['defined-credential-fields'][document.location.href];
browser.runtime.sendMessage({
action: 'save_settings',
@ -898,7 +898,7 @@ cipFields.getCombination = function(givenType, fieldId) {
}
}
// use defined credential fields (already loaded into combinations)
if (cip.settings['defined-credential-fields'] && cip.settings['defined-credential-fields'][document.location.origin]) {
if (cip.settings['defined-credential-fields'] && cip.settings['defined-credential-fields'][document.location.href]) {
return cipFields.combinations[0];
}
@ -1098,8 +1098,8 @@ cipFields.prepareCombinations = function(combinations) {
};
cipFields.useDefinedCredentialFields = function() {
if (cip.settings['defined-credential-fields'] && cip.settings['defined-credential-fields'][document.location.origin]) {
const creds = cip.settings['defined-credential-fields'][document.location.origin];
if (cip.settings['defined-credential-fields'] && cip.settings['defined-credential-fields'][document.location.href]) {
const creds = cip.settings['defined-credential-fields'][document.location.href];
let $found = _f(creds.username) || _f(creds.password);
for (const i of creds.fields) {
@ -1234,7 +1234,7 @@ cip.initCredentialFields = function(forceCall) {
cip.url = document.location.origin;
cip.submitUrl = cip.getFormActionUrl(cipFields.combinations[0]);
if (cip.settings.autoRetrieveCredentials && _called.retrieveCredentials === false) {
if (cip.settings.autoRetrieveCredentials && _called.retrieveCredentials === false && (cip.url && cip.submitUrl)) {
browser.runtime.sendMessage({
action: 'retrieve_credentials',
args: [ cip.url, cip.submitUrl ]
@ -1444,7 +1444,7 @@ cip.fillInFromActiveElement = function(suppressWarnings, passOnly = false) {
cipFields.setUniqueId(jQuery(el));
const fieldId = cipFields.prepareId(jQuery(el).attr('data-cip-id'));
let combination = null;
if (el.type && el.type.toLowerCase() === 'password') {
if ($(el).toType === 'password') {
combination = cipFields.getCombination('password', fieldId);
}
else {
@ -1521,10 +1521,9 @@ cip.fillInStringFields = function(fields, StringFields, filledInFields) {
};
cip.setValueWithChange = function(field, value) {
if (cip.settings.respectMaxLength === true) {
const attribute_maxlength = field.attr('maxlength');
if (attribute_maxlength && $.isNumeric(attribute_maxlength) === true && attribute_maxlength > 0) {
if (attribute_maxlength && !isNaN(attribute_maxlength) && attribute_maxlength > 0) {
value = value.substr(0, attribute_maxlength);
}
}
@ -1694,7 +1693,7 @@ cip.contextMenuRememberCredentials = function() {
cipFields.setUniqueId(jQuery(el));
const fieldId = cipFields.prepareId(jQuery(el).attr('data-cip-id'));
let combination = null;
if (el.type && el.type.toLowerCase() === 'password') {
if ($(el).toType === 'password') {
combination = cipFields.getCombination('password', fieldId);
}
else {
@ -1808,7 +1807,7 @@ cipEvents.triggerActivatedTab = function() {
// initCredentialFields calls also "retrieve_credentials", to prevent it
// check of init() was already called
if (_called.initCredentialFields && (cip.url || cip.submitUrl) && cip.settings.autoRetrieveCredentials) {
if (_called.initCredentialFields && (cip.url && cip.submitUrl) && cip.settings.autoRetrieveCredentials) {
browser.runtime.sendMessage({
action: 'retrieve_credentials',
args: [ cip.url, cip.submitUrl ]

View file

@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "KeePassXC-Browser",
"version": "0.5.0",
"version": "0.5.2",
"description": "KeePassXC integration for modern web browsers",
"author": "KeePassXC Team",
"icons": {
@ -48,7 +48,7 @@
"js": [
"browser-polyfill.min.js",
"global.js",
"jquery-3.2.1.min.js",
"jquery-3.3.1.min.js",
"jquery-ui.min.js",
"keepassxc-browser.js"
],
@ -91,6 +91,7 @@
"contextMenus",
"clipboardWrite",
"nativeMessaging",
"notifications",
"storage",
"tabs",
"webRequest",

View file

@ -7,7 +7,7 @@
<link rel="stylesheet" href="options.css" />
<script type="text/javascript" src="../browser-polyfill.min.js"></script>
<script type="text/javascript" src="../global.js"></script>
<script type="text/javascript" src="../jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="../jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="bootstrap.min.js"></script>
<script type="text/javascript" src="options.js"></script>
</head>
@ -29,9 +29,9 @@
<h2>General Settings</h2>
<hr />
<p>
If you just want to insert username + password into the fields where your focus is, press <code>Ctrl + Shift + U</code>.
If you just want to insert username + password into the fields where your focus is, press <code>Alt + Shift + U</code>.
<br />
If you only want to insert the password, just press <code>Ctrl + Shift + P</code>.
If you only want to insert the password, just press <code>Alt + Shift + P</code>.
<span id="chrome-only">You can customize these shortcuts on <code>chrome://extensions/configureCommands</code> page</span>
</p>
<p>
@ -125,6 +125,15 @@
</div>
</p>
<hr />
<p>
<div class="checkbox">
<label class="checkbox">
<input type="checkbox" name="showNotifications" value="true" /> Show notifications.
</label>
<span class="help-block">Allow KeePassXC-Browser to show notifications when user interaction is needed from the extension icon.</span>
</div>
</p>
<hr />
<p>
Check for updates of KeePassXC:
<br />

View file

@ -6,7 +6,7 @@
<link rel="stylesheet" href="../options/bootstrap.min.css" />
<script type="text/javascript" src="../browser-polyfill.min.js"></script>
<script type="text/javascript" src="../global.js"></script>
<script type="text/javascript" src="../jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="../jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../options/bootstrap.min.js" /></script>
<script type="text/javascript" src="popup_functions.js" /></script>
<script type="text/javascript" src="popup.js" /></script>

View file

@ -6,7 +6,7 @@
<link rel="stylesheet" href="../options/bootstrap.min.css" />
<script type="text/javascript" src="../browser-polyfill.min.js"></script>
<script type="text/javascript" src="../global.js"></script>
<script type="text/javascript" src="../jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="../jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../options/bootstrap.min.js" /></script>
<script type="text/javascript" src="popup_functions.js"></script>
<script type="text/javascript" src="popup_httpauth.js"></script>

View file

@ -6,7 +6,7 @@
<link rel="stylesheet" href="../options/bootstrap.min.css" />
<script type="text/javascript" src="../browser-polyfill.min.js"></script>
<script type="text/javascript" src="../global.js"></script>
<script type="text/javascript" src="../jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="../jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../options/bootstrap.min.js" /></script>
<script type="text/javascript" src="popup_functions.js"></script>
<script type="text/javascript" src="popup_login.js"></script>

View file

@ -6,7 +6,7 @@
<link rel="stylesheet" href="../options/bootstrap.min.css" />
<script type="text/javascript" src="../browser-polyfill.min.js"></script>
<script type="text/javascript" src="../global.js"></script>
<script type="text/javascript" src="../jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="../jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../options/bootstrap.min.js" /></script>
<script type="text/javascript" src="popup_functions.js"></script>
</head>

View file

@ -6,7 +6,7 @@
<link rel="stylesheet" href="../options/bootstrap.min.css" />
<script type="text/javascript" src="../browser-polyfill.min.js"></script>
<script type="text/javascript" src="../global.js"></script>
<script type="text/javascript" src="../jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="../jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../options/bootstrap.min.js" /></script>
<script type="text/javascript" src="popup_functions.js"></script>
<script type="text/javascript" src="popup_remember.js"></script>