I wasn’t satisfied with the mod’s answer since pretty much every time I’ve ever needed to use a web console like this, I’ve needed at the very least paste.
So here’s a paste function you can throw into the console. To use:
- Open developer tools
- Paste this code in and hit enter
- sendString(‘wow, i cannot believe this fundamental functionality is still nonexistent’)
You might need to play with the sendDelay (increase) if you’re having problems, but I was able to use this to add an authorized key.
To abort the sending of the current string, do sendString()
var sendString = (function(rfb, force, sendDelay) {
sendDelay = sendDelay || 25;
var _q = [];
var _qStart = function() {
var chr = _q.shift();
if (chr) {
rfb.sendKey(chr);
setTimeout(_qStart, sendDelay);
}
};
var _qStop = function() { _q.length = 0; };
var fn = function sendString(str) {
_qStop();
str = str || '';
var chr;
for (var i=0; i < str.length; i++) {
chr = str[i].charCodeAt();
_q.push(chr);
}
_qStart();
};
if (rfb.sendString && true !== force) {
console.warn('rfb.sendString not installed because it already exists. Use force if you\'d like');
}
else {
rfb.sendString = fn;
}
return fn;
})(rfb);
There also seems to be copy/paste functionality in the code (disabled?).