This commit is contained in:
√(noham)²
2026-09-17 13:46:03 +02:00
parent f0bd940086
commit c768a1667c
8 changed files with 57 additions and 66 deletions

View File

@@ -456,7 +456,7 @@ function stripCommonPrefix(e, t) {
n = t.length,
o = r < n ? r : n;
let i = 0;
for (; i < o && e[i] === t[i]; ) i++;
for (; i < o && e[i] === t[i];) i++;
return [e.slice(i), t.slice(i)];
}
function articleTitleAndSiteNameFromTitleString(e, t) {
@@ -522,10 +522,10 @@ function siblingsIncludingSelfForElement(e) {
let t = e.parentElement;
if (t) return t.children;
let r = e;
for (; r.previousElementSibling; ) r = r.previousElementSibling;
for (; r.previousElementSibling;) r = r.previousElementSibling;
let n = [],
o = r;
for (; o; ) (n.push(o), (o = o.nextElementSibling));
for (; o;) (n.push(o), (o = o.nextElementSibling));
return n;
}
function regularExpressionFromUntrustedPatternAttributeString(e) {
@@ -551,7 +551,7 @@ function pathFromAnchorWithoutLeadingSlash(e) {
function innermostActiveElement() {
let e = document.activeElement,
t = e;
for (; t; ) ((t = t?.shadowRoot?.activeElement), t && (e = t));
for (; t;) ((t = t?.shadowRoot?.activeElement), t && (e = t));
return e;
}
function elementAppearsToContinueCaptchaWidget(e) {
@@ -1107,7 +1107,7 @@ let doctypeLooksLikeHTML5 =
FormMetadataJSController.isDebugConsoleLoggingEnabled;
}),
(Element.prototype.traversePreviousElement = function () {
for (var e = this.previousElementSibling; e && e.lastElementChild; )
for (var e = this.previousElementSibling; e && e.lastElementChild;)
e = e.lastElementChild;
return e || this.parentElement;
}),
@@ -1115,7 +1115,7 @@ let doctypeLooksLikeHTML5 =
if (this) {
var t = this.previousSibling;
if (e(t)) return null;
for (; t && t.lastChild; ) if (e((t = t.lastChild))) return null;
for (; t && t.lastChild;) if (e((t = t.lastChild))) return null;
return t || this.parentNode;
}
}),
@@ -1236,12 +1236,12 @@ let doctypeLooksLikeHTML5 =
(Node.prototype.allAncestorsAndSelfIncludingShadowDOMHosts = function () {
let e = [],
t = this;
for (; t; ) (e.push(t), (t = t.parentElementIncludingShadowDOMHost()));
for (; t;) (e.push(t), (t = t.parentElementIncludingShadowDOMHost()));
return e;
}),
(HTMLElement.prototype.closestCommonAncestor = function (e) {
let t = this.parentElement;
for (; t; ) {
for (; t;) {
if (t.contains(e)) return t;
t = t.parentElement;
}
@@ -1879,7 +1879,7 @@ class FormMetadata {
}
let f = [],
g = 0;
for (; g < l; ) {
for (; g < l;) {
let p = [e[g]],
C = F(e[g]);
for (let y = g + 1; y < l; ++y) {
@@ -1894,7 +1894,7 @@ class FormMetadata {
let s = n ? a / n : 0,
u = [],
c = 0;
for (; c < l; ) {
for (; c < l;) {
let A = [e[c]],
w = !1,
E = i[c].isZeroRect() ? null : i[c];
@@ -3055,7 +3055,7 @@ class FormMetadata {
let i,
l = "a1Abbb",
a = !1;
for (; l.length <= t; ) {
for (; l.length <= t;) {
let e = o.test(l);
if (a && !e) return i;
(e && ((a = !0), (i = l.length)), (l += "b"));
@@ -3847,14 +3847,12 @@ class FormMetadata {
(!U.ControlLooksLikeCreditCardCardholderField &&
!U.ControlLooksLikeCreditCardNumberField))
) {
if (
!(
U.ControlLooksLikeDayField ||
U.ControlLooksLikeMonthField ||
U.ControlLooksLikeYearField ||
U.ControlLooksLikeCreditCardCompositeExpirationDateField
)
) {
if (!(
U.ControlLooksLikeDayField ||
U.ControlLooksLikeMonthField ||
U.ControlLooksLikeYearField ||
U.ControlLooksLikeCreditCardCompositeExpirationDateField
)) {
if (U.ControlLooksLikePasswordCredentialField) {
if (
U.ControlLooksLikeCreditCardSecurityCodeField ||
@@ -3871,12 +3869,10 @@ class FormMetadata {
p = !1;
continue;
}
if (
!(
x + 1 < M &&
this._matchesConfirmEmailFieldLabelPattern(u[x + 1])
)
)
if (!(
x + 1 < M &&
this._matchesConfirmEmailFieldLabelPattern(u[x + 1])
))
continue;
p = !0;
}

View File

@@ -14,7 +14,7 @@ function addGlobalEventHandler(e, t) {
: NodeFilter.FILTER_SKIP;
},
);
for (; t.nextNode(); ) {
for (; t.nextNode();) {
const e = t.currentNode;
(yield* a(e.shadowRoot), yield e);
}

View File

@@ -148,7 +148,7 @@ function _canonicalizedPropertyValues(e, r) {
}
function _indexOfNonWhitespaceCharacter(e, r = 0) {
let t = e.length;
for (; r < t && _isASCIIWhitespace(e[r]); ) ++r;
for (; r < t && _isASCIIWhitespace(e[r]);) ++r;
return r;
}
function _parseIdentifier(e, r) {
@@ -253,7 +253,7 @@ function _parseInteger(e, r) {
function _parsePasswordRulesInternal(e) {
let r = [],
t = e.length;
for (var a = _indexOfNonWhitespaceCharacter(e); a < t; ) {
for (var a = _indexOfNonWhitespaceCharacter(e); a < t;) {
if (!_isIdentifierCharacter(e[a])) return r;
var [n, a] = _parsePasswordRule(e, a);
if (

View File

@@ -131,9 +131,9 @@ function characterAppearsToBeCJK(e) {
);
}
function domDistance(e, t, n) {
for (var r = [], i = e; i; ) (r.unshift(i), (i = i.parentNode));
for (var r = [], i = e; i;) (r.unshift(i), (i = i.parentNode));
var a = [];
for (i = t; i; ) (a.unshift(i), (i = i.parentNode));
for (i = t; i;) (a.unshift(i), (i = i.parentNode));
for (
var o = Math.min(r.length, a.length),
l = Math.abs(r.length - a.length),
@@ -230,7 +230,7 @@ function nearestAncestorElementWithTagName(e, t, n) {
var r = {};
if (n) for (var i = 0; i < n.length; ++i) r[n[i]] = !0;
if (r[normalizedElementTagName(e)]) return null;
for (; (e = e.parentElement); ) {
for (; (e = e.parentElement);) {
var a = normalizedElementTagName(e);
if (r[a]) break;
if (a === t) return e;
@@ -574,7 +574,7 @@ function elementWouldAppearBetterAsFigureOrAuxiliary(e, t) {
},
);
r.currentNode = t;
for (var i = !1, a = !1; r.nextNode(); ) {
for (var i = !1, a = !1; r.nextNode();) {
var o = r.currentNode;
if (o.nodeType === Node.TEXT_NODE) {
if (!i && /\S/.test(o.nodeValue)) return !1;
@@ -719,7 +719,7 @@ function functionToPreventPruningDueToInvisibilityInQuirksListForHostname(e) {
function (e, t) {
var n = e;
if (!t) return !1;
for (; n && n !== t; ) {
for (; n && n !== t;) {
if (n.classList.contains("hidden")) return !0;
n = n.parentElement;
}
@@ -756,7 +756,7 @@ function nextLeafElementForElement(e) {
return leafElementForElementAndDirection(e, "nextNode");
}
function nextNonFloatingVisibleElementSibling(e) {
for (var t = e; (t = t.nextElementSibling); )
for (var t = e; (t = t.nextElementSibling);)
if (isElementVisible(t) && "none" === getComputedStyle(t).float) return t;
return null;
}
@@ -773,7 +773,7 @@ function elementWithLargestAreaFromElements(e) {
return t;
}
function unwrappedArticleContentElement(e) {
for (var t = e; ; ) {
for (var t = e; ;) {
for (var n = t.childNodes, r = n.length, i = null, a = 0; a < r; ++a) {
var o = n[a],
l = o.nodeType;
@@ -849,7 +849,7 @@ function changeElementType(e, t) {
var o = r.item(a);
n.setAttribute(o.nodeName, o.nodeValue);
}
for (; e.firstChild; ) n.appendChild(e.firstChild);
for (; e.firstChild;) n.appendChild(e.firstChild);
return (e.replaceWith(n), n);
}
function pathComponentsForAnchor(e) {
@@ -1079,12 +1079,9 @@ const TweetURLRegex =
c = null;
for (a = 0; a < s; ++a) {
var u = l[a];
if (
!(
c &&
c.compareDocumentPosition(u) & Node.DOCUMENT_POSITION_CONTAINED_BY
)
) {
if (!(
c && c.compareDocumentPosition(u) & Node.DOCUMENT_POSITION_CONTAINED_BY
)) {
var m = u.getElementsByTagName("li"),
d = m.length,
h = cachedElementBoundingRect(u);
@@ -1247,7 +1244,7 @@ const TweetURLRegex =
if (n < t) return 0;
var r = e.parentNode;
if (!isElementVisible(r)) return 0;
for (var i = 1; r && r !== this.element; )
for (var i = 1; r && r !== this.element;)
((i -= 0.1), (r = r.parentNode));
return Math.pow(n * i, TextNodeLengthPower);
},
@@ -1408,7 +1405,7 @@ const TweetURLRegex =
s.parentElement !== r.parentElement;
)
((s = s.parentElement), (r = r.parentElement));
for (; r.childElementCount <= 1; ) {
for (; r.childElementCount <= 1;) {
if (!r.childElementCount || !s.childElementCount) return !1;
if (s.childElementCount > 1) return !1;
if (
@@ -1694,7 +1691,7 @@ const TweetURLRegex =
);
},
routeToArticleNode: function () {
for (var e = [], t = this.articleNode(); t; ) {
for (var e = [], t = this.articleNode(); t;) {
var n = {};
n.tagName = normalizedElementTagName(t);
var i = t.getAttribute("id");
@@ -2528,7 +2525,7 @@ const TweetURLRegex =
W = dominantFontFamilyAndSizeForElement(e),
H = dominantFontSizeInPointsFromFontFamilyAndSizeString(W);
const V = /pull(ed)?quote/i;
for (var j = [], Y = [], G = [], Q = [], X = []; b; ) {
for (var j = [], Y = [], G = [], Q = [], X = []; b;) {
try {
var J,
K = null,
@@ -3009,7 +3006,7 @@ const TweetURLRegex =
var je = K ? null : b.firstElementChild;
if (je) ((b = je), (I = I.firstElementChild), r(1));
else {
for (var Ye; b !== e && !(Ye = b.nextElementSibling); )
for (var Ye; b !== e && !(Ye = b.nextElementSibling);)
((b = b.parentElement), (I = I.parentElement), r(-1));
if (b === e) {
if (K && !elementIsProtected(K))
@@ -3277,7 +3274,7 @@ const TweetURLRegex =
ancestorsOfElement: function (e) {
let t = [],
n = e.parentNode;
for (; n; ) (t.push(n), (n = n.parentNode));
for (; n;) (t.push(n), (n = n.parentNode));
return t;
},
leadingContentNodeWithSelector: function (e) {
@@ -4147,7 +4144,7 @@ const TweetURLRegex =
(!n[t].id || !(e = this.contentDocument.getElementById(n[t].id)));
--t
);
for (t++, e || (e = this.contentDocument); t < n.length; ) {
for (t++, e || (e = this.contentDocument); t < n.length;) {
for (
var i = n[t],
r =
@@ -4470,7 +4467,7 @@ const TweetURLRegex =
if (T !== v) {
if (E < u - 2) return 0;
if (v.length >= T.length) {
for (var S = 0; v[v.length - 1 - S] === T[T.length - 1 - S]; ) S++;
for (var S = 0; v[v.length - 1 - S] === T[T.length - 1 - S];) S++;
S &&
((v = v.substring(0, v.length - S)),
(T = T.substring(0, T.length - S)));
@@ -4631,13 +4628,11 @@ const TweetURLRegex =
var d = cachedElementBoundingRect(s);
((c = d.width), (m = d.height));
}
if (
!(
c < r.minimumWidth ||
m < r.minimumHeight ||
c * m < r.minimumArea
)
) {
if (!(
c < r.minimumWidth ||
m < r.minimumHeight ||
c * m < r.minimumArea
)) {
var h = this.elementContainsEnoughTextOfSameStyle(s, e, i);
if (
(e.add(s),

View File

@@ -12,7 +12,7 @@ function plaintextVersionOfNodeAppendingNewlinesBetweenBlockElements(e) {
null,
);
let t = "";
for (n.currentNode = e; n.nextNode(); ) {
for (n.currentNode = e; n.nextNode();) {
const e = n.currentNode;
if (e.nodeType === Node.TEXT_NODE) {
t += e.textContent;

View File

@@ -657,7 +657,7 @@ function stopExtendingElementBeyondTextColumn(e) {
function leadingMarginAndPaddingAppliedToElementFromAncestors(e) {
let t = 0,
n = e.parentElement;
for (; n && !n.classList.contains("page"); ) {
for (; n && !n.classList.contains("page");) {
let e = getComputedStyle(n);
((t +=
parseFloat(e["-webkit-padding-start"]) +
@@ -1865,7 +1865,7 @@ const ThemeSettings = {
},
_rebuildDynamicStyleSheet: function () {
let e = document.getElementById("dynamic-article-content").sheet;
for (; e.cssRules.length; ) e.removeRule(0);
for (; e.cssRules.length;) e.removeRule(0);
let t = this._currentFontSettings().fontSizes[this._textSizeIndex] + "px",
n =
this._currentFontSettings().fontSizes[this._defaultTextSizeIndex] +
@@ -2177,7 +2177,7 @@ let lastMouseDownWasOutsideOfPaper = !1;
}
let o = e.firstChild,
l = t.firstChild;
for (; o; ) {
for (; o;) {
if (!n(o, l)) return !1;
((o = o.nextSibling), (l = l.nextSibling));
}
@@ -2288,13 +2288,13 @@ let lastMouseDownWasOutsideOfPaper = !1;
}
if (this.metadataElement && this.metadataElement.innerText) {
let e = document.createElement("div");
for (e.className = "metadata"; this.metadataElement.firstChild; )
for (e.className = "metadata"; this.metadataElement.firstChild;)
e.appendChild(this.metadataElement.firstChild);
t.appendChild(e);
}
let l = e.tagName;
if ("PRE" === l || "CODE" === l) t.appendChild(e);
else for (; e.firstChild; ) t.appendChild(e.firstChild);
else for (; e.firstChild;) t.appendChild(e.firstChild);
(document
.getElementById("article")
.insertBefore(t, incomingPagePlaceholder()),

View File

@@ -124,7 +124,7 @@ var SchemaDataExtractor = function () {};
(o[e] = t.textContent ? t.textContent : t.getAttribute("content"));
}
let h = s.parentNode;
for (; null !== h && -1 === e.indexOf(h); ) h = h.parentNode;
for (; null !== h && -1 === e.indexOf(h);) h = h.parentNode;
const i = s.querySelectorAll("[itemprop='telephone']");
if (null !== h) {
let t = h.querySelectorAll("[itemprop='name']");
@@ -171,7 +171,7 @@ var SchemaDataExtractor = function () {};
if ("http://schema.org" !== a && "https://schema.org" !== a) return t;
t[SchemaDataExtractor.containsSchemaOrgKey] = !0;
let o = [];
for (o.unshift(r); o.length; ) {
for (o.unshift(r); o.length;) {
let e = o.shift();
if (null != e) {
if (

View File

@@ -489,7 +489,7 @@
let n = [],
o = e,
a = 0;
for (; o && (++a, !(a > 512)); ) {
for (; o && (++a, !(a > 512));) {
let e;
for (
;