This commit is contained in:
parent
b5ddb6f9b1
commit
526f18d01b
|
|
@ -2922,6 +2922,34 @@ $(function() {
|
|||
$('#goog-gt-votingInputTrgText').attr('title', '翻譯文字');
|
||||
$('#goog-gt-votingInputVote').attr('title', '評分');
|
||||
}, 1000);
|
||||
});
|
||||
function removeHiddenContentLinks() {
|
||||
$('a').each(function () {
|
||||
var $link = $(this);
|
||||
|
||||
// 取得連結內所有子元素
|
||||
var $children = $link.children();
|
||||
|
||||
// 若連結本身是 display:none,直接移除
|
||||
if ($link.css('display') === 'none') {
|
||||
$link.remove();
|
||||
return;
|
||||
}
|
||||
|
||||
// 若連結內有子元素,且全部都是 display:none
|
||||
if ($children.length > 0) {
|
||||
var allHidden = $children.toArray().every(function (child) {
|
||||
return $(child).css('display') === 'none';
|
||||
});
|
||||
if (allHidden) {
|
||||
$link.remove();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
setTimeout(removeHiddenContentLinks, 500);
|
||||
});
|
||||
// 執行 member等高計算,目前改用flexbox故mark掉 by ika 20160105
|
||||
// $(window).load(function() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue