“Widget:Lyrics”的版本间差异

添加23字节 、​ 2020年11月10日 (二) 01:26
无编辑摘要
// 计算渲染后的实际宽度
document.querySelectorAll('.Lyrics_box').forEach( function(ele) {
var width =if (ele.getBoundingClientRect().width < 720 && ele.getBoundingClientRect().width >== 0) ?{ '100%'return; : '';}
var width = (ele.getBoundingClientRect().width < 720) ? '100%' : '';
ele.querySelectorAll('.Lyrics_original, .Lyrics_translated').forEach( function(self) {
self.style.width = width;
16,874

个编辑