MediaWiki:Common.js:修订间差异
创建页面,内容为“→这里的任何JavaScript将为所有用户在每次页面加载时加载。: $('#mw-mf-page-center').append( '<link href="https://cdnjs.cloudflare.com/ajax/libs/artalk/2.8.7/Artalk.css" rel="stylesheet" /><script src="https://cdnjs.cloudflare.com/ajax/libs/artalk/2.8.7/Artalk.js"></script>' ) $(".patrollink").append('<div id="Comments"></div>') Artalk.init({ el: '#Comments', pageKey: 'https://shitoubaike.org/wiki/' +encodeURI(RLCONF.…” |
更新版本 |
||
(未显示同一用户的5个中间版本) | |||
第1行: | 第1行: | ||
/* 这里的任何JavaScript将为所有用户在每次页面加载时加载。 */ | /* 这里的任何JavaScript将为所有用户在每次页面加载时加载。 */ | ||
$(' | $('body').append( | ||
'<link href="https://cdnjs.cloudflare.com/ajax/libs/artalk/2. | '<link href="https://cdnjs.cloudflare.com/ajax/libs/artalk/2.9.1/Artalk.css" rel="stylesheet" />' | ||
) | ); | ||
$(". | $(".mw-parser-output").append('<h2><span ></span><span class="mw-headline" >评论区</span> </h2><div id="Comments"></div>'); | ||
function getComments() { | |||
Artalk.init({ | 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.9.1/Artalk.js";script.onload =getComments;document.body.appendChild(script); |
2024年10月9日 (三) 16:24的最新版本
/* 这里的任何JavaScript将为所有用户在每次页面加载时加载。 */
$('body').append(
'<link href="https://cdnjs.cloudflare.com/ajax/libs/artalk/2.9.1/Artalk.css" rel="stylesheet" />'
);
$(".mw-parser-output").append('<h2><span ></span><span class="mw-headline" >评论区</span> </h2><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.9.1/Artalk.js";script.onload =getComments;document.body.appendChild(script);