Action Directory / Get Link(获取当前文件链接)

Install

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

Shared by

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");