Merge pull request #11336 from twbs/fix-11317

don't use nonstandard window.location.origin in customizer JS
This commit is contained in:
Chris Rebert 2013-11-02 15:06:16 -07:00
commit fcb906ce09

View File

@ -56,7 +56,8 @@ window.onload = function () { // wait for load in a dumb way because B-0
data: JSON.stringify(data)
})
.success(function(result) {
history.replaceState(false, document.title, window.location.origin + window.location.pathname + '?id=' + result.id)
var origin = window.location.protocol + "//" + window.location.host
history.replaceState(false, document.title, origin + window.location.pathname + '?id=' + result.id)
})
.error(function(err) {
showError('<strong>Ruh roh!</strong> Could not save gist file, configuration not saved.', err)