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

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

View File

@@ -1,8 +1,6 @@
script(src=url_for(theme.CDN.pjax)) script(src=url_for(theme.CDN.pjax))
script. script.
var pjax = new Pjax({ let pjaxSelectors = [
elements: 'a:not([target="_blank"])',
selectors: [
'title', 'title',
'meta[name=description]', 'meta[name=description]',
'#config_change', '#config_change',
@@ -10,7 +8,15 @@ script.
'#rightside-config-hide', '#rightside-config-hide',
'#rightside-config-show', '#rightside-config-show',
'.js-pjax' '.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: pjaxSelectors,
cacheBust: false, cacheBust: false,
}) })