Commit Graph

1775 Commits

Author SHA1 Message Date
Joel Martin 57430b8c12 ui.js: fix drag button so it can be toggled off. 2012-10-19 12:18:21 -05:00
Joel Martin e881ce5a1b Merge remote branch 'Medical-Insight/non-square-cursor-fix' 2012-10-18 17:44:13 -05:00
Joel Martin 8e2d749605 util.js: script load sequential execution changes.
Related to issue: https://github.com/kanaka/noVNC/issues/205

Split out the function to load a single script to Util.load_script.

In order to get sequential load, when on IE set the script defer flag.
It is currently working on webkit and firefox but just in case also
set the script.async flag to make sure that scripts execute in the
order they are added. Scripts should still load in parallel.
2012-10-18 16:13:00 -05:00
Joel Martin 60106f240a Revert "supprt ALTGR key event"
This reverts commit 079504a6d2.
2012-10-17 15:37:24 -05:00
Joel Martin c527482ebf Merge pull request #195 from moobyfr/keyboard-altgr
Keyboard altgr
2012-10-17 13:30:50 -07:00
Joel Martin 35785a9081 Add binary/base64 data mode to perf/playback tests. 2012-10-17 11:58:13 -05:00
Joel Martin 6f4b1e4071 Refactor dynamic script loading. Add util.js:load_scripts()
Related to issue/pulls:
https://github.com/kanaka/noVNC/issues/194
https://github.com/kanaka/noVNC/pull/201
https://github.com/kanaka/noVNC/pull/202

In IE9, the window.onload event can fire before dynamically loaded
scripts have finished loading. This can result in either WebSocket (in
the case of vnc_auto.html) or RFB (in the case of vnc.html) not being
defined at the point when window.onload is called.

- Move the load_scripts routine from vnc.js to util.js (so that
  websockify can use it too). Also, refactor to work when load_scripts
  is called by a script that itself uses load_scripts. When the whole
  chain of dynamically loaded scripts is finished then call
  window.onscriptsload. Use this mechanism in all the places that
  depend on dynamic loading of scripts: vnc.html, vnc_auto.html,
  websock.js, tests/vnc_playback.html, and tests/vnc_perf.html.

- Use the new window.onscriptsload handler instead of window.onload.

- Remove include/start.js and do the script loading and startup event
  handling in include/ui.js instead.
2012-10-17 11:58:12 -05:00
vj 6f4cbb3f3c Always generate square cursor images in changeCursor (fix portrait mode issue).
This is a workaround for corrupted non-square cursors seen on some
Windows 7 machines with NVIDIA cards. The corruption only happens when
the screen is in portrait mode.
2012-10-17 09:56:20 +02:00
Joel Martin 7a6c94b6b9 Merge pull request #191 from takaha/altgr
support ALTGR key event
2012-10-16 08:09:35 -07:00
Joel Martin e16ad2fd02 Refactoring hot blocks to help Chrome optimizing compiler. 2012-10-15 13:48:07 -05:00
Joel Martin 1d728ace69 Change noVNC license to from LGPLv3 to MPL 2.0
The MPL 2.0 license is a "file-level" copyleft license vs the
"project-level" nature of the L/GPL. The intention of noVNC has
always been that it should be easy to incorporate into existing
projects and sites whether free/open or proprietary/commercial. The MPL
2.0 is designed for this sort of combination project but still
requires that any distributed modifications to noVNC source files must
also be published under the same license.

In addition, the MPL 2.0 allows the code to be used in L/GPL projects
(the secondary license clause). This means that any projects that are
already incorporating noVNC should not be impacted by this change and
in fact it should clarify the licensing situation (the exact
application of the L/GPL to web applications and interpreted code is
somewhat ambiguous).

The HTML, CSS, image and font files continue to be under more
permissive licenses (see LICENSE.txt). The included websockify python
code remains under a LGPLv3 license although the include/websock.js
file from the websockify component is now under MPL 2.0 as well.

Permission was received from other noVNC authors to make this change to their
code license on the following dates:

    - Chris Gordon (UI): Jun 24, 2012
    - Antoine Mercadal (DOM,*util.js): Oct 10, 2012
    - William Lightning (UltraVNC repeater): Oct 10, 2012
    - Mike Tinglof (tight encoding): Oct 15, 2012
2012-10-15 13:35:00 -05:00
Joel Martin ab7674ff73 include/base64.js: update to MPL 2.0 base64 code from Mozilla
This updated version is imported from:
http://hg.mozilla.org/mozilla-central/raw-file/ec10630b1a54/js/src/devtools/jint/sunspider/string-base64.js
2012-10-10 14:36:44 -05:00
Blindauer Emmanuel c76b2a8101 Handle Super and Menu keys (Windows keys) 2012-10-06 10:31:47 +02:00
Hirokazu Takahashi 079504a6d2 supprt ALTGR key event 2012-09-25 15:55:06 +09:00
Joel Martin 8dfd916946 Update websockify
Update to websockify febaeee85c

