misskey-plugins/Spiteful-Rotator.is

29 lines
917 B
Text
Raw Normal View History

2025-02-11 05:18:16 +00:00
/// @ 0.12.4
### {
name: "Spiteful Rotation"
2025-02-11 05:24:45 +00:00
version: "0.1.0"
2025-02-11 05:18:16 +00:00
author: "kio, deilann, puppygirlhornypost"
description: "A port of puppygirlhornypost's spiteful rotation script in c++, now in a misskey plugin!"
2025-02-11 05:24:45 +00:00
config: {
rotateValue: {
type: "number"
label: "Level of rotate"
description: "How hard do you need your text to rotate back and forth?"
default: 1
}
}
2025-02-11 05:18:16 +00:00
}
Plugin:register_post_form_action('Rotate', @(note, rewrite) {
if (!note.text.trim() == '') {
let array = note.text.split(" ")
let final = []
for let i, array.len {
2025-02-11 05:24:45 +00:00
var rotate = 0
if i%2 == 1 rotate = Plugin:config["rotateValue"]
else rotate = Plugin:config["rotateValue"] * -1
2025-02-11 05:18:16 +00:00
final.push(`$[rotate.deg={rotate} {array[i]}]`)
}
rewrite('text', `{final.join(" ")}`)
}
})