You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: js/wet-boew.js
+11-5Lines changed: 11 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -17250,6 +17250,11 @@ var componentName = "wb-twitter",
17250
17250
};
17251
17251
}
17252
17252
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
+
17253
17258
// Set Chinese (Simplfified)'s language code to "zh-cn"
17254
17259
// If the link doesn't specify a widget language and its "in-page" language code is "zh-Hans"...
17255
17260
// Notes:
@@ -17289,8 +17294,10 @@ var componentName = "wb-twitter",
17289
17294
const mutationTarget = mutation.target;
17290
17295
17291
17296
// 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.
// -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
@@ -17353,9 +17360,8 @@ var componentName = "wb-twitter",
17353
17360
let skipToEndLink;
17354
17361
let skipToStartLink;
17355
17362
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" ) {
0 commit comments