diff --git a/noVNC/custom.css b/noVNC/custom.css
new file mode 100644
index 0000000..582b821
--- /dev/null
+++ b/noVNC/custom.css
@@ -0,0 +1,116 @@
+.custom_toolbar {
+ position: absolute;
+ width: 52px;
+ height: 99.5%;
+ top: 0px;
+ left: -65px;
+ z-index: 100;
+ padding: 2px;
+ background-color: #EEEEEE;
+ box-shadow: 1px 0 5px #000000;
+}
+
+.custom_toolbar_divider1 {
+ width: 40px;
+ height: 1px;
+ margin: 5px;
+ background-color: #000;
+ opacity: 0.1;
+}
+
+.custom_toolbar_divider2 {
+ width: 40px;
+ height: 1px;
+ margin: 5px;
+ background-color: #000;
+ opacity: 0.0;
+}
+
+.custom_toolbar_clicker {
+ position: absolute;
+ width: 43px;
+ height: 36px;
+ margin-top: -2px;
+ margin-left: 54px;
+ line-height: 60px;
+ text-align: center;
+ opacity: 1.0;
+ cursor: pointer;
+ background-repeat: no-repeat;
+ background-position: center;
+ background-image: url(images/pop_more.png);
+}
+
+.custom_toolbar_btn {
+ width: 40px;
+ height: 20px;
+
+ font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
+ font-size: 13px;
+ line-height: 20px;
+ text-align: center;
+ margin: 15px 5px 15px 5px;
+
+ border: 1px solid #bbbbbb;
+ border-radius: 4px;
+ color: #33444E;
+ background-color: #EEEEEE;
+ box-shadow: 0px 0px 3px #bbbbbb;
+ cursor: pointer;
+}
+
+.custom_toolbar_btn_hover {
+ -webkit-box-shadow: inset 0px 0px 5px 2px rgba(0,0,0,0.3);
+ -moz-box-shadow: inset 0px 0px 5px 2px rgba(0,0,0,0.3);
+ box-shadow: inset 0px 0px 5px 2px rgba(0,0,0,0.3);
+}
+
+.custom_toolbar_btn_selected {
+ background-color: #bfbfbf;
+}
+
+.custom_mask {
+ top: 0px;
+ left: 0px;
+ display: none;;
+ position: absolute;
+ background-color: #000;
+ opacity: 0.5;
+ z-index: 200;
+}
+
+.custom_pause_icon {
+ background-repeat: no-repeat;
+ background-position: center;
+ background-image: url("images/pause.png");
+}
+
+.custom_resume_icon {
+ background-repeat: no-repeat;
+ background-position: center;
+ background-image: url("images/resume.png");
+}
+
+.custom_scale_icon {
+ background-repeat: no-repeat;
+ background-position: center;
+ background-image: url("images/scale.png");
+}
+
+.custom_not_scale_icon {
+ background-repeat: no-repeat;
+ background-position: center;
+ background-image: url("images/not_scale.png");
+}
+
+.custom_quality_icon {
+ margin: 3px 0px 0px 8px;
+ width: 24px;
+ height: 14px;
+ border-radius: 12px;
+ color: #fff;
+ background-color: #4d4d4d;
+ font-size: 12px;
+ line-height: 14px;
+ font-weight: bolder;
+}
\ No newline at end of file
diff --git a/noVNC/images/not_scale.png b/noVNC/images/not_scale.png
new file mode 100644
index 0000000..b293432
Binary files /dev/null and b/noVNC/images/not_scale.png differ
diff --git a/noVNC/images/pause.png b/noVNC/images/pause.png
new file mode 100644
index 0000000..c8905e1
Binary files /dev/null and b/noVNC/images/pause.png differ
diff --git a/noVNC/images/pop_less.png b/noVNC/images/pop_less.png
index ad85a05..1092476 100755
Binary files a/noVNC/images/pop_less.png and b/noVNC/images/pop_less.png differ
diff --git a/noVNC/images/pop_more.png b/noVNC/images/pop_more.png
index dac7e72..626299e 100755
Binary files a/noVNC/images/pop_more.png and b/noVNC/images/pop_more.png differ
diff --git a/noVNC/images/resume.png b/noVNC/images/resume.png
new file mode 100644
index 0000000..17e6a27
Binary files /dev/null and b/noVNC/images/resume.png differ
diff --git a/noVNC/images/scale.png b/noVNC/images/scale.png
new file mode 100644
index 0000000..d370551
Binary files /dev/null and b/noVNC/images/scale.png differ
diff --git a/noVNC/include/rfb.js b/noVNC/include/rfb.js
index a591ca2..e030b09 100644
--- a/noVNC/include/rfb.js
+++ b/noVNC/include/rfb.js
@@ -35,28 +35,6 @@ var RFB;
this._rfb_tightvnc = false;
this._rfb_xvp_ver = 0;
- // In preference order
- this._encodings = [
- ['COPYRECT', 0x01 ],
- ['TIGHT', 0x07 ],
- ['TIGHT_PNG', -260 ],
- ['HEXTILE', 0x05 ],
- ['RRE', 0x02 ],
- ['RAW', 0x00 ],
- ['DesktopSize', -223 ],
- ['Cursor', -239 ],
-
- // Psuedo-encoding settings
- //['JPEG_quality_lo', -32 ],
- ['JPEG_quality_med', -26 ],
- //['JPEG_quality_hi', -23 ],
- //['compress_lo', -255 ],
- ['compress_hi', -247 ],
- ['last_rect', -224 ],
- ['xvp', -309 ],
- ['ExtendedDesktopSize', -308 ]
- ];
-
this._encHandlers = {};
this._encNames = {};
this._encStats = {};
@@ -131,7 +109,6 @@ var RFB;
'wsProtocols': ['binary', 'base64'], // Protocols to use in the WebSocket connection
'repeaterID': '', // [UltraVNC] RepeaterID to connect to
'viewportDrag': false, // Move the viewport on mouse drags
-
// Callback functions
'onUpdateState': function () { }, // onUpdateState(rfb, state, oldstate, statusMsg): state update/change
'onPasswordRequired': function () { }, // onPasswordRequired(rfb): VNC password is required
@@ -144,6 +121,53 @@ var RFB;
'onXvpInit': function () { }, // onXvpInit(version): XVP extensions active for this connection
});
+ try{
+ // Use my custom 'jpeg_quality'.
+ this._encodings = [
+ // ['COPYRECT', 0x01 ],
+ ['TIGHT', 0x07 ],
+ ['TIGHT_PNG', -260 ],
+ ['HEXTILE', 0x05 ],
+ ['RRE', 0x02 ],
+ ['RAW', 0x00 ],
+ ['DesktopSize', -223 ],
+ ['Cursor', -239 ],
+
+ // Psuedo-encoding settings
+ ['JPEG_quality_lo', -32 + jpeg_quality ],
+ // ['JPEG_quality_med', -28 ],
+ // ['JPEG_quality_hi', -23 ],
+ // ['compress_lo', -255 ],
+ ['compress_hi', -247 ],
+ ['last_rect', -224 ],
+ ['xvp', -309 ],
+ ['ExtendedDesktopSize', -308 ]
+ ];
+ }
+ catch(e){
+ // If my custom 'jpeg_quality' is not defined, just use default setting.
+ this._encodings = [
+ ['COPYRECT', 0x01 ],
+ ['TIGHT', 0x07 ],
+ ['TIGHT_PNG', -260 ],
+ ['HEXTILE', 0x05 ],
+ ['RRE', 0x02 ],
+ ['RAW', 0x00 ],
+ ['DesktopSize', -223 ],
+ ['Cursor', -239 ],
+
+ // Psuedo-encoding settings
+ //['JPEG_quality_lo', -32 ],
+ ['JPEG_quality_med', -26 ],
+ //['JPEG_quality_hi', -23 ],
+ //['compress_lo', -255 ],
+ ['compress_hi', -247 ],
+ ['last_rect', -224 ],
+ ['xvp', -309 ],
+ ['ExtendedDesktopSize', -308 ]
+ ];
+ }
+
// main setup
Util.Debug(">> RFB.constructor");
diff --git a/noVNC/include/util.js b/noVNC/include/util.js
index ed0e3cd..406adbe 100644
--- a/noVNC/include/util.js
+++ b/noVNC/include/util.js
@@ -468,7 +468,16 @@ Util.getEventPosition = function (e, obj, scale) {
var realy = docY - pos.y;
var x = Math.max(Math.min(realx, pos.width - 1), 0);
var y = Math.max(Math.min(realy, pos.height - 1), 0);
- return {'x': x / scale, 'y': y / scale, 'realx': realx / scale, 'realy': realy / scale};
+
+ try{
+ // Use my custom 'Scale' rate.
+ return {'x': x / Scale.x, 'y': y / Scale.y, 'realx': realx / Scale.x, 'realy': realy / Scale.y};
+ }
+ catch(e){
+ // If my custom 'Scale' is not defined, just use default 'scale'.
+ return {'x': x / scale, 'y': y / scale, 'realx': realx / scale, 'realy': realy / scale};
+ }
+
};
diff --git a/noVNC/vnc_auto.html b/noVNC/vnc_auto.html
index ea0b974..689140f 100644
--- a/noVNC/vnc_auto.html
+++ b/noVNC/vnc_auto.html
@@ -35,6 +35,7 @@
+