From 269e147c911c5f95f7562e3f9244b6caf1993437 Mon Sep 17 00:00:00 2001 From: kio Date: Tue, 11 Feb 2025 05:24:45 +0000 Subject: [PATCH] Add level of rotate config --- Spiteful-Rotator.is | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Spiteful-Rotator.is b/Spiteful-Rotator.is index a18d85d..39f4423 100644 --- a/Spiteful-Rotator.is +++ b/Spiteful-Rotator.is @@ -1,9 +1,17 @@ /// @ 0.12.4 ### { name: "Spiteful Rotation" - version: "0.0.1" + version: "0.1.0" author: "kio, deilann, puppygirlhornypost" description: "A port of puppygirlhornypost's spiteful rotation script in c++, now in a misskey plugin!" + config: { + rotateValue: { + type: "number" + label: "Level of rotate" + description: "How hard do you need your text to rotate back and forth?" + default: 1 + } + } } Plugin:register_post_form_action('Rotate', @(note, rewrite) { @@ -11,9 +19,9 @@ let array = note.text.split(" ") let final = [] for let i, array.len { - var rotate = 0 - if i%2 == 1 rotate = 1 - else rotate = -1 + var rotate = 0 + if i%2 == 1 rotate = Plugin:config["rotateValue"] + else rotate = Plugin:config["rotateValue"] * -1 final.push(`$[rotate.deg={rotate} {array[i]}]`) } rewrite('text', `{final.join(" ")}`)