This commit is contained in:
√(noham)²
2026-09-17 13:45:52 +02:00
parent 8dc9429f84
commit f0bd940086
9 changed files with 1328 additions and 1211 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -300,7 +300,7 @@ function stripCommonPrefix(e, t) {
r = t.length,
n = o < r ? o : r;
let i = 0;
for (; i < n && e[i] === t[i]; ) i++;
for (; i < n && e[i] === t[i];) i++;
return [e.slice(i), t.slice(i)];
}
function articleTitleAndSiteNameFromTitleString(e, t) {
@@ -366,10 +366,10 @@ function siblingsIncludingSelfForElement(e) {
let t = e.parentElement;
if (t) return t.children;
let o = e;
for (; o.previousElementSibling; ) o = o.previousElementSibling;
for (; o.previousElementSibling;) o = o.previousElementSibling;
let r = [],
n = o;
for (; n; ) (r.push(n), (n = n.nextElementSibling));
for (; n;) (r.push(n), (n = n.nextElementSibling));
return r;
}
function regularExpressionFromUntrustedPatternAttributeString(e) {
@@ -395,7 +395,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) {
@@ -479,7 +479,7 @@ let doctypeLooksLikeHTML5 =
FormMetadataJSController.isDebugConsoleLoggingEnabled;
}),
(Node.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;
}),
@@ -487,7 +487,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;
}
}),
@@ -604,12 +604,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;
}
@@ -1147,7 +1147,7 @@ let cachedRegularExpressionsForDomainMatching = {};
}
let f = [],
g = 0;
for (; g < l; ) {
for (; g < l;) {
let p = [e[g]],
C = s(e[g]);
for (let A = g + 1; A < l; ++A) {
@@ -1162,7 +1162,7 @@ let cachedRegularExpressionsForDomainMatching = {};
let u = r ? a / r : 0,
c = [],
d = 0;
for (; d < l; ) {
for (; d < l;) {
let b = [e[d]],
y = !1,
S = i[d].isZeroRect() ? null : i[d];
@@ -2294,7 +2294,7 @@ let cachedRegularExpressionsForDomainMatching = {};
let n,
i = "a1Abbb",
l = !1;
for (; i.length <= t; ) {
for (; i.length <= t;) {
let e = r.test(i);
if (l && !e) return n;
(e && ((l = !0), (n = i.length)), (i += "b"));
@@ -3109,14 +3109,12 @@ let cachedRegularExpressionsForDomainMatching = {};
(!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 ||
@@ -3133,12 +3131,10 @@ let cachedRegularExpressionsForDomainMatching = {};
g = !1;
continue;
}
if (
!(
M + 1 < L &&
this._matchesConfirmEmailFieldLabelPattern(u[M + 1])
)
)
if (!(
M + 1 < L &&
this._matchesConfirmEmailFieldLabelPattern(u[M + 1])
))
continue;
g = !0;
}

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;
@@ -575,7 +575,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) {
@@ -1087,12 +1087,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);
@@ -1255,7 +1252,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);
},
@@ -1416,7 +1413,7 @@ const TweetURLRegex =
f.parentElement !== r.parentElement;
)
((f = f.parentElement), (r = r.parentElement));
for (; r.childElementCount <= 1; ) {
for (; r.childElementCount <= 1;) {
if (!r.childElementCount || !f.childElementCount) return !1;
if (f.childElementCount > 1) return !1;
if (
@@ -1681,7 +1678,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");
@@ -2477,7 +2474,7 @@ const TweetURLRegex =
U = dominantFontFamilyAndSizeForElement(e),
H = dominantFontSizeInPointsFromFontFamilyAndSizeString(U);
const V = /pull(ed)?quote/i;
for (var j = [], G = [], X = [], Y = [], K = []; b; ) {
for (var j = [], G = [], X = [], Y = [], K = []; b;) {
try {
var Q,
J = null,
@@ -2958,7 +2955,7 @@ const TweetURLRegex =
var je = J ? null : b.firstElementChild;
if (je) ((b = je), (C = C.firstElementChild), r(1));
else {
for (var Ge; b !== e && !(Ge = b.nextElementSibling); )
for (var Ge; b !== e && !(Ge = b.nextElementSibling);)
((b = b.parentElement), (C = C.parentElement), r(-1));
if (b === e) {
if (J && !elementIsProtected(J))
@@ -3226,7 +3223,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) {
@@ -4082,7 +4079,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 =
@@ -4405,7 +4402,7 @@ const TweetURLRegex =
if (T !== v) {
if (E < u - 2) return 0;
if (v.length >= T.length) {
for (var y = 0; v[v.length - 1 - y] === T[T.length - 1 - y]; ) y++;
for (var y = 0; v[v.length - 1 - y] === T[T.length - 1 - y];) y++;
y &&
((v = v.substring(0, v.length - y)),
(T = T.substring(0, T.length - y)));
@@ -4566,13 +4563,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),
@@ -4782,7 +4777,7 @@ const TweetURLRegex =
null,
),
n = "";
for (t.currentNode = e; t.nextNode(); ) {
for (t.currentNode = e; t.nextNode();) {
var i = t.currentNode;
if (i.nodeType !== Node.TEXT_NODE) {
var r = normalizedElementTagName(i);

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"]) +
@@ -1735,7 +1735,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().lineHeights[this._textSizeIndex];
e.insertRule(
@@ -1977,7 +1977,7 @@ let lastMouseDownWasOutsideOfPaper = !1;
}
let l = e.firstChild,
r = t.firstChild;
for (; l; ) {
for (; l;) {
if (!n(l, r)) return !1;
((l = l.nextSibling), (r = r.nextSibling));
}
@@ -2089,13 +2089,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);
n.appendChild(e);
}
let a = e.tagName;
if ("PRE" === a || "CODE" === a) n.appendChild(e);
else for (; e.firstChild; ) n.appendChild(e.firstChild);
else for (; e.firstChild;) n.appendChild(e.firstChild);
(document
.getElementById("article")
.insertBefore(n, incomingPagePlaceholder()),
@@ -2416,4 +2416,4 @@ window.addEventListener(
ReaderJS.loaded();
},
!1,
);
);

View File

@@ -34,4 +34,4 @@ function replaceSimpleTweetsWithRichTweets(e) {
.createTweet(i.getAttribute("data-reader-tweet-id"), i, e)
.then(richTweetWasCreatedFromSimpleTweet);
}));
}
}

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

@@ -1,3 +1,5 @@
//# sourceURL=__InjectedScript_Translation.js
/* Copyright (c) 2025 Apple Inc. All rights reserved. */
function updateLanguageAttributesForTranslation(n){document.documentElement.lang&&(document.documentElement.lang=n)}
function updateLanguageAttributesForTranslation(n) {
document.documentElement.lang && (document.documentElement.lang = n);
}

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 (
;

View File

@@ -142,4 +142,4 @@ function copyPage() {
o
);
}
copyPage();
copyPage();