Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function ($) {
- function hideUnfilledAds() {
- const $ads = $(document).find('ins.adsbygoogle');
- $ads.each(function () {
- const $ad = $(this);
- const status = $ad.attr('data-ad-status');
- if (status === 'unfilled') {
- const $wrapper = $ad.closest('.ads-wrapper');
- if ($wrapper.length) {
- $wrapper.hide();
- }
- }
- });
- }
- $(function () {
- setTimeout(() => hideUnfilledAds(), 3000);
- });
- $(document).on('jnews-ajax-load', function (e, context) {
- setTimeout(() => hideUnfilledAds(), 3000);
- });
- })(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement