Skip to content

Commit

Permalink
Fully roll out stickybox (#11230)
Browse files Browse the repository at this point in the history
This enables the stickybox placements (floating bottom right) on RTD theme docs, and never uses the footer placement.
  • Loading branch information
ericholscher committed Mar 19, 2024
1 parent b59ecfd commit 5315a7e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions readthedocs/core/static-src/core/js/doc-embed/sponsorship.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,10 @@ function create_ad_placement() {
selector = $('<div />').insertAfter('footer hr');
class_name = 'ethical-rtd';

// Use the stickybox placement 25% of the time during rollout
// But only when the ad would be in the footer
if (Math.random() <= 0.25) {
style_name = 'stickybox';
ad_type = 'image';
}
// Use the stickybox placement 100% of the time,
// now that we're happy with its performance.
style_name = 'stickybox';
ad_type = 'image';
} else if (rtd.is_alabaster_like_theme()) {
selector = 'div.bodywrapper .body';
class_name = 'ethical-alabaster';
Expand Down

0 comments on commit 5315a7e

Please sign in to comment.