🐛 修復pjax下,同時開啓Open_Graph_meta和Livere,Livere評論後臺顯示的來源頁面與實際不同 的bugs #294

This commit is contained in:
Jerry 2020-08-06 21:45:16 +08:00
parent 065093e217
commit 988cbcc331

View File

@ -1,16 +1,22 @@
script(src=url_for(theme.CDN.pjax))
script.
var pjax = new Pjax({
let pjaxSelectors = [
'title',
'meta[name=description]',
'#config_change',
'#body-wrap',
'#rightside-config-hide',
'#rightside-config-show',
'.js-pjax'
]
if (!{theme.Open_Graph_meta && theme.comments.use.includes('Livere')}) {
pjaxSelectors.unshift('meta[property="og:image"]', 'meta[property="og:title"]', 'meta[property="og:url"]')
}
const pjax = new Pjax({
elements: 'a:not([target="_blank"])',
selectors: [
'title',
'meta[name=description]',
'#config_change',
'#body-wrap',
'#rightside-config-hide',
'#rightside-config-show',
'.js-pjax'
],
selectors: pjaxSelectors,
cacheBust: false,
})