Created
February 16, 2020 18:56
-
-
Save xlimit91/f7b52b30ba578139e88ea8c71d448d2b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener("load", function() { | |
// hearthis html code | |
var t = jQuery("[id^='hearthis_at_']"); | |
if (1 == t.length) { | |
/* | |
var e = t.closest(".wpb_wrapper").parent("div"); | |
e.closest(".vc_column-inner").first(".wpb_wrapper").css({ | |
"padding-top": e.outerHeight() - 30 + "px" | |
}), jQuery(e).addClass("cst-htp-sty") | |
*/ | |
} else { | |
// hearthis embed code | |
if (1 == jQuery("iframe[src^='https://hearthis.at/embed']").length) { | |
var t = jQuery("iframe[src^='https://hearthis.at/embed']")[0]; | |
jQuery(t).closest(".w-tabs-section-content").css({ | |
"padding-top": jQuery(t).outerHeight() + 25 + "px" | |
}), jQuery(t).addClass("cst-htp-sty") | |
} | |
} | |
// soundcloud embed code | |
if (1 == jQuery("iframe[src^='https://w.soundcloud.com/player']").length) { | |
var t = jQuery("iframe[src^='https://w.soundcloud.com/player']")[0]; | |
jQuery(t).closest(".w-tabs-section-content").css({ | |
"padding-top": jQuery(t).outerHeight() + 25 + "px" | |
}), jQuery(t).addClass("cst-htp-sty") | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment