forcecopy

force copy

이 스크립트는 직접 설치하는 용도가 아닙니다. 다른 스크립트에서 메타 지시문 // @require https://update.greasyforks.org/scripts/534397/1580089/forcecopy.js을(를) 사용하여 포함하는 라이브러리입니다.

;PushIconAction({
    name: 'force copy',
    id: 'icon-copy',
    image: GM_getResourceURL('icon-copy'),
    trigger: (t, hideIcon) => {
        const el = getSelectionElement();
        const html = el.innerHTML ? el.innerHTML : t;
        const item = new ClipboardItem({
            'text/html': new Blob([html], {type: 'text/html'}),
            'text/plain': new Blob([t], {type: 'text/plain'}),
        })
        navigator.clipboard.write([item]).catch((err) => {
            console.log(err);
            request('text=' + t, '', () => {
                hideIcon();
            }).catch(console.log);
        });
    },
});
长期地址
遇到问题?请前往 GitHub 提 Issues。