Open spongebob-mock in Script Kit
// Menu: Spongebob Mocking!// Description: Copy, run and paste!// Author: Ambushfall// Shortcut: ctrl shift ximport '@johnlindquist/kit'const str = await getSelectedText() || await clipboard.readText();const splitStr = str.split(' ')var newString = ''for (let i = 0; i < splitStr.length; i++) {for (let j = 0; j < splitStr[i].length; j++) {// get last char indexconst lastIndexOfSplit = splitStr[i].length - 1;// If the index matches the current add spaceconst addTrailingSpace = j == lastIndexOfSplit ? ' ' : ''const char = `${splitStr[i][j]}${addTrailingSpace}`const formatChar = j % 2 == 0 ? char.toLowerCase() : char.toUpperCase()newString += formatChar;}}await clipboard.writeText(newString);