有觉性 以安住且中立的心 照见身心的实相
MediaWiki:Common.js
来自Dhamma.cn
注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的更改的影响。
- Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5或Ctrl-R(Mac为⌘-R)
- Google Chrome:按Ctrl-Shift-R(Mac为⌘-Shift-R)
- Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5。
/* 这里的任何JavaScript将为所有用户在每次页面加载时加载。 */
/* ===================================================
彻底修复 EmbedVideo 音频 16:9 宽高比限制与消失问题
=================================================== */
$(function() {
$('audio').each(function() {
var $audio = $(this);
// 1. 设置音频标签本身的宽度和显示
$audio.attr('style', 'display: block !important; width: 100% !important; max-width: 640px !important; height: 44px !important; margin: 0 auto !important; position: static !important; visibility: visible !important; opacity: 1 !important;');
// 2. 向上寻找 EmbedVideo 生成的 wrapper 外壳,强行清空 padding-bottom 限制
var $parents = $audio.parents('.embedvideo-wrapper, .embedvideo, .embedvideo-container, .mediaContainer, [class*="embedvideo"]');
$parents.each(function() {
$(this).attr('style', function(i, style) {
return (style || '') + '; padding-bottom: 0 !important; height: auto !important; min-height: 44px !important; max-width: 640px !important; margin: 15px auto !important; overflow: visible !important;';
});
});
});
});
