PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, April 14, 2022

[FIXED] How to remove tumblr controls / buttons / iframe?

 April 14, 2022     iframe, javascript, tumblr     No comments   

Issue

I've tried the following codes to remove the controls / buttons / iframe from my Tumblr. None of them seem to work with the new control bar.

#tumblr_controls { display: none;}

<script>
var T_C = document.getElementById('tumblr_controls');
T_C.parentNode.removeChild(T_C);
</script>

Solution

I just checked, Tumblr does not seem to be using the id tumblr_controls anymore, that is most probably the reason your code is not working. Try this;

body > iframe:first-child { display: none !important; }

This selector selects any iframe that is the first child directly under body.

If you have some script putting something else in the beginning remove the :first-child (make sure you do not have any other iframe directly under body). Optionally you can use the new class(es) Tumblr is using to select the element you want to hide, but that way when Tumblr changes the class(es) your code will stop working.

An example of how the element in question looks like now:

<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>


Answered By - Person
Answer Checked By - Terry (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing