Widget:Music163:修订间差异
跳到导航
跳到搜索
imported>=海豚= (创建页面,内容为“<noinclude>Only for {{tl|Music163}}</noinclude><includeonly><!--{if !isset($wgMusic163) || !$wgMusic163}--><!--{assign var="wgMusic163" value=true scope="global"}-->…”) |
imported>=海豚= 无编辑摘要 |
||
| 第77行: | 第77行: | ||
else { height_type = 430; } | else { height_type = 430; } | ||
if (float !== "none") { self.addClass(`float-${float}`); } | if (float !== "none") { self.addClass(`float-${float}`); } | ||
self.empty().append(`<a rel="nofollow noreferrer noopener" class="external text" href="https://music.163.com/#/${types[+type]}?id=${id}" target="_blank"><img src="https://s1.music.126.net/music.ico"></a><span class="music163CopyrightNotice">[<a href="javascript:void(0);">版权 | self.empty().append(`<a rel="nofollow noreferrer noopener" class="external text" href="https://music.163.com/#/${types[+type]}?id=${id}" target="_blank"><img src="https://s1.music.126.net/music.ico"></a><span class="music163CopyrightNotice">[<a href="javascript:void(0);">版权 受限</a>]</span>`).attr("title", `${title || that.title || `id ${id}`} - 网易云音乐`); | ||
const iframe = $("<iframe/>"); | const iframe = $("<iframe/>"); | ||
iframe.attr("data-src", `//music.163.com/outchain/player?type=${type}&id=${id}&auto=0&height=${height_type}`); | iframe.attr("data-src", `//music.163.com/outchain/player?type=${type}&id=${id}&auto=0&height=${height_type}`); | ||
| 第95行: | 第95行: | ||
"text-align": "center", | "text-align": "center", | ||
width: "100%", | width: "100%", | ||
}) | }) | ||
div.append(text).appendTo(self); | div.append(text).appendTo(self); | ||
iframe.data({ | iframe.data({ | ||
| 第106行: | 第106行: | ||
}); | }); | ||
self.find(".music163CopyrightNotice a").on("click", () => { | self.find(".music163CopyrightNotice a").on("click", () => { | ||
alert("网易云音乐限制了部分版权音乐的站外播放功能,如果您发现播放器无法显示或播放歌曲,则说明该歌曲被限制站外播放。\n | alert("网易云音乐限制了部分 地区 版权音乐的站外播放功能,如果您发现播放器无法显示或播放歌曲,则说明该歌曲被限制站外播放。\n我们建议点击播放器右侧网易云音乐图标,跳转到歌曲页面欣赏。"); | ||
}); | }); | ||
self.width(iframe.width() + self.find(".music163CopyrightNotice").width()); | self.width(iframe.width() + self.find(".music163CopyrightNotice").width()); | ||
2021年6月20日 (日) 08:43的版本
Only for {{Music163}}