File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
static-src/core/js/doc-embed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ function inject_ads_client() {
29
29
function create_ad_placement ( ) {
30
30
var selector = null ;
31
31
var class_name ; // Used for theme specific CSS customizations
32
+ var style_name ;
33
+ var ad_type = "readthedocs-sidebar" ;
32
34
var element ;
33
35
var offset ;
34
36
@@ -51,7 +53,8 @@ function create_ad_placement() {
51
53
class_name = 'ethical-rtd ethical-dark-theme' ;
52
54
} else if ( rtd . is_rtd_like_theme ( ) ) {
53
55
selector = 'nav.wy-nav-side > div.wy-side-scroll' ;
54
- class_name = 'ethical-rtd ethical-dark-theme' ;
56
+ style_name = 'stickybox' ;
57
+ ad_type = 'image' ;
55
58
} else if ( rtd . is_alabaster_like_theme ( ) ) {
56
59
selector = 'div.sphinxsidebar > div.sphinxsidebarwrapper' ;
57
60
class_name = 'ethical-alabaster' ;
@@ -78,8 +81,9 @@ function create_ad_placement() {
78
81
return $ ( '<div />' )
79
82
. attr ( "id" , "rtd-sidebar" )
80
83
. attr ( "data-ea-publisher" , "readthedocs" )
81
- . attr ( "data-ea-type" , "readthedocs-sidebar" )
84
+ . attr ( "data-ea-type" , ad_type )
82
85
. attr ( "data-ea-manual" , "true" )
86
+ . attr ( "data-ea-style" , style_name )
83
87
. addClass ( class_name )
84
88
. appendTo ( selector ) ;
85
89
}
You can’t perform that action at this time.
0 commit comments