Skip to content

Instantly share code, notes, and snippets.

@cuongdcdev
Created August 24, 2020 17:34
Show Gist options
  • Save cuongdcdev/8a19c5a5a2d75a6b825946af6a9cfbc0 to your computer and use it in GitHub Desktop.
Save cuongdcdev/8a19c5a5a2d75a6b825946af6a9cfbc0 to your computer and use it in GitHub Desktop.
jQuery(document).ready(function(a){backwpup_htmlspecialchars=function(t){return jQuery("<span>").text(t).html()},a.fn.backwpupDelayKeyup=function(t){var i=0;return a(this).keyup(function(){clearTimeout(i),i=setTimeout(t,200)}),a(this)},backwpup_tb_position=function(){var t=a("#TB_window"),i=a(window).width(),e=a(window).height(),n=720<i?720:i,h=525<e?525:e,o=0;return a("body.admin-bar").length&&(o=28),0<t.length&&(t.width(n-50).height(h-45-o),a("#TB_iframeContent").width(n-50).height(h-75-o),t.css({"margin-left":"-"+parseInt((n-50)/2,10)+"px"}),void 0!==document.body.style.maxWidth&&t.css({top:20+o+"px","margin-top":"0"})),a("a.thickbox").each(function(){var t=a(this).attr("href");t&&(t=(t=t.replace(/&width=[0-9]+/g,"")).replace(/&height=[0-9]+/g,""),a(this).attr("href",t+"&width="+(n-80)+"&height="+(h-85-o)))})},a(window).resize(function(){backwpup_tb_position()}),backwpup_tb_position()});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment