Drafts Action Directory

Move last line to first line

Posted by Austin Ha, Last update 3 months ago

Move the bottom line of the document to the top!

Install

Steps

  • script

    var lines = draft.content.split("\n");
    
    let lastLine = lines.pop();
    
    lines.unshift(lastLine); // add to front
    
    draft.content = lines.join("\n");
    
    draft.update();

Options

  • After Success Default
    Notification Error
    Log Level Info

Comments

Actions available in the Action Directory are uploaded by community members. Use appropriate caution reviewing downloaded actions before use.