Override mime type, avoid element not found error in updater
This commit is contained in:
parent
cdff50fc17
commit
f0c185c1e7
@ -351,6 +351,7 @@
|
||||
}
|
||||
type = opts.type, cred = opts.cred, headers = opts.headers, upCallbacks = opts.upCallbacks, form = opts.form, sync = opts.sync;
|
||||
r = new XMLHttpRequest();
|
||||
r.overrideMimeType('text/html');
|
||||
type || (type = form && 'post' || 'get');
|
||||
r.open(type, url, !sync);
|
||||
for (key in headers) {
|
||||
@ -4806,7 +4807,7 @@
|
||||
hashScroll: function() {
|
||||
var post;
|
||||
|
||||
if (!(post = $.id(this.location.hash.slice(1)))) {
|
||||
if (!(post = this.location.hash.slice(1))) {
|
||||
return;
|
||||
}
|
||||
if ((Get.postFromRoot(post)).isHidden) {
|
||||
|
||||
@ -348,6 +348,7 @@
|
||||
}
|
||||
type = opts.type, cred = opts.cred, headers = opts.headers, upCallbacks = opts.upCallbacks, form = opts.form, sync = opts.sync;
|
||||
r = new XMLHttpRequest();
|
||||
r.overrideMimeType('text/html');
|
||||
type || (type = form && 'post' || 'get');
|
||||
r.open(type, url, !sync);
|
||||
for (key in headers) {
|
||||
|
||||
@ -303,6 +303,7 @@
|
||||
}
|
||||
type = opts.type, cred = opts.cred, headers = opts.headers, upCallbacks = opts.upCallbacks, form = opts.form, sync = opts.sync;
|
||||
r = new XMLHttpRequest();
|
||||
r.overrideMimeType('text/html');
|
||||
type || (type = form && 'post' || 'get');
|
||||
r.open(type, url, !sync);
|
||||
for (key in headers) {
|
||||
@ -4719,7 +4720,7 @@
|
||||
hashScroll: function() {
|
||||
var post;
|
||||
|
||||
if (!(post = $.id(this.location.hash.slice(1)))) {
|
||||
if (!(post = this.location.hash.slice(1))) {
|
||||
return;
|
||||
}
|
||||
if ((Get.postFromRoot(post)).isHidden) {
|
||||
|
||||
@ -77,6 +77,7 @@ $.extend $,
|
||||
ajax: (url, callbacks, opts={}) ->
|
||||
{type, cred, headers, upCallbacks, form, sync} = opts
|
||||
r = new XMLHttpRequest()
|
||||
r.overrideMimeType 'text/html'
|
||||
type or= form and 'post' or 'get'
|
||||
r.open type, url, !sync
|
||||
for key, val of headers
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user