Add Spiteful-Rotator.is
This commit is contained in:
commit
ff6c1bae2e
1 changed files with 21 additions and 0 deletions
21
Spiteful-Rotator.is
Normal file
21
Spiteful-Rotator.is
Normal file
|
@ -0,0 +1,21 @@
|
|||
/// @ 0.12.4
|
||||
### {
|
||||
name: "Spiteful Rotation"
|
||||
version: "0.0.1"
|
||||
author: "kio, deilann, puppygirlhornypost"
|
||||
description: "A port of puppygirlhornypost's spiteful rotation script in c++, now in a misskey plugin!"
|
||||
}
|
||||
|
||||
Plugin:register_post_form_action('Rotate', @(note, rewrite) {
|
||||
if (!note.text.trim() == '') {
|
||||
let array = note.text.split(" ")
|
||||
let final = []
|
||||
for let i, array.len {
|
||||
var rotate = 0
|
||||
if i%2 == 1 rotate = 1
|
||||
else rotate = -1
|
||||
final.push(`$[rotate.deg={rotate} {array[i]}]`)
|
||||
}
|
||||
rewrite('text', `{final.join(" ")}`)
|
||||
}
|
||||
})
|
Loading…
Add table
Reference in a new issue