Skip to content

Instantly share code, notes, and snippets.

Phil Bacon Phil-B

Block or report user

Report or block Phil-B

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View PokeVisionRefresh
var refresh = setInterval(function(){var button = document.querySelector('.home-map-scan');if (button && !button.classList.contains('is-on-cooldown')) {;}},10000);
Phil-B / jquery.iFrameAutoHeight.js
Created Jun 7, 2011
Auto-resize a same-domain iframe to the height of it's content
View jquery.iFrameAutoHeight.js
(function($) {
iFrameAutoHeight: function() {
return this.each(function() {
var obj = $(this);
obj.height(0); //avoid flash at full height
if (obj.contents().find('body').height() > 0) { // already loaded - from cache (ie only)
} else {
obj.load(function() {
View gist:858665
// $('',this).imagesLoaded(myFunction)
// execute a callback when all images have loaded.
// needed because .load() doesn't work on cached images
// mit license. paul irish. 2010.
// webkit fix from Oren Solomianik. thx!
// callback function is passed the last image to load
// as an argument, and the collection as `this`
You can’t perform that action at this time.