MCPcopy Index your code
hub / github.com/ampproject/amphtml / getDefaultEmbedAs

Function getDefaultEmbedAs

3p/facebook.js:97–99  ·  view source on GitHub ↗

* Gets the default type to embed as, if not specified. * @param {string} href * @return {string}

(href)

Source from the content-addressed store, hash-verified

95 * @return {string}
96 */
97function getDefaultEmbedAs(href) {
98 return href.match(/\/videos\/\d+\/?$/) ? 'video' : 'post';
99}
100
101/**
102 * Create DOM element for the Facebook embedded page plugin.

Callers 1

facebookFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected