mirror of
https://github.com/NohamR/safari-internal-js.git
synced 2026-10-10 18:39:42 +00:00
prettify
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="disabled-adaptations" content="watch">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="initial-scale=1">
|
||||
<base>
|
||||
<head>
|
||||
<meta name="disabled-adaptations" content="watch" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="viewport" content="initial-scale=1" />
|
||||
<base />
|
||||
<title>Reader</title>
|
||||
<style id="assistant-content">
|
||||
#summary-container {
|
||||
@@ -210,7 +210,12 @@
|
||||
</style>
|
||||
|
||||
<style id="article-content">
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-weight: bold;
|
||||
}
|
||||
h1 {
|
||||
@@ -223,7 +228,9 @@
|
||||
h3 {
|
||||
font-size: 1.25em;
|
||||
}
|
||||
h4, h5, h6 {
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-size: 1em;
|
||||
margin: 1em 0;
|
||||
}
|
||||
@@ -253,7 +260,9 @@
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.title, .subhead, .metadata {
|
||||
.title,
|
||||
.subhead,
|
||||
.metadata {
|
||||
text-align: start;
|
||||
hyphens: manual;
|
||||
display: none;
|
||||
@@ -344,7 +353,9 @@
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#article .leading-image, figure, .auxiliary {
|
||||
#article .leading-image,
|
||||
figure,
|
||||
.auxiliary {
|
||||
margin-bottom: 1.15em;
|
||||
}
|
||||
|
||||
@@ -428,7 +439,8 @@
|
||||
-webkit-margin-start: 0;
|
||||
}
|
||||
|
||||
#article .auxiliary.float img, #article .auxiliary > *:first-child:not(img) {
|
||||
#article .auxiliary.float img,
|
||||
#article .auxiliary > *:first-child:not(img) {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@@ -484,11 +496,16 @@
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
#article .leading-image, #article figure, #article .auxiliary:not(.pullquote) {
|
||||
#article .leading-image,
|
||||
#article figure,
|
||||
#article .auxiliary:not(.pullquote) {
|
||||
font-family: -apple-system-font;
|
||||
}
|
||||
|
||||
#article .leading-image, #article figure, #article .auxiliary, #article .pullquote {
|
||||
#article .leading-image,
|
||||
#article figure,
|
||||
#article .auxiliary,
|
||||
#article .pullquote {
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
}
|
||||
|
||||
@@ -513,7 +530,8 @@
|
||||
line-height: 1.45em;
|
||||
}
|
||||
|
||||
blockquote, q {
|
||||
blockquote,
|
||||
q {
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
}
|
||||
|
||||
@@ -531,7 +549,10 @@
|
||||
display: block;
|
||||
}
|
||||
|
||||
.pullquote q::before, .pullquote q::after, q.pullquote::before, q.pullquote::after {
|
||||
.pullquote q::before,
|
||||
.pullquote q::after,
|
||||
q.pullquote::before,
|
||||
q.pullquote::after {
|
||||
content: "";
|
||||
}
|
||||
|
||||
@@ -541,8 +562,7 @@
|
||||
.page p > div:empty,
|
||||
.page div > div:empty,
|
||||
.page p + br,
|
||||
.page img + br
|
||||
{
|
||||
.page img + br {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -553,7 +573,8 @@
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.page table td, .page table th {
|
||||
.page table td,
|
||||
.page table th {
|
||||
padding: 0.25em 0.5em;
|
||||
border: 1px solid rgb(216, 216, 216);
|
||||
}
|
||||
@@ -597,7 +618,8 @@
|
||||
background-color: rgba(0, 0, 0, 0.025);
|
||||
}
|
||||
|
||||
.page sup, .page sub {
|
||||
.page sup,
|
||||
.page sub {
|
||||
line-height: 1;
|
||||
font-size: 0.75em;
|
||||
}
|
||||
@@ -607,8 +629,12 @@
|
||||
}
|
||||
|
||||
/* Special Font Customizations */
|
||||
.system { font-family: -apple-system-font; }
|
||||
.watch.system { font: -apple-system-body; }
|
||||
.system {
|
||||
font-family: -apple-system-font;
|
||||
}
|
||||
.watch.system {
|
||||
font: -apple-system-body;
|
||||
}
|
||||
.yuantisc {
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
@@ -703,14 +729,17 @@
|
||||
display: block;
|
||||
}
|
||||
|
||||
#article :nth-child(1 of .page):nth-last-child(1 of .page) .page-number {
|
||||
#article
|
||||
:nth-child(1 of .page):nth-last-child(1 of .page)
|
||||
.page-number {
|
||||
display: none;
|
||||
}
|
||||
body.watch #article :nth-child(1 of .page):nth-last-child(1 of .page) {
|
||||
padding-top: 0.15em;
|
||||
}
|
||||
|
||||
.page-number, #incoming-page-corner {
|
||||
.page-number,
|
||||
#incoming-page-corner {
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
-webkit-user-select: none;
|
||||
@@ -767,7 +796,7 @@
|
||||
}
|
||||
|
||||
#next-page-container {
|
||||
position:absolute;
|
||||
position: absolute;
|
||||
/* Workaround for <rdar://problem/8662842> iOS Reader: loading multiple pages stops at the 2nd page. */
|
||||
left: -1000px;
|
||||
/* The iframe needs to be wider than the width threshold value for Reader detection, see <rdar://problem/9599297>. */
|
||||
@@ -780,7 +809,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (-webkit-min-device-pixel-ratio:2) {
|
||||
@media screen and (-webkit-min-device-pixel-ratio: 2) {
|
||||
.page {
|
||||
border-top-width: 0.5px;
|
||||
}
|
||||
@@ -806,8 +835,12 @@
|
||||
|
||||
@media screen and (min-width: 0px) {
|
||||
/* Includes iPhone 5 in portrait */
|
||||
.page { padding-left: 16px; padding-right: 16px; }
|
||||
.page-number, #incoming-page-corner {
|
||||
.page {
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
}
|
||||
.page-number,
|
||||
#incoming-page-corner {
|
||||
top: 8px;
|
||||
right: 16px;
|
||||
}
|
||||
@@ -832,8 +865,12 @@
|
||||
|
||||
@media screen and (min-width: 375px) {
|
||||
/* iPhone 6 in portrait */
|
||||
.page { padding-left: 18px; padding-right: 18px; }
|
||||
.page-number, #incoming-page-corner {
|
||||
.page {
|
||||
padding-left: 18px;
|
||||
padding-right: 18px;
|
||||
}
|
||||
.page-number,
|
||||
#incoming-page-corner {
|
||||
top: 6px;
|
||||
right: 18px;
|
||||
}
|
||||
@@ -844,8 +881,12 @@
|
||||
|
||||
@media screen and (min-width: 414px) {
|
||||
/* iPhone 6 Plus in portrait */
|
||||
.page { padding-left: 20px; padding-right: 20px; }
|
||||
.page-number, #incoming-page-corner {
|
||||
.page {
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
.page-number,
|
||||
#incoming-page-corner {
|
||||
top: 6px;
|
||||
right: 20px;
|
||||
}
|
||||
@@ -858,8 +899,12 @@
|
||||
|
||||
@media screen and (min-width: 667px) {
|
||||
/* iPhone 6 in landscape */
|
||||
.page { padding-left: 40px; padding-right: 40px; }
|
||||
.page-number, #incoming-page-corner {
|
||||
.page {
|
||||
padding-left: 40px;
|
||||
padding-right: 40px;
|
||||
}
|
||||
.page-number,
|
||||
#incoming-page-corner {
|
||||
/* Stop lining this text up with .page's right margin. */
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
@@ -897,12 +942,18 @@
|
||||
|
||||
@media screen and (min-width: 704px) {
|
||||
/* iPad in landscape with the sidebar open */
|
||||
.page { padding-left: 42px; padding-right: 42px; }
|
||||
.page {
|
||||
padding-left: 42px;
|
||||
padding-right: 42px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 736px) {
|
||||
/* iPhone 6 Plus in landscape */
|
||||
.page { padding-left: 60px; padding-right: 60px; }
|
||||
.page {
|
||||
padding-left: 60px;
|
||||
padding-right: 60px;
|
||||
}
|
||||
#article :nth-child(1 of .page):nth-last-child(1 of .page) {
|
||||
padding-top: 46px;
|
||||
}
|
||||
@@ -915,33 +966,81 @@
|
||||
}
|
||||
|
||||
/* Readable margins. */
|
||||
body.system #article { max-width: 83.2ex; }
|
||||
body.athelas #article { max-width: 104ex; }
|
||||
body.charter #article { max-width: 86ex; }
|
||||
body.georgia #article { max-width: 94ex; }
|
||||
body.iowanoldstyle #article { max-width: 90ex; }
|
||||
body.palatino #article { max-width: 97ex; }
|
||||
body.seravek #article { max-width: 87ex; }
|
||||
body.timesnewroman #article { max-width: 97ex; }
|
||||
body.uiserif #article { max-width: 93ex; }
|
||||
body.system #article {
|
||||
max-width: 83.2ex;
|
||||
}
|
||||
body.athelas #article {
|
||||
max-width: 104ex;
|
||||
}
|
||||
body.charter #article {
|
||||
max-width: 86ex;
|
||||
}
|
||||
body.georgia #article {
|
||||
max-width: 94ex;
|
||||
}
|
||||
body.iowanoldstyle #article {
|
||||
max-width: 90ex;
|
||||
}
|
||||
body.palatino #article {
|
||||
max-width: 97ex;
|
||||
}
|
||||
body.seravek #article {
|
||||
max-width: 87ex;
|
||||
}
|
||||
body.timesnewroman #article {
|
||||
max-width: 97ex;
|
||||
}
|
||||
body.uiserif #article {
|
||||
max-width: 93ex;
|
||||
}
|
||||
|
||||
:matches(body.pingfangsc, body.pingfangtc) #article { max-width: 87.6ex; }
|
||||
:matches(body.heitisc, body.heititc) #article { max-width: 74.8ex; }
|
||||
:matches(body.songtisc, body.songtitc) #article { max-width: 102ex; }
|
||||
:matches(body.kaitisc, body.kaititc) #article { max-width: 102ex; }
|
||||
:matches(body.yuantisc, body.yuantitc) #article { max-width: 86.2ex; }
|
||||
:matches(body.libiansc, body.libiantc) #article { max-width: 95ex; }
|
||||
:matches(body.weibeisc, body.weibeitc) #article { max-width: 99ex; }
|
||||
:matches(body.yuppysc, body.yuppytc) #article { max-width: 87.6ex; }
|
||||
:matches(body.pingfangsc, body.pingfangtc) #article {
|
||||
max-width: 87.6ex;
|
||||
}
|
||||
:matches(body.heitisc, body.heititc) #article {
|
||||
max-width: 74.8ex;
|
||||
}
|
||||
:matches(body.songtisc, body.songtitc) #article {
|
||||
max-width: 102ex;
|
||||
}
|
||||
:matches(body.kaitisc, body.kaititc) #article {
|
||||
max-width: 102ex;
|
||||
}
|
||||
:matches(body.yuantisc, body.yuantitc) #article {
|
||||
max-width: 86.2ex;
|
||||
}
|
||||
:matches(body.libiansc, body.libiantc) #article {
|
||||
max-width: 95ex;
|
||||
}
|
||||
:matches(body.weibeisc, body.weibeitc) #article {
|
||||
max-width: 99ex;
|
||||
}
|
||||
:matches(body.yuppysc, body.yuppytc) #article {
|
||||
max-width: 87.6ex;
|
||||
}
|
||||
|
||||
body.hiraginosansw3 #article { max-width: 75.7ex; }
|
||||
body.hiraginokakugothicpron #article { max-width: 76.4ex; }
|
||||
body.hiraginominchopron #article { max-width: 77.5ex; }
|
||||
body.hiraginomarugothicpron #article { max-width: 75.1ex; }
|
||||
body.hiraginosansw3 #article {
|
||||
max-width: 75.7ex;
|
||||
}
|
||||
body.hiraginokakugothicpron #article {
|
||||
max-width: 76.4ex;
|
||||
}
|
||||
body.hiraginominchopron #article {
|
||||
max-width: 77.5ex;
|
||||
}
|
||||
body.hiraginomarugothicpron #article {
|
||||
max-width: 75.1ex;
|
||||
}
|
||||
|
||||
body.applesdgothicneo #article { max-width: 82ex; }
|
||||
body.nanumgothic #article { max-width: 88.6ex; }
|
||||
body.nanummyeongjo #article { max-width: 94.1ex; }
|
||||
body.applesdgothicneo #article {
|
||||
max-width: 82ex;
|
||||
}
|
||||
body.nanumgothic #article {
|
||||
max-width: 88.6ex;
|
||||
}
|
||||
body.nanummyeongjo #article {
|
||||
max-width: 94.1ex;
|
||||
}
|
||||
|
||||
.page {
|
||||
/* We don't want the lines seperating pages to extend beyond the primary text column. */
|
||||
@@ -983,11 +1082,13 @@
|
||||
margin: 22px auto 0 auto;
|
||||
}
|
||||
|
||||
html.paper #article :nth-child(1 of .page), html.paper #article :nth-child(1 of .page):nth-last-child(1 of .page) {
|
||||
html.paper #article :nth-child(1 of .page),
|
||||
html.paper #article :nth-child(1 of .page):nth-last-child(1 of .page) {
|
||||
padding-top: 53px;
|
||||
}
|
||||
|
||||
html.paper #article .page-number, html.paper #article #incoming-page-corner {
|
||||
html.paper #article .page-number,
|
||||
html.paper #article #incoming-page-corner {
|
||||
/* Stop lining this text up with .page's right margin. */
|
||||
top: 14px;
|
||||
right: 0px;
|
||||
@@ -1001,13 +1102,12 @@
|
||||
padding-bottom: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<style id="theming">
|
||||
body.white {
|
||||
--body-font-color: rgb(27, 27, 27);
|
||||
--assistant-secondary-color: rgba(84, 84, 84, 1.0);
|
||||
--assistant-secondary-color: rgba(84, 84, 84, 1);
|
||||
--horizontal-line-color: rgb(220, 220, 220);
|
||||
--assistant-sidebar-color: rgb(220, 220, 220);
|
||||
--paper-shadow-color: rgba(0, 0, 0, 0.2);
|
||||
@@ -1026,7 +1126,7 @@
|
||||
}
|
||||
body.gray {
|
||||
--body-font-color: rgba(255, 255, 255, 0.78);
|
||||
--assistant-secondary-color: rgba(172, 172, 172, 1.0);
|
||||
--assistant-secondary-color: rgba(172, 172, 172, 1);
|
||||
--horizontal-line-color: rgb(111, 111, 111);
|
||||
--separator-color: rgb(111, 111, 111);
|
||||
--assistant-sidebar-color: rgba(44, 44, 44, 0.76);
|
||||
@@ -1034,7 +1134,7 @@
|
||||
}
|
||||
body.night {
|
||||
--body-font-color: rgb(176, 176, 176);
|
||||
--assistant-secondary-color: rgba(172, 172, 172, 1.0);
|
||||
--assistant-secondary-color: rgba(172, 172, 172, 1);
|
||||
--horizontal-line-color: rgb(62, 62, 62);
|
||||
--separator-color: rgb(62, 62, 62);
|
||||
--assistant-sidebar-color: rgba(44, 44, 44, 0.76);
|
||||
@@ -1042,7 +1142,7 @@
|
||||
}
|
||||
body.night.oled {
|
||||
--body-font-color: rgb(210, 210, 210);
|
||||
--assistant-secondary-color: rgba(172, 172, 172, 1.0);
|
||||
--assistant-secondary-color: rgba(172, 172, 172, 1);
|
||||
--horizontal-line-color: rgba(210, 210, 210, 0.35);
|
||||
--separator-color: rgba(210, 210, 210, 0.35);
|
||||
--assistant-sidebar-color: rgba(44, 44, 44, 0.76);
|
||||
@@ -1055,23 +1155,28 @@
|
||||
--separator-color: var(--background-color);
|
||||
}
|
||||
|
||||
html:not(.paper) body.white, body.white #article {
|
||||
html:not(.paper) body.white,
|
||||
body.white #article {
|
||||
--background-color: white;
|
||||
background-color: var(--background-color);
|
||||
}
|
||||
html:not(.paper) body.sepia, body.sepia #article {
|
||||
html:not(.paper) body.sepia,
|
||||
body.sepia #article {
|
||||
--background-color: rgb(248, 241, 227);
|
||||
background-color: var(--background-color);
|
||||
}
|
||||
html:not(.paper) body.gray, body.gray #article {
|
||||
html:not(.paper) body.gray,
|
||||
body.gray #article {
|
||||
--background-color: rgb(74, 74, 77);
|
||||
background-color: var(--background-color);
|
||||
}
|
||||
html:not(.paper) body.night, body.night #article {
|
||||
html:not(.paper) body.night,
|
||||
body.night #article {
|
||||
--background-color: rgb(18, 18, 18);
|
||||
background-color: var(--background-color);
|
||||
}
|
||||
html:not(.paper) body.night.oled, body.night.oled #article {
|
||||
html:not(.paper) body.night.oled,
|
||||
body.night.oled #article {
|
||||
--background-color: black;
|
||||
background-color: var(--background-color);
|
||||
}
|
||||
@@ -1094,7 +1199,8 @@
|
||||
color: rgb(214, 217, 223) !important;
|
||||
}
|
||||
|
||||
html.paper body.white #article, html.paper body.sepia #article {
|
||||
html.paper body.white #article,
|
||||
html.paper body.sepia #article {
|
||||
box-shadow: 0px 6px 12px 3px var(--paper-shadow-color);
|
||||
}
|
||||
html.paper body.gray #article {
|
||||
@@ -1108,23 +1214,32 @@
|
||||
color: white;
|
||||
}
|
||||
|
||||
body.sepia #article :matches(.leading-image, figure, .auxiliary, .pullquote) {
|
||||
body.sepia
|
||||
#article
|
||||
:matches(.leading-image, figure, .auxiliary, .pullquote) {
|
||||
color: rgba(79, 50, 28, 0.9);
|
||||
}
|
||||
body.gray #article :matches(.leading-image, figure, .auxiliary, .pullquote) {
|
||||
body.gray
|
||||
#article
|
||||
:matches(.leading-image, figure, .auxiliary, .pullquote) {
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
}
|
||||
body.night #article :matches(.leading-image, figure, .auxiliary, .pullquote) {
|
||||
body.night
|
||||
#article
|
||||
:matches(.leading-image, figure, .auxiliary, .pullquote) {
|
||||
color: rgba(255, 255, 255, 0.67);
|
||||
}
|
||||
body.night.oled #article :matches(.leading-image, figure, .auxiliary, .pullquote) {
|
||||
body.night.oled
|
||||
#article
|
||||
:matches(.leading-image, figure, .auxiliary, .pullquote) {
|
||||
color: rgba(210, 210, 210, 0.9);
|
||||
}
|
||||
|
||||
body.sepia #article a[href] {
|
||||
color: rgb(209, 150, 0);
|
||||
}
|
||||
body.gray #article a[href], body.night #article a[href] {
|
||||
body.gray #article a[href],
|
||||
body.night #article a[href] {
|
||||
color: rgb(90, 200, 250);
|
||||
}
|
||||
body.watch.night.oled #article a[href] {
|
||||
@@ -1232,31 +1347,36 @@
|
||||
color: rgba(210, 210, 210, 0.8);
|
||||
}
|
||||
|
||||
body.sepia #article blockquote, body.sepia #article q {
|
||||
body.sepia #article blockquote,
|
||||
body.sepia #article q {
|
||||
color: rgb(140, 112, 79);
|
||||
}
|
||||
body.sepia #article blockquote:not(.simple):not(.pullquote) {
|
||||
border-left-color: rgba(154, 128, 92, 0.1);
|
||||
}
|
||||
body.gray #article blockquote, body.gray #article q {
|
||||
body.gray #article blockquote,
|
||||
body.gray #article q {
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
}
|
||||
body.gray #article blockquote:not(.simple):not(.pullquote) {
|
||||
border-left-color: rgba(255, 255, 255, 0.15);
|
||||
}
|
||||
body.night #article blockquote, body.night #article q {
|
||||
body.night #article blockquote,
|
||||
body.night #article q {
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
}
|
||||
body.night #article blockquote:not(.simple):not(.pullquote) {
|
||||
border-left-color: rgba(255, 255, 255, 0.15);
|
||||
}
|
||||
body.night.oled #article blockquote, body.night.oled #article q {
|
||||
body.night.oled #article blockquote,
|
||||
body.night.oled #article q {
|
||||
color: rgba(210, 210, 210, 0.85);
|
||||
}
|
||||
body.night.oled #article blockquote:not(.simple):not(.pullquote) {
|
||||
border-left-color: rgba(210, 210, 210, 0.2);
|
||||
}
|
||||
body.watch.night #article blockquote, body.watch.night #article q {
|
||||
body.watch.night #article blockquote,
|
||||
body.watch.night #article q {
|
||||
color: var(--body-font-color);
|
||||
}
|
||||
body.watch.night #article blockquote:not(.simple):not(.pullquote) {
|
||||
@@ -1295,16 +1415,20 @@
|
||||
body:not(.gray):not(.night) #article picture {
|
||||
filter: none !important;
|
||||
}
|
||||
body.gray, body.night {
|
||||
body.gray,
|
||||
body.night {
|
||||
filter: invert();
|
||||
}
|
||||
body:matches(.gray, .night) #article :matches(img:not(picture > img), picture, video) {
|
||||
body:matches(.gray, .night)
|
||||
#article
|
||||
:matches(img:not(picture > img), picture, video) {
|
||||
filter: none !important;
|
||||
}
|
||||
body:matches(.gray, .night) #article iframe {
|
||||
filter: invert();
|
||||
}
|
||||
html.paper body.white #article, html.paper body.sepia #article {
|
||||
html.paper body.white #article,
|
||||
html.paper body.sepia #article {
|
||||
--paper-shadow-color: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
/* The background color of <body> is not inverted by the filter. Achieve this by manually
|
||||
@@ -1358,11 +1482,11 @@
|
||||
<script>
|
||||
window.isReaderPage = true;
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
</head>
|
||||
<body>
|
||||
<iframe aria-hidden="true" id="next-page-container"></iframe>
|
||||
<div id="article" role="article">
|
||||
<!-- This node will contain a number of div.page. -->
|
||||
</div>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -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 (
|
||||
!(
|
||||
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 (
|
||||
!(
|
||||
if (!(
|
||||
M + 1 < L &&
|
||||
this._matchesConfirmEmailFieldLabelPattern(u[M + 1])
|
||||
)
|
||||
)
|
||||
))
|
||||
continue;
|
||||
g = !0;
|
||||
}
|
||||
|
||||
@@ -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 (
|
||||
!(
|
||||
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);
|
||||
|
||||
@@ -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()),
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -489,7 +489,7 @@
|
||||
let n = [],
|
||||
o = e,
|
||||
a = 0;
|
||||
for (; o && (++a, !(a > 512)); ) {
|
||||
for (; o && (++a, !(a > 512));) {
|
||||
let e;
|
||||
for (
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user