Surfingkeys
Surfingkeys copied to clipboard
Feature: Copy image to clipboard
Similar to ;di
, activate mode where you can pick which image to copy to clipboard.
I'd like this feature because I copy images a lot. I searched for code to do that online, found this:
https://stackoverflow.com/a/59461882/3942284
function copyElementToClipboard(element) {
window.getSelection().removeAllRanges();
let range = document.createRange();
range.selectNode(typeof element === 'string' ? document.getElementById(elementName) : element);
window.getSelection().addRange(range);
document.execCommand('copy');
window.getSelection().removeAllRanges();
}
I don't know how to integrate this into surfingkeys though, I don't do web development. I tried searching in surfingkey's code for 5 min, but I could not find where and how to plug this.
@Riveascore would you know how to proceed?
I found an alternative to surfingkeys with this feature:
https://github.com/gdh1995/vimium-c