mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Code formatting/styling
This commit is contained in:
parent
338e15ee81
commit
ce2a6a2943
1 changed files with 12 additions and 13 deletions
|
|
@ -155,20 +155,19 @@ kpxcFields.inputQueryPattern = 'input[type=\'text\'], input[type=\'email\'], inp
|
|||
// copied from Sizzle.js
|
||||
kpxcFields.rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g;
|
||||
kpxcFields.fcssescape = function(ch, asCodePoint) {
|
||||
if (asCodePoint) {
|
||||
|
||||
// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
|
||||
if (ch === "\0") {
|
||||
return "\uFFFD";
|
||||
}
|
||||
|
||||
// Control characters and (dependent upon position) numbers get escaped as code points
|
||||
return ch.slice(0, -1) + "\\" + ch.charCodeAt(ch.length - 1).toString(16) + " ";
|
||||
if (asCodePoint) {
|
||||
// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
|
||||
if (ch === '\0') {
|
||||
return '\uFFFD';
|
||||
}
|
||||
|
||||
// Other potentially-special ASCII characters get backslash-escaped
|
||||
return "\\" + ch;
|
||||
};
|
||||
// Control characters and (dependent upon position) numbers get escaped as code points
|
||||
return ch.slice(0, -1) + '\\' + ch.charCodeAt(ch.length - 1).toString(16) + ' ';
|
||||
}
|
||||
|
||||
// Other potentially-special ASCII characters get backslash-escaped
|
||||
return '\\' + ch;
|
||||
};
|
||||
|
||||
// Unique number as new IDs for input fields
|
||||
kpxcFields.uniqueNumber = 342845638;
|
||||
|
|
@ -194,7 +193,7 @@ kpxcFields.setUniqueId = function(field) {
|
|||
};
|
||||
|
||||
kpxcFields.prepareId = function(id) {
|
||||
return (id + "").replace(kpxcFields.rcssescape, kpxcFields.fcssescape);
|
||||
return (id + '').replace(kpxcFields.rcssescape, kpxcFields.fcssescape);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue