Skip to content

Commit 25890b2

Browse files
committed
fix: 🐛 fix link button and ymp4 download url
1 parent bd17a9f commit 25890b2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

scripts/youtube_downloadVideoUI.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export default {
7474
{
7575
name: 'ymp4.com',
7676
color: colors.default,
77-
func: (url) => 'https://ymp4.download/en50/?url=' + url,
77+
func: (url) => 'https://ymp4.download/?url=' + url,
7878
},
7979
{
8080
name: 'getlinks.vip',
@@ -92,7 +92,11 @@ export default {
9292

9393
const genDownloadLinkFromProvider = (provider, url) =>
9494
/* html */
95-
`<a href="${provider.func(url)}" target="_blank" class="ufs-ytDownloadVideoUI__btn">
95+
`<a
96+
href="${provider.func(url)}"
97+
target="_blank"
98+
class="ufs-ytDownloadVideoUI__btn"
99+
onclick="((e)=>e.stopPropagation())(event)">
96100
${provider.name}
97101
</a>`;
98102

@@ -118,7 +122,7 @@ export default {
118122
<button
119123
class="yt-spec-button-shape-next yt-spec-button-shape-next--tonal yt-spec-button-shape-next--mono yt-spec-button-shape-next--size-m yt-spec-button-shape-next--icon-leading"
120124
style="position:relative;margin:6px 0;"
121-
onclick="((function(event){event.preventDefault();event.stopPropagation();const el = document.querySelector('#ufs-ytDownloadBtn__container');if (!el) return;el.style.display = el.style.display == 'flex' ? 'none' : 'flex'}))(event)"
125+
onclick="((e)=>{e.stopPropagation();const el = document.querySelector('#ufs-ytDownloadBtn__container');if (!el) return;el.style.display = el.style.display == 'flex' ? 'none' : 'flex'})(event)"
122126
>
123127
<div class="yt-spec-button-shape-next__icon">
124128
${downloadIcon}

0 commit comments

Comments
 (0)