mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2025-09-15 12:58:48 +08:00
🐛 修復pjax下,同時開啓Open_Graph_meta和Livere,Livere評論後臺顯示的來源頁面與實際不同 的bugs #294
This commit is contained in:
parent
065093e217
commit
988cbcc331
26
layout/includes/third-party/pjax.pug
vendored
26
layout/includes/third-party/pjax.pug
vendored
@ -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,
|
||||
})
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user