Created
August 28, 2013 14:25
-
-
Save kamilogorek/6366596 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.changeURL = function(photo) { | |
// not HTML history API browsers | |
if ($('html').hasClass('ie8') || $('html').hasClass('ie9')) { | |
window.location = photo.url; | |
} | |
else { | |
var stateObj = { video: 'xfactor' }; | |
history.pushState(stateObj, photo.description, photo.url); | |
} | |
}; | |
PhotosViewer.prototype.changeURL = function (stateObj, url, title) { | |
// not HTML history API browsers | |
if (!Modernizr.history) { | |
window.location = photo.url; | |
return; | |
} | |
history.pushState(stateObj, title, url); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment