无法在Tumblr上隐藏SCM音乐播放器

Can't hide the SCM Music Player on Tumblr

本文关键字:SCM 音乐 播放器 隐藏 Tumblr      更新时间:2023-09-26

我试图在我的 Tumblr 博客上隐藏烦人的 SCM 音乐播放器并将主容器扩展到 100%(因为播放器在底部减少了一点),但我的代码不起作用。

JS代码:

$(document).ready(function(){
    $('body').contents().find('iframe').contents().find('#contentW').css({top: 0px; bottom: 0px; right: 0px;});
    $('body').contents().find('iframe').contents().find('#playerW').css({display: none;})
});

加载的页面结构(请注意,我省略了一些不必要的代码):

<html>
    <head>
        // some Tumblr content
    </head>
    <body>
        <iframe> // unnecessary iframe generated by SCM
            <html>
                <head>
                    // some SCM content
                </head>
                <body>
                    <div id="contentW" style="top: 0px; bottom: 25px; right: 0px;">
                        // THE BLOG MAIN CONTAINER IS HERE
                    </div>
                    <div id="playerW" style="top: auto; bottom: 0px; height: 25px;">
                        // AND THE ANNOYING PLAYER IS HERE
                    </div>
                </body>
            </html>
        </iframe>
    </body>
</html>

怎么了?

我终于在没有 JS/JQuery 的情况下得到了它,只是创建了一个 CSS 文件,将其作为静态文件上传到 Tumblr,并将该链接用作 SCM 网站上的自定义皮肤。

这是 CSS 代码:

#playerW {display: none !important;}
#contentW {top: 0 !important; bottom: 0 !important; right: 0 !important;}