Skip to content

Commit 4fea14e

Browse files
authored
Merge pull request readthedocs#5571 from rtfd/davidfischer/ad-close-fix-firefox
Fix for Firefox to close the ad correctly
2 parents 78d224f + b9d0cce commit 4fea14e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

readthedocs/core/static-src/core/js/doc-embed/sponsorship.js

+3
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ Promo.prototype.display = function () {
199199
$(window).on('DOMContentLoaded.rtdinview load.rtdinview scroll.rtdinview resize.rtdinview', handler);
200200
$('.wy-side-scroll').on('scroll.rtdinview', handler);
201201

202+
// Add a handler to close the ad on mobile
203+
$('.ethical-close').on('click', function () { $(ad_selector).hide(); return false; });
204+
202205
this.post_promo_display();
203206
};
204207

0 commit comments

Comments
 (0)