File tree 3 files changed +15
-4
lines changed
3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 1
1
( function ( ) {
2
+ if ( ! document . getElementsByClassName ) {
3
+ return ;
4
+ }
5
+ if ( Mobilebone . support == false ) {
6
+ document . querySelector ( ".page.out" ) . className = "page" ;
7
+ }
2
8
var ele_version = document . getElementsByClassName ( "version" ) ;
3
9
[ ] . slice . call ( ele_version ) . forEach ( function ( version , index ) {
4
10
version . innerHTML = "(v" + Mobilebone . VERSION + ")" ;
Original file line number Diff line number Diff line change @@ -31,7 +31,9 @@ <h2>mobilebone.js下载</h2>
31
31
}
32
32
} ) ;
33
33
} ;
34
- Mobilebone . init ( ) ;
34
+ if ( Mobilebone . support == false ) {
35
+ document . getElementById ( "indexPage" ) . className = "page" ;
36
+ }
35
37
</ script >
36
38
</ body >
37
39
</ html >
Original file line number Diff line number Diff line change 30
30
var supportHistory = "pushState" in history && "replaceState" in history ;
31
31
32
32
Mobilebone . support = supportHistory ;
33
-
34
- if ( supportHistory == false ) return Mobilebone ;
35
-
33
+
36
34
var hasInited = false ;
37
35
38
36
/**
119
117
Mobilebone . pushStateEnabled = false ;
120
118
}
121
119
120
+ /**
121
+ * if browser do not support history/classList, stop here
122
+ **/
123
+ if ( supportHistory == false ) return Mobilebone ;
124
+
122
125
123
126
/**
124
127
* Function for transition
You can’t perform that action at this time.
0 commit comments