如何删除 tumblr 控件/按钮/iframe?
How to remove tumblr controls / buttons / iframe?
我已尝试使用以下代码从我的 Tumblr 中删除控件/按钮/iframe。 None 其中似乎可以使用新的控制栏。
#tumblr_controls { display: none;}
<script>
var T_C = document.getElementById('tumblr_controls');
T_C.parentNode.removeChild(T_C);
</script>
我刚刚检查过,Tumblr 似乎不再使用 ID tumblr_controls
,这很可能是您的代码无法正常工作的原因。试试这个;
body > iframe:first-child { display: none !important; }
此 select 或 select 任何 iframe
,即 body
下的第一个 child。
如果您有一些脚本将其他内容放在开头,请删除 :first-child
(确保您没有任何其他 iframe
直接位于 body
下)。您可以选择使用新的 class(es) Tumblr 用于 select 您想要隐藏的元素,但是当 Tumblr 更改 class(es) 时,您的代码将停止工作.
相关元素现在的样子示例:
<iframe class="tmblr-iframe tmblr-iframe--desktop-loggedin-controls iframe-controls--desktop" name="desktop-loggedin-controls" scrolling="no" src="https://www.tumblr.com/dashboard/iframe?tumblelogName=example" width="0" frameborder="0" height="0">
... codes ...
</iframe>
在我的 tumblr 中,body 标签后面有两个 iframe...所以我就这样做了。希望对您有所帮助!
body > iframe:first-child, body > iframe:nth-child(2) {display: none;}
只是想说,是的,它仍然有效!我已经为概念设置制作了一个小型音乐播放器(使用 Tumblr 作为免费主机)并且我非常渴望找到解决方案因为 body > iframe:first-child { display: none !important; } 没有取消嵌入的 IFRAME!!!!现在我的 tumblr 嵌入完全没有它的品牌!!!!!!
我已尝试使用以下代码从我的 Tumblr 中删除控件/按钮/iframe。 None 其中似乎可以使用新的控制栏。
#tumblr_controls { display: none;}
<script>
var T_C = document.getElementById('tumblr_controls');
T_C.parentNode.removeChild(T_C);
</script>
我刚刚检查过,Tumblr 似乎不再使用 ID tumblr_controls
,这很可能是您的代码无法正常工作的原因。试试这个;
body > iframe:first-child { display: none !important; }
此 select 或 select 任何 iframe
,即 body
下的第一个 child。
如果您有一些脚本将其他内容放在开头,请删除 :first-child
(确保您没有任何其他 iframe
直接位于 body
下)。您可以选择使用新的 class(es) Tumblr 用于 select 您想要隐藏的元素,但是当 Tumblr 更改 class(es) 时,您的代码将停止工作.
相关元素现在的样子示例:
<iframe class="tmblr-iframe tmblr-iframe--desktop-loggedin-controls iframe-controls--desktop" name="desktop-loggedin-controls" scrolling="no" src="https://www.tumblr.com/dashboard/iframe?tumblelogName=example" width="0" frameborder="0" height="0">
... codes ...
</iframe>
在我的 tumblr 中,body 标签后面有两个 iframe...所以我就这样做了。希望对您有所帮助!
body > iframe:first-child, body > iframe:nth-child(2) {display: none;}
只是想说,是的,它仍然有效!我已经为概念设置制作了一个小型音乐播放器(使用 Tumblr 作为免费主机)并且我非常渴望找到解决方案因为 body > iframe:first-child { display: none !important; } 没有取消嵌入的 IFRAME!!!!现在我的 tumblr 嵌入完全没有它的品牌!!!!!!