Skip to content

Instantly share code, notes, and snippets.

@ThinaticSystem
Last active February 15, 2022 06:54
Show Gist options
  • Save ThinaticSystem/81e8e28e77261eb645b751431826caa0 to your computer and use it in GitHub Desktop.
Save ThinaticSystem/81e8e28e77261eb645b751431826caa0 to your computer and use it in GitHub Desktop.
### {
name: "猫去勢"
version: "2"
author: "ThinaticSystem"
description: "nyaizeを強制解除します"
permissions: []
config: {}
}
@deNyaize(text) {
$process <- text
process <- Str:replace(process, "にゃ", "な")
process <- Str:replace(process, "ニャ", "ナ")
Str:replace(process, "ニャ", "ナ")
}
Plugin:register_note_view_interruptor(@(note) {
? (note.text != _) {
note.text <- deNyaize(note.text)
}
? Core:and((note.renote != _) (note.renote.text != _)) {
note.renote.text <- deNyaize(note.renote.text)
}
? Core:and((note.reply != _) (note.reply.text != _)) {
note.reply.text <- deNyaize(note.reply.text)
}
note
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment