Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function () {
- function decodeUTF8 (utftext) {
- var text = "",
- len = utftext.length,
- i = 0,
- c = c1 = c2 = 0,
- fromCharCode = String.fromCharCode;
- while (i < len) {
- c = utftext.charCodeAt(i);
- if (c < 128) {
- text += fromCharCode(c);
- i++;
- }
- else if ((c > 191) && (c < 224)) {
- c2 = utftext.charCodeAt(i+1);
- text += fromCharCode(((c & 31) << 6) | (c2 & 63));
- i += 2;
- }
- else {
- c2 = utftext.charCodeAt(i+1);
- c3 = utftext.charCodeAt(i+2);
- text += fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
- i += 3;
- }
- }
- return text;
- }
- UI.clipReceive = (function(clipReceive) {
- return function (rfb, text) {
- return clipReceive(rfb, decodeUTF8(text))
- };
- })(UI.clipReceive);
- })(UI);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement