mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Make method work with node 14
This commit is contained in:
parent
3a5660ce1e
commit
c602aa9de8
1 changed files with 4 additions and 1 deletions
|
|
@ -150,9 +150,12 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
posterSources () {
|
||||
const standardYTPath = 'ytimg.com/vi/'
|
||||
const standardYTPathRegex = new RegExp(standardYTPath, 'g');
|
||||
|
||||
const webpSource = {
|
||||
...this.video.thumbnail,
|
||||
srcset: this.video.thumbnail.srcset.replaceAll('ytimg.com/vi/', 'ytimg.com/vi_webp/').replace(/.png|.jpg|.jpeg/g, '.webp')
|
||||
srcset: this.video.thumbnail.srcset.replace(standardYTPathRegex, 'ytimg.com/vi_webp/').replace(/.png|.jpg|.jpeg/g, '.webp')
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue