Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.