@quintype/seo 1.40.6-embed-url.1 → 1.40.6-embed-url.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.vscode/settings.json
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
4
4
|
},
|
|
5
5
|
"editor.tabSize": 2,
|
|
6
|
-
"editor.formatOnSave": true,
|
|
7
6
|
"editor.detectIndentation": false,
|
|
7
|
+
"editor.formatOnSave": true,
|
|
8
8
|
"files.insertFinalNewline": true,
|
|
9
9
|
"files.trimTrailingWhitespace": true,
|
|
10
10
|
"editor.codeActionsOnSave": {
|
package/dist/index.cjs.js
CHANGED
|
@@ -821,12 +821,23 @@ function generateLiveBlogPostingData(structuredData = {}, story = {}, publisherC
|
|
|
821
821
|
}
|
|
822
822
|
|
|
823
823
|
function getEmbedUrl(cards) {
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
824
|
+
let embedUrl = "";
|
|
825
|
+
|
|
826
|
+
// not using the return value of top level find
|
|
827
|
+
// coz we only need the embed url
|
|
828
|
+
// find is used for early exit
|
|
829
|
+
cards.find(card => {
|
|
830
|
+
const storyElements = card["story-elements"];
|
|
831
|
+
return storyElements.find((elem, index) => {
|
|
832
|
+
if (elem["embed-url"]) {
|
|
833
|
+
embedUrl = elem["embed-url"];
|
|
834
|
+
return true;
|
|
835
|
+
}
|
|
836
|
+
return false;
|
|
837
|
+
});
|
|
838
|
+
});
|
|
839
|
+
|
|
840
|
+
return embedUrl;
|
|
830
841
|
}
|
|
831
842
|
|
|
832
843
|
function generateVideoArticleData(structuredData = {}, story = {}, publisherConfig = {}, timezone) {
|
package/package.json
CHANGED
|
@@ -255,14 +255,23 @@ function generateLiveBlogPostingData(structuredData = {}, story = {}, publisherC
|
|
|
255
255
|
}
|
|
256
256
|
|
|
257
257
|
function getEmbedUrl(cards) {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
258
|
+
let embedUrl = "";
|
|
259
|
+
|
|
260
|
+
// not using the return value of top level find
|
|
261
|
+
// coz we only need the embed url
|
|
262
|
+
// find is used for early exit
|
|
263
|
+
cards.find((card) => {
|
|
264
|
+
const storyElements = card["story-elements"];
|
|
265
|
+
return storyElements.find((elem, index) => {
|
|
266
|
+
if (elem["embed-url"]) {
|
|
267
|
+
embedUrl = elem["embed-url"];
|
|
268
|
+
return true;
|
|
269
|
+
}
|
|
270
|
+
return false;
|
|
271
|
+
});
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
return embedUrl;
|
|
266
275
|
}
|
|
267
276
|
|
|
268
277
|
|