|
|
@ -168,15 +168,12 @@ |
|
|
|
var xpostTarg = H.get('crosspostTarget', '[]'); |
|
|
|
var xpostTarg = H.get('crosspostTarget', '[]'); |
|
|
|
|
|
|
|
|
|
|
|
var http = new XMLHttpRequest(); |
|
|
|
var http = new XMLHttpRequest(); |
|
|
|
var lang = navigator.languages ? navigator.languages[0] : (navigator.language || navigator.userLanguage); |
|
|
|
|
|
|
|
lang = lang.substring(0, 2); |
|
|
|
|
|
|
|
var post = H.getTitleStrict(content); |
|
|
|
var post = H.getTitleStrict(content); |
|
|
|
|
|
|
|
|
|
|
|
var params = { |
|
|
|
var params = { |
|
|
|
body: post.content, |
|
|
|
body: post.content, |
|
|
|
title: title, |
|
|
|
title: title, |
|
|
|
font: font, |
|
|
|
font: font |
|
|
|
lang: lang |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
{{ if .Post.Slug }} |
|
|
|
{{ if .Post.Slug }} |
|
|
|
var url = "/api/collections/{{.EditCollection.Alias}}/posts/{{.Post.Id}}"; |
|
|
|
var url = "/api/collections/{{.EditCollection.Alias}}/posts/{{.Post.Id}}"; |
|
|
@ -187,6 +184,10 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
params.token = token; |
|
|
|
params.token = token; |
|
|
|
{{ else }} |
|
|
|
{{ else }} |
|
|
|
|
|
|
|
var lang = navigator.languages ? navigator.languages[0] : (navigator.language || navigator.userLanguage); |
|
|
|
|
|
|
|
lang = lang.substring(0, 2); |
|
|
|
|
|
|
|
params.lang = lang; |
|
|
|
|
|
|
|
|
|
|
|
var url = "/api/posts"; |
|
|
|
var url = "/api/posts"; |
|
|
|
var postTarget = H.get('postTarget', 'anonymous'); |
|
|
|
var postTarget = H.get('postTarget', 'anonymous'); |
|
|
|
if (postTarget != 'anonymous') { |
|
|
|
if (postTarget != 'anonymous') { |
|
|
|