Skip to content

Commit

Permalink
fix: add space after '//' and semicolon after const, delete an unless…
Browse files Browse the repository at this point in the history
… blank line
  • Loading branch information
fallenice2022 committed Feb 28, 2024
1 parent 255199b commit cab43dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/gadgets/noteTA/MediaWiki:Gadget-noteTA.js
Expand Up @@ -69,7 +69,7 @@ mw.hook("wikipage.content").add(() => {
wikitext += `* 转换标题为:-{D|${titleConv}}-${titleDesc}\n`;
wikitext += `* 实际标题为:-{R|${actualTitle}}-;当前显示为:-{|${titleConv}}-\n`;
}
//conversation group
// conversation group
const $noteTAgroups = $dom.find(".noteTA-group > *[data-noteta-group]");
if ($noteTAgroups.length > 1) {
collapse = true;
Expand All @@ -92,7 +92,7 @@ mw.hook("wikipage.content").add(() => {
}
}
const $noteTAlocal = $dom.find(".noteTA-local");
//hidden rule in article
// hidden rule in article
if ($noteTAlocal.length) {
collapse = true;
wikitext += `<span style="float: right;">{{edit|${actualTitle}|section=0}}</span>\n`;
Expand All @@ -105,7 +105,7 @@ mw.hook("wikipage.content").add(() => {
}
}
wikitext += "{{noteTA/footer}}\n";
//API request
// API request
try {
const results = await api.post({
action: "parse",
Expand All @@ -130,7 +130,6 @@ mw.hook("wikipage.content").add(() => {
} catch {
$dialog.html(`<span class="noteTAViewer-error">${wgULS("网络错误", "網路錯誤", null, null, "網絡錯誤")}${wgULS("请稍后再试", "請稍後再試")}</span>`);
}

}
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/global/zh/MediaWiki:Moeskin.js
Expand Up @@ -232,7 +232,7 @@
title: "本页使用了标题或全文手工转换",
}).append(noteTAbutton);
$("#p-languages-group").append(noteTAicon);
}
};
/* 等待 document 加载完毕 */
await $.ready;
/* fixWikiLove */
Expand Down

0 comments on commit cab43dc

Please sign in to comment.