Removing Shopify Admin Bar

The admin bar keeps adding new tricks, like adding top: 40px to any fixed elements.

Try this:

try {
document.addEventListener("DOMContentLoaded", function(event) {
try {
var element = document.getElementById("admin_bar_iframe");
var html = document.getElementsByTagName("html")[0];
element.parentNode.removeChild(element); = "0"

} catch(ex) {}
} catch(ex) {};

function removeShopifyAdminBarHeights() {
$('[style="top: 40px;"]').css('top', '');
$(function() {
setTimeout(removeShopifyAdminBarHeights, 500);

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s