mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-17 04:40:53 +08:00
🐛 修復pjax下,同時開啓Open_Graph_meta和Livere,Livere評論後臺顯示的來源頁面與實際不同 的bugs #294
This commit is contained in:
14
layout/includes/third-party/pjax.pug
vendored
14
layout/includes/third-party/pjax.pug
vendored
@@ -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,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user