Revisions: Disable URL updating if a browser doesn't support the History API. Like IE < 10.
props markjaquith. see #24736. git-svn-id: http://core.svn.wordpress.org/trunk@24689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0e4a817d15
commit
8a600bf8a5
|
@ -12,7 +12,7 @@ window.wp = window.wp || {};
|
|||
revisions.debug = true;
|
||||
|
||||
revisions.log = function() {
|
||||
if ( revisions.debug )
|
||||
if ( window.console && revisions.debug )
|
||||
console.log.apply( console, arguments );
|
||||
};
|
||||
|
||||
|
@ -342,9 +342,11 @@ window.wp = window.wp || {};
|
|||
properties.baseUrl = revisions.settings.baseUrl;
|
||||
this.set( properties );
|
||||
|
||||
// Start the router
|
||||
this.router = new revisions.Router({ model: this });
|
||||
Backbone.history.start({ pushState: true });
|
||||
// Start the router if browser supports History API
|
||||
if ( window.history && window.history.pushState ) {
|
||||
this.router = new revisions.Router({ model: this });
|
||||
Backbone.history.start({ pushState: true });
|
||||
}
|
||||
},
|
||||
|
||||
updateLoadingStatus: function() {
|
||||
|
|
Loading…
Reference in New Issue