Skip to content

Commit 9c5832a

Browse files
committed
CD 9269977639: Update wet-boew dist cdn files
1 parent 5629da2 commit 9c5832a

File tree

4 files changed

+19
-13
lines changed

4 files changed

+19
-13
lines changed

js/wet-boew.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17250,6 +17250,11 @@ var componentName = "wb-twitter",
1725017250
};
1725117251
}
1725217252

17253+
// Show a warning if the timelineTitle variable isn't a string
17254+
if ( typeof i18nText.startNotice !== "string" ) {
17255+
console.warn( componentName + ": i18n text is missing. Iframe title override and skip links will be disabled." );
17256+
}
17257+
1725317258
// Set Chinese (Simplfified)'s language code to "zh-cn"
1725417259
// If the link doesn't specify a widget language and its "in-page" language code is "zh-Hans"...
1725517260
// Notes:
@@ -17289,8 +17294,10 @@ var componentName = "wb-twitter",
1728917294
const mutationTarget = mutation.target;
1729017295

1729117296
// Override the timeline iframe's title right after Twitter's widget script adds it
17292-
// Note: The timeline's iframe title is English-only, uses "Twitter" and is written in title case ("Twitter Timeline")... This replaces it with an i18n version that uses "X" and is written in sentence case.
17293-
if ( mutationTarget.nodeName === "IFRAME" && mutationTarget.title !== i18nText.timelineTitle ) {
17297+
// Notes:
17298+
// -The timeline's iframe title is English-only, uses "Twitter" and is written in title case ("Twitter Timeline")... This replaces it with an i18n version that uses "X" and is written in sentence case.
17299+
// -Only proceed if the i18n variable is a string... otherwise this'll trigger an infinite loop of attribute mutations
17300+
if ( mutationTarget.nodeName === "IFRAME" && mutationTarget.title !== i18nText.timelineTitle && typeof i18nText.timelineTitle === "string" ) {
1729417301
mutationTarget.title = i18nText.timelineTitle;
1729517302
}
1729617303
break;
@@ -17353,9 +17360,8 @@ var componentName = "wb-twitter",
1735317360
let skipToEndLink;
1735417361
let skipToStartLink;
1735517362

17356-
// Abort if Twitter username is falsy
17357-
// Note: Unlikely to happen unless the username doesn't exist... in which case Twitter's third party widget script will have already failed and triggered an exception by this point
17358-
if ( !username ) {
17363+
// Abort if Twitter username is falsy or i18n variables aren't strings
17364+
if ( !username || typeof i18nText.timelineTitle !== "string" ) {
1735917365
return;
1736017366
}
1736117367

js/wet-boew.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/wet-boew.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

payload.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1705,18 +1705,18 @@
17051705
},
17061706
"@/js/wet-boew.js": {
17071707
"hashes": {
1708-
"sha256": "PwSPdIuLZ84nYMiyehtsVWKWCqBgirGLRhjLFyEKdrU=",
1709-
"sha512": "tdCnTLvEjtwQJDpvi0Q2a/3KbAFTte4IOtAC8Ry/pZlO2Hc1UwYNQBcv5hKK6ToNHMsp459PpbGTjkEECj/h0g=="
1708+
"sha256": "PtllWflUkbZNVTHRFKC1KaYFicooLHr5rOP8tURQgbM=",
1709+
"sha512": "jWB4aomUyHwStuPg99fxZkXx21nWQA7Zh+dOZQ1BTN5ZvfQiNI8VfuXxuwkC92bsT2hrBsXpAJM/m8M2CMBNGg=="
17101710
},
1711-
"integrity": "sha256-PwSPdIuLZ84nYMiyehtsVWKWCqBgirGLRhjLFyEKdrU= sha512-tdCnTLvEjtwQJDpvi0Q2a/3KbAFTte4IOtAC8Ry/pZlO2Hc1UwYNQBcv5hKK6ToNHMsp459PpbGTjkEECj/h0g==",
1711+
"integrity": "sha256-PtllWflUkbZNVTHRFKC1KaYFicooLHr5rOP8tURQgbM= sha512-jWB4aomUyHwStuPg99fxZkXx21nWQA7Zh+dOZQ1BTN5ZvfQiNI8VfuXxuwkC92bsT2hrBsXpAJM/m8M2CMBNGg==",
17121712
"path": "/js/wet-boew.js"
17131713
},
17141714
"@/js/wet-boew.min.js": {
17151715
"hashes": {
1716-
"sha256": "y5RgdIj4NG2+L3F7CyNtxzldST/deoODokxe40bdRBo=",
1717-
"sha512": "3bn2g1rURyzv5cEc2aL6mGlQ3KmbrX0cXZLoPkhbnVMuG9BSLAAdrAQ9GRu4wfsefV5+MOHwct1za7LFnSCyGQ=="
1716+
"sha256": "3vrwjknWVDrULRuQDrfiHQhQSdYNN6NKVHFxgbEH6j4=",
1717+
"sha512": "S5Kl7MiUj/xuvGvCrOp9tF4yIg1RIcoBR2v6YQ0ysPI2DhR21uq/oLDUb6tSFVafaL3FvtAwMBrG0fkuQTe+qg=="
17181718
},
1719-
"integrity": "sha256-y5RgdIj4NG2+L3F7CyNtxzldST/deoODokxe40bdRBo= sha512-3bn2g1rURyzv5cEc2aL6mGlQ3KmbrX0cXZLoPkhbnVMuG9BSLAAdrAQ9GRu4wfsefV5+MOHwct1za7LFnSCyGQ==",
1719+
"integrity": "sha256-3vrwjknWVDrULRuQDrfiHQhQSdYNN6NKVHFxgbEH6j4= sha512-S5Kl7MiUj/xuvGvCrOp9tF4yIg1RIcoBR2v6YQ0ysPI2DhR21uq/oLDUb6tSFVafaL3FvtAwMBrG0fkuQTe+qg==",
17201720
"path": "/js/wet-boew.min.js"
17211721
}
17221722
}

0 commit comments

Comments
 (0)