2
2
3
3
$ ( document ) . ready ( function ( ) {
4
4
var annotations = $ ( "dt:contains('Annotations')" ) . next ( "dd" ) . children ( "span.name" ) ;
5
- addBadges ( annotations , "AlphaComponent" , ":: AlphaComponent ::" , "<span class='experimental badge'>ALPHA COMPONENT </span>" ) ;
5
+ addBadges ( annotations , "AlphaComponent" , ":: AlphaComponent ::" , "<span class='alphaComponent badge'>Alpha Component </span>" ) ;
6
6
addBadges ( annotations , "DeveloperApi" , ":: DeveloperApi ::" , "<span class='developer badge'>Developer API</span>" ) ;
7
7
addBadges ( annotations , "Experimental" , ":: Experimental ::" , "<span class='experimental badge'>Experimental</span>" ) ;
8
8
} ) ;
9
9
10
10
function addBadges ( allAnnotations , name , tag , html ) {
11
- var fullName = "org.apache.spark.annotations." + name ;
12
- var annotations = allAnnotations . children ( "a[name='" + fullName + "']" ) ;
13
- var tags = $ ( "p.comment:contains(" + tag + ")" ) . add (
14
- $ ( "div.comment p:contains(" + tag + ")" ) ) ;
11
+ var annotations = allAnnotations . filter ( ":contains('" + name + "')" )
12
+ var tags = $ ( ".cmt:contains(" + tag + ")" )
15
13
16
14
// Remove identifier tags from comments
17
15
tags . each ( function ( index ) {
@@ -21,7 +19,8 @@ function addBadges(allAnnotations, name, tag, html) {
21
19
} ) ;
22
20
23
21
// Add badges to all containers
24
- tags . prevAll ( "h4.signature" ) . prepend ( html ) ;
25
- annotations . closest ( "div.fullcomment" ) . prevAll ( "h4.signature" ) . prepend ( html ) ;
26
- annotations . closest ( "div.fullcommenttop" ) . prepend ( html ) ;
22
+ tags . prevAll ( "h4.signature" )
23
+ . add ( annotations . closest ( "div.fullcommenttop" ) )
24
+ . add ( annotations . closest ( "div.fullcomment" ) . prevAll ( "h4.signature" ) )
25
+ . prepend ( html ) ;
27
26
}
0 commit comments