User:逆襲的天邪鬼/Twinkle-lzh/twinkleclose.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 27:
};
 
// 把section序号直接标在h1、h2和h3上以免在用某些编辑器时不正常
$('h1:has(.mw-headline),h2:has(.mw-headline),h3:has(.mw-headline)', '#bodyContent').each(function (index, current) {
current.setAttribute('data-section', index + 1);
});
Line 341:
var split = text.split('\n');
 
text = split[0] + '\n{{結案-首|' + params.code + '--~~~~}}\n' + split.slice(1).join('\n') + '\n{{結案-尾}}';
 
pageobj.setPageText(text);