Action Directory / Get Link

Install

Gets a link to the current file and copies it to the clipboard.

Shared by @alankantz

Script

var path,
    name,
    pathWithName,
    link;

path = editor.getFolderPath();
name = editor.getFileName();
pathWithName = path + "/" + name
link = "onewriter://x-callback-url/open?path=" + encodeURIComponent(pathWithName)

app.setClipboard(link);

ui.hudSuccess("Copied link");