Gracefully handle errors when popping kwargs:
https://github.com/kanaka/websockify/pull/53
2012-09-21 07:09:45 -05:00
Joel Martin 8534fea664 debian/novnc.install: pick up include/start.js 2012-09-20 14:04:35 -05:00
Joel Martin d5fe15096b include/webutil.js: fix when 'chrome' global not present. 2012-09-17 17:18:44 -05:00
Joel Martin 6f955236e6 include/ui.js: call setBarPosition on initial load.
Call setBarPosition on initial load and not just when the window size
changes or scrolling happens.
2012-09-17 17:15:50 -05:00
Joel Martin 5f03c3d093 tcp-client.js: after read, try read again.
After a read completes it's possible more data is pending so issue an
immediate read again to pick this up quickly.
2012-09-17 17:15:50 -05:00
Joel Martin 2cde6e4380 include/vnc.js: dynamic load without document.write.
Instead of using document.write to load scripts, use createElement to
create and append script tags. document.write is problematic in a lot
of situation and in particular is not allowed in a Chrome
extension/packaged app.

Also, in webutil.js, instead of calling init_logging during parsing of
include/webutil.js, rely on the caller to do this. The problem is that
calling init_logging on parse tries to call Util logging functions and
the new model of dynamic load may not having Util loaded by the time
webutil is parsed.
2012-09-17 17:15:49 -05:00
Joel Martin 26945049be vnc.html, ui.js: move all Javascript to ui.js.
Move all the inline Javascript event handlers from vnc.html to
include/ui.js except the load handler which is moved to
include/start.js). This is on the path towards a Chrome
extension/packaged app since inline Javascript is prohibited in that
situation.
2012-09-17 17:15:49 -05:00
Joel Martin ee1af44161 ui.js: use localStorage/chrome.storage for settings.
Switch from using cookies to store setting to using localStorage (or
chrome.storage.sync if available in extension/app mode) for the
settings. Also refactor to make the initializing of the setting and
and loading of the UI to be more asynchronous.
2012-09-17 17:15:49 -05:00
Joel Martin 3af1c2751b webutil.js: add localStorage/chrome.storage settings.
Add routines to store/read settings in either localStorage or in
chrome.storage.sync (which is synchronized between browsers for
extensions/apps).

Before using chrome.storage.sync the initSettings routine must to
called setup the intermediate cache which speeds up access and allows
multiple setting changes to be coallesced to avoid hitting storage
change frequency limits/quotas.
2012-09-17 17:15:49 -05:00
Joel Martin 51fc3b5f03 rfb.js: add onFBResize event callback. 2012-09-17 17:15:48 -05:00
Joel Martin dbec398406 Note that tcp-stream.js is Apache 2.0 LICENSE.
Also, include Apache-2.0 license text.
2012-09-17 17:15:48 -05:00
Joel Martin 8ec3cfaacd tcp-client.js: read/write arraybuffer. Read/disconnect handling.
- enable sending and receiving of raw array buffers in addition to
  strings.

- add a read poll interval and set it to 15ms by default to detect
  and handle quickly when a message is pending.

- also, detect a disconnected state and add call registration for
  disconnect events.
2012-09-17 17:15:48 -05:00
Joel Martin 07392d4fb8 include/chrome-app/tcp-client.js: import upstream.
Import upstream code from Chrome extension telnet demo:
https://raw.github.com/GoogleChrome/chrome-app-samples/0ce28768087863c08aa04a2b9b27bd50796a77ec/telnet/tcp-client.js
2012-09-17 17:15:47 -05:00
Joel Martin 204675c85d Update websockify/websock.js.
This change pulls websockify 6d9deda9c5.

Most note worthy changes:
- Pulls in web-socket-js 7677e7a954 which updates to IETF 6455 (from
  Hixie)
- Binary support detection and use in include/websock.js
- Add ssl and unix target support
- Add multiple target support via config file/dir.
- Idle timeout exit
2012-09-17 17:00:01 -05:00
Joel Martin 3435491edb Merge branch 'binary', fix encode_message
Conflicts:
	include/websock.js

For some reason encode_message was missed. But I'm just punting and
doing the fixup in the merge. Yeah, tsk, tsk.
2012-09-14 17:46:48 -05:00
Joel Martin 39188f4ea8 doc/release.txt: fix small error in process.
Push master and version tag separately.
2012-09-14 17:07:13 -05:00
Joel Martin ceec05260e noVNC version 0.4 2012-09-14 17:00:56 -05:00
Joel Martin cbb55df039 README: simplify projects/companies. News/help/contact section.
Instead of continuing to maintain the full list of project/companies
that use noVNC in multiple places (README, wiki, web page) just link
to the wiki page.

