MediaWiki:HanziConverter.js:修订间差异

删除3字节 、​ 2021年4月15日 (星期四)
处理一个因加载时序问题导致的小问题
(.)
(处理一个因加载时序问题导致的小问题)
const ignoreElements = ['TEXTAREA', 'STYLE', 'SCRIPT', 'INPUT'];
const scanAttributes = ['title', 'placeholder'];
const log = console.log, time = console.time, timeEnd = console.timeEnd, HanziConverter = window.HanziConverterFunction;
/**开关功能 */
function userSwitch() {
}, 1500);
// 整活
log(HanziConverterwindow.HanziConverterFunction(prefix + ' 一只忧郁的台湾乌龟', type));
}
/** */
let node = nodes[i];
if (typeof node.textContent == 'string') {
let _temp = HanziConverterwindow.HanziConverterFunction(node.textContent, type);
if (node.textContent != _temp) // 防止过于频繁的写入
node.textContent = _temp;
let n = nodes[i];
if (n instanceof HTMLElement && (_temp = (_a = n.getAttribute(attr)) !== null && _a !== void 0 ? _a : '').length > 0) {
let _temp_ = HanziConverterwindow.HanziConverterFunction(_temp, type);
if (_temp_ != _temp)
n.setAttribute(attr, _temp_);