Description
I cannot paste URL and time (or URL and anything).
copyq:
var mimeType = 'text/x-moz-url-priv';
var url = str(data(mimeType));
var clip_time = 'application/x-copyq-user-copy-time';
var time = str(data(clip_time));
//var combined = time + " " + url
var combined = url + " " + time
popup('concat',combined)
copy(combined)
focusPrevious()
paste()
hide()
In the above, the popup shows concat string fine.
If I concat time first, then URL, it pastes fine.
However, if I concat URL first and then time (or anything next), paste does not work. It only pastes the URL.
I suspect there's something at the end of the URL that's preventing paste of entire concat string. But I don't know how to go about troubleshooting this.
Please help!
CopyQ
Clipboard Manager
9.1.0Win10
Later:
Using Nirsoft Inside Clipboard I was able to view clipboard contents as hexdump showing that text/x-url-moz-private was UTF16 encoded with null terminator.
I now remove null terminator when storing latter url when copying text in browser as:
[Command]
Name=Copy URL when format incl text/x-moz-url-priv
Command="
copyq:
var mimeType = 'text/x-moz-url-priv';
if (hasClipboardFormat(mimeType)) {
var url = str(clipboard(mimeType)).replace(/\\x00/g,\"\")
setData('text/x-moz-url-priv', url);
}
"
Automatic=true
I realize I should not have posted this in issues but in discussions. Perhaps you can move it there? Thanks for a fine piece of software by the way.