Skip to content

Commit

Permalink
Merge pull request #494 from DieterHolvoet/issue-458
Browse files Browse the repository at this point in the history
Add support for YouTube Shorts
  • Loading branch information
oscarotero authored Sep 6, 2022
2 parents 79ec23e + c2f76ef commit 32a9b57
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 147 deletions.
10 changes: 1 addition & 9 deletions scripts/update-oembed.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,10 @@
}
}

//Add missing endpoints
saveEndpoint('http://jsbin.com/oembed', ['output.jsbin.com/*']);
saveEndpoint('https://api.crowdsignal.com/oembed', ['polldaddy.com/poll/*', 'poll.fm/*']);
saveEndpoint('http://www.scribd.com/services/oembed/', ['www.scribd.com/document/*']);
saveEndpoint('https://api.imgur.com/oembed', ['imgur.com/*', 'i.imgur.com/*']);
saveEndpoint('https://www.youtube.com/oembed', ['*.youtube.com/playlist?*']);
saveEndpoint('https://www.tiktok.com/oembed', ['*.tiktok.com/*']);

//Export the endpoints
file_put_contents(
dirname(__DIR__).'/src/resources/oembed.php',
sprintf("<?php\ndeclare(strict_types = 1);\n\nreturn %s;\n", VarExporter::export($endpoints))
sprintf("<?php\ndeclare(strict_types = 1);\n\nreturn %s;\n", VarExporter::export($endpoints, VarExporter::TRAILING_COMMA_IN_ARRAY))
);

echo 'Endpoints saved'.PHP_EOL;
Expand Down
2 changes: 1 addition & 1 deletion scripts/update-suffix.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

file_put_contents(
dirname(__DIR__).'/src/resources/suffix.php',
sprintf("<?php\ndeclare(strict_types = 1);\n\nreturn %s;\n", VarExporter::export(array_values($lines)))
sprintf("<?php\ndeclare(strict_types = 1);\n\nreturn %s;\n", VarExporter::export(array_values($lines), VarExporter::TRAILING_COMMA_IN_ARRAY))
);

echo 'Suffix saved'.PHP_EOL;
Loading

0 comments on commit 32a9b57

Please sign in to comment.