sysend.js icon indicating copy to clipboard operation
sysend.js copied to clipboard

Add API to send to primary window

Open jcubic opened this issue 3 years ago • 0 comments

This can be implemented like this:

function sendToPrimary(data) {
    return sysend.list().then(list => {
        return list.find(window => window.primary);
    }).then(primary => {
        sysend.post(primary.id, data);
    });
}

It can be handy to allow:

sysend.post('primary', data);

jcubic avatar Feb 13 '22 15:02 jcubic