MediaWiki:Common.js:修订间差异
无编辑摘要 |
无编辑摘要 |
||
第1行: | 第1行: | ||
/* 这里的任何JavaScript将为所有用户在每次页面加载时加载。 */ | /* 这里的任何JavaScript将为所有用户在每次页面加载时加载。 */ | ||
$(' | $('#mw-mf-page-center').append( | ||
'<link href="https://cdnjs.cloudflare.com/ajax/libs/artalk/2.8.7/Artalk.css" rel="stylesheet" / | '<link href="https://cdnjs.cloudflare.com/ajax/libs/artalk/2.8.7/Artalk.css" rel="stylesheet" />' | ||
); | ); | ||
$(" | $(".patrollink").append('<div id="Comments"></div>'); | ||
function getComments() { | function getComments() { | ||
Artalk.init({ | Artalk.init({ | ||
第14行: | 第13行: | ||
}) | }) | ||
} | } | ||
var script = document.createElement('script');script.type = "text/javascript";script.src = "https://cdnjs.cloudflare.com/ajax/libs/artalk/2.8.7/Artalk.js";script.onload =getComments;document.body.appendChild(script); |
2024年8月27日 (二) 08:14的版本
/* 这里的任何JavaScript将为所有用户在每次页面加载时加载。 */
$('#mw-mf-page-center').append(
'<link href="https://cdnjs.cloudflare.com/ajax/libs/artalk/2.8.7/Artalk.css" rel="stylesheet" />'
);
$(".patrollink").append('<div id="Comments"></div>');
function getComments() {
Artalk.init({
el: '#Comments',
pageKey: 'https://shitoubaike.org/wiki/' +encodeURI(RLCONF.wgPageName) ,
pageTitle: RLCONF.wgTitle,
server: 'https://comments.shitoubaike.org',
site: '石头百科',
})
}
var script = document.createElement('script');script.type = "text/javascript";script.src = "https://cdnjs.cloudflare.com/ajax/libs/artalk/2.8.7/Artalk.js";script.onload =getComments;document.body.appendChild(script);