Skip to content

Commit 83ff630

Browse files
authored
Merge pull request #3584 from davidfischer/force-ad-display
Force a specific ad to be displayed
2 parents 31043bd + 66a7b6d commit 83ff630

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ function init() {
2828
get_data['subproject'] = true;
2929
}
3030

31+
if (typeof URL !== 'undefined' && typeof URLSearchParams !== 'undefined') {
32+
// Force a specific promo to be displayed
33+
var params = new URL(window.location).searchParams;
34+
var force_promo = params.get('promo');
35+
if (force_promo) {
36+
get_data['promo'] = force_promo;
37+
}
38+
}
39+
3140
// Get footer HTML from API and inject it into the page.
3241
$.ajax({
3342
url: rtd.api_host + "/api/v2/footer_html/",

0 commit comments

Comments
 (0)