MediaWiki:Addon-loadprism.js:修订间差异

添加92字节 、​ 2020年11月26日 (星期四)
优化语言猜测函数
无编辑摘要
(优化语言猜测函数)
(function () {
var thisHref = window.location.href, preList = document.querySelectorAll('#mw-content-text pre:not([done])'), el, cs = console
if (preList.length < 1) { return }
cs.log(`[pri` + `sm.` + `js\u8F85\u52A9\u4EE3\u7801]: \u4EE3\u7801\u4F5C\u8005\uFF1ASa` + `lt lov` + `ely\uFF0C\u4EE5CC BY` + `-NC` + `-SA ` + `4.0\u534F\u8BAE\u5206\u53D1\uFF0C\u8F6C\u8F7D\u65F6\u5FC5\u987B\u6CE8\u660E\u4F5C\u8005\u540D\u5B57\u201CSa` + `lt lov` + `ely\u201D\uFF0C\u5FC5\u987B\u6CE8\u660E\u4E0D\u5F97\u5546\u7528\u4E14\u4EE5\u76F8\u540C\u7684\u534F\u8BAE\u5206\u53D1`)
function langGuess(el) {
var pel = el.parentNode, i
var thisHref = window.location.href.replace('/index.php?', '/').replace('/api.php?', '/').replace('/load.php?', '/')
var langList = [
'css', 'scss', 'sass', 'less',