Link to noVNC discussion group page. Link to issues page. Link to
Amazon wishlist and non-profits for appreciation.
2012-08-28 17:45:48 -05:00
Joel Martin 625040fc90 README: simplify projects/companies. News/help/contact section.
Instead of continuing to maintain the full list of project/companies
that use noVNC in multiple places (README, wiki, web page) just link
to the wiki page.

Link to noVNC discussion group page. Link to issues page. Link to
Amazon wishlist and non-profits for appreciation.
2012-08-28 17:39:02 -05:00
Joel Martin af6e9e2408 Merge pull request #185 from dark/master
Fix grep pattern when matching netstat output
2012-08-28 06:59:52 -07:00
Marco Leogrande cf068be2d8 Fix grep pattern when searching for listening sockets
The current grep pattern matches also port numbers that match only
partially the given $PORT number; e.g., if $PORT is 6080, 60800 will
match as well.

While TCP listening sockets in the 60000-65535 range are rare, they
need to be handled as well. The problem is also present if the user
selects a shorter PORT value with the --listen command line argument.

By adding a space, the pattern is fixed.
2012-08-27 22:19:51 -07:00
Joel Martin fa5b334dcb webutil.js: use decodeURIComponent on getQueryVar values. 2012-08-21 09:46:11 -05:00
Joel Martin fcff386b92 websock.js: simpler binary support, protocols param.
Use a simpler method of enabling binary transfer over WebSockets. This
still presents the user of websock.js with a plain javascript array
for the receive queue data. However, if binary support is supported
and requested then the transfer will be raw frames instead of base64
encoded.

Lots of room for optimization here but for now correct is better than
fast.

Pull from websockify 17175afd7311c55abd8d
2012-08-16 13:31:31 -05:00
Joel Martin fc003a13e7 Revert "Pull in latest websockify."
This reverts commit 4dd1bb1ecb.
2012-08-15 13:48:03 -05:00
Joel Martin ca6b3f4cb1 Revert "Fix tight decoding when using binary/non-base64 connection."
This reverts commit 14717eb468.
2012-08-15 13:47:37 -05:00
Joel Martin 14717eb468 Fix tight decoding when using binary/non-base64 connection. 2012-08-15 12:45:53 -05:00
Joel Martin 4dd1bb1ecb Pull in latest websockify.
Pull in version 376872d99.

Several changes including:
- binary/typed array support in websock.js
- unix socket support
- multiple target support via config file(s)
- prefer IPv6 option
2012-08-14 15:35:48 -05:00
BLINDAUER EMMANUEL 50b81d4470 AltGR support (Firefox 15 currently) 2012-08-02 09:09:35 +02:00
Joel Martin af1527b276 timers: fix over repeated connects.
With tight we can't ever use FBU.rects being 0 as an indication of
a full frame having been drawn.
2012-06-28 10:29:12 -05:00
Joel Martin e5d5a7d3fd websock.js: comment out debug options. 2012-06-25 21:42:56 -05:00
Joel Martin d58f8b5144 License clarification: HTML,CSS,images,fonts under permissive licenses.
Clarify in LICENSE.txt that the noVNC core library is the part that is
LGPLv3 licensed. The HTML, CSS, images and fonts are separate from the
core library and can be modified and distributed with the noVNC core
but under their own license conditions.

HTML and CSS: 2-Clause BSD
Fonts: SIL OFL 1.1
Images: CC BY SA 3.0

In other words, you can modify the layout and appearance of of noVNC
to integrate with an existing or new web site or application without
having to publish the source for those modifications under the LGPLv3.
However, use of and modification of the noVNC core library (i.e. the
core Javascript that makes up noVNC) must still be according to the
LGPLv3.

Chris Gordon was the other contributor to the HTML, CSS, and images
included with noVNC and gave permission for this license clarification
on June 23, 2012.
2012-06-24 16:29:44 -05:00
Joel Martin 18232af2a6 Merge branch 'master' of github.com:kanaka/noVNC 2012-06-23 14:23:50 -05:00
Joel Martin b50f340674 UltraVNC repeaterID cleanup.
https://github.com/kanaka/noVNC/issues/103
https://github.com/kanaka/noVNC/pull/170
2012-06-23 14:22:47 -05:00
Joel Martin 2090f1af67 Merge remote branch 'kassah/master' 2012-06-23 14:16:49 -05:00
Joel Martin 9450f132c6 remove docs/TODO: see issues marked as "feature".
https://github.com/kanaka/noVNC/issues?labels=feature
2012-06-23 14:15:41 -05:00
William Lightning 9ebc84f2e9 Update vnc_auto.html to use config option for repeaterID 2012-06-22 22:34:20 -07:00