mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-02 05:31:25 +01:00
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.debug = true;
|
||||||
|
|
||||||
revisions.log = function() {
|
revisions.log = function() {
|
||||||
if ( revisions.debug )
|
if ( window.console && revisions.debug )
|
||||||
console.log.apply( console, arguments );
|
console.log.apply( console, arguments );
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -342,9 +342,11 @@ window.wp = window.wp || {};
|
|||||||
properties.baseUrl = revisions.settings.baseUrl;
|
properties.baseUrl = revisions.settings.baseUrl;
|
||||||
this.set( properties );
|
this.set( properties );
|
||||||
|
|
||||||
// Start the router
|
// Start the router if browser supports History API
|
||||||
this.router = new revisions.Router({ model: this });
|
if ( window.history && window.history.pushState ) {
|
||||||
Backbone.history.start({ pushState: true });
|
this.router = new revisions.Router({ model: this });
|
||||||
|
Backbone.history.start({ pushState: true });
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
updateLoadingStatus: function() {
|
updateLoadingStatus: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user