Skip to content

Commit

Permalink
🐞 fix: 修正网易云音乐样式
Browse files Browse the repository at this point in the history
  • Loading branch information
imlinhanchao committed May 22, 2023
1 parent cccc505 commit 72104ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderer/components/messagebox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@
toMusicBox(msg) {
let songRegexp = /http(?:s):\/\/music.163.com\/(?:#\/|)song\?id=(\d+)(&[\w=]+)*/g;
let listRegexp = /http(?:s):\/\/music.163.com\/(?:#\/|)album\?id=(\d+)(&[\w=]+)*/g;
if (msg.match(songRegexp)) msg = msg.replace(songRegexp, `<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=330 height=86 src="//music.163.com/outchain/player?type=2&id=$1&auto=0&height=66"></iframe>`);
if (msg.match(songRegexp)) msg = msg.replace(songRegexp, `<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=100% height=86 src="//music.163.com/outchain/player?type=2&id=$1&auto=0&height=66"></iframe>`);
else if (msg.match(listRegexp)) msg = msg.replace(listRegexp, `<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=100% height=210 src="//music.163.com/outchain/player?type=1&id=$1&auto=0&height=430"></iframe>`)
return msg;
},
Expand Down

0 comments on commit 72104ee

Please sign in to comment.