Commit Graph

39 Commits

Author SHA1 Message Date
Juanjo Diaz fe5974a740 Remove unnecessary constructor parameter from Cursor 2019-02-26 23:51:33 +02:00
Pierre Ossman 47c66517ae Throw correct Error object
We've already defined the name Error as a logging function, so we
need to be more explicit when we want to refer to the exception
class.
2019-02-15 13:01:28 +01:00
Samuel Mannehed ef64917a90 Only disable scrollbars on Android and iOS
Previously scrollbars were disabled on all touch devices. This meant
that they were disabled on Windows when touch was detected. Windows does
in fact have useful scrollbars even in touch mode. Fixes Issue #1172
2019-01-09 14:59:22 +01:00
Samuel Mannehed 47b3eac82b Move UI.isSafari into core/util/browser.js
This is where the rest of these kinds of functions are.
2019-01-09 14:58:03 +01:00
Samuel Mannehed 97e23ebbb2 Reorder browser and platform info functions
Platform info functions grouped together and browser info functions
grouped together.
2019-01-09 14:56:59 +01:00
Juanjo Diaz 11ef53544f Simplify EventTargetMixin 2018-11-25 13:53:23 +02:00
Solly Ross 84586c0f17 Change copyright header (#1138)
* Change copyright header

This updates the copyright header to say "The noVNC Authors".  People
who previously had copyright listings are now under the AUTHORS file.
2018-10-09 12:15:35 +02:00
Pierre Ossman 9881899e7b Merge branch 'style' of https://github.com/CendioOssman/noVNC 2018-09-17 13:54:04 +02:00
Alexander E. Patrakov d1314d4b3a Moved the "pixels + mask -> RGBA" logic to rfb.js
As requested by Pierre Ossman - he needs this for supporting other
cursor extensions.
2018-09-07 23:01:46 +08:00
Pierre Ossman 2c5491e131 Enforce space after function name 2018-09-06 17:34:15 +02:00
Pierre Ossman 0ae5c54ab3 Enforce explicit semi-colons 2018-09-06 17:25:02 +02:00
Pierre Ossman 426a8c927b Enforce curly braces for control statements 2018-09-06 17:22:40 +02:00
Pierre Ossman 942a312779 Enforce object key spacing 2018-09-06 17:07:11 +02:00
Pierre Ossman 7b536961b2 Enforce indentation 2018-09-06 16:37:38 +02:00
Samuel Mannehed 3b7c47417e Move dragThreshold definition to util/
In order to avoid multiple declarations that has to be updated in the
case of future updates.
2018-08-10 11:24:09 +02:00
Juanjo Diaz 651c23ece3 Use fat arrow functions `const foo = () => { ... };` for callbacks
and any other function that is passed around and it's not a top level function
2018-07-12 19:06:57 +02:00
Juanjo Diaz 0e4808bf6f Use ES6 classes
Always use the shorthand notation if the function is a method of an object or class `{ foo() { ... } }` or `class bar { foo() { ... } }`
unless it's a callback in which case you a fat arrow function should be used `{ cb: () => { ... } }`
2018-07-12 19:06:57 +02:00
Pierre Ossman 67fefcf184 Merge branch 'cursor' of https://github.com/CendioOssman/noVNC 2018-07-11 13:39:37 +02:00
Pierre Ossman baa4f23ee5 Provide fallback cursor method
Some browsers don't support custom cursors, and there are cases
where the browsers refuse to show the cursor. Handle both of these
cases by letting the browser render the cursor via a floating
canvas.

This allows us to support a local cursor at all times.
2018-07-06 16:37:27 +02:00
Juanjo Diaz 2b5f94fa6a Prefer const/let over var 2018-05-24 00:27:09 +03:00
Juanjo Diaz 8727f598c2 Add eslint and fix reported issues 2018-05-24 00:25:44 +03:00
Pierre Ossman b475eed5fa Separate out cursor handling
Make cursor handling more generic in preparation for generic handling
of corner cases.
2018-03-15 17:22:21 +01:00
Pierre Ossman 3a7c0c67c1 Work around broken Alt keyup in Firefox
Firefox no longer sends keyup events properly for the Alt keys. Try
to sniff out the state of the Alt key by monitoring other events that
include its state.
2018-03-13 16:01:38 +01:00
Solly Ross a4d51bd220
Merge pull request #1009 from juanjoDiaz/move_browser_checks
Move browser checks to browser.js
2018-02-01 10:33:28 -05:00
Solly Ross 096fcc4fa3
Merge pull request #1007 from juanjoDiaz/remove_jshints_comments
Remove jshint comments
2018-01-31 10:58:20 -05:00
Juanjo Diaz 9e1bd410aa Remove jshint comments 2018-01-31 07:38:29 -08:00
Juanjo Diaz 24c99fbfd7 Remove unnecessary Log dependency in events.js 2018-01-30 08:38:46 -08:00
Juanjo Diaz 59ef29163e Move browser checks to browser.js 2018-01-30 08:35:47 -08:00
Samuel Mannehed 7279364c9a Move localization.js to app
Since it is no longer used in core. Also splits localization tests into
a separate file.
2017-11-14 15:36:12 +01:00
Samuel Mannehed 4e1c5435b8 Add missing semicolons 2017-11-11 02:10:12 +01:00
Pierre Ossman e89eef94aa Use standard EventTarget interface for events 2017-11-09 13:14:16 +01:00
Pierre Ossman 747b462337 Use standard JavaScript properties
Use normal properties with JavaScript setters and getters instead of
our homegrown stuff.

This also changes the properties to follow normal naming conventions.
2017-11-09 13:03:32 +01:00
Pierre Ossman fdff59eeb4 Move cursor URI check to RFB object
Keeps the Display object simpler, and avoids having to abuse a
property to transfer the information.
2017-11-09 12:52:05 +01:00
Pierre Ossman dd0db4d460 Allow omitting configuration for properties 2017-11-09 12:52:05 +01:00
Pierre Ossman 858ea4a774 Avoid use of 'let' and 'const'
They are not supported on older browsers, e.g. iOS 9.
2017-06-02 15:41:37 +02:00
Samuel Mannehed 333ad45c70 Don't capture touch events
They are implicitly captured anyway, and we get problems if we try
to explicitly capture them.
2017-05-11 13:34:43 +02:00
Pierre Ossman fb7e99e84b Remove browser engine detection
It is out of date and not used anyway.
2017-05-04 14:52:05 +02:00
Samuel Mannehed 41c958d450 Properly restore the default style
Setting a style to null does restore it in FF, Chrome, Safari and Edge.
But it does not work in Internet Explorer. The proper way to restore to
default values is to set it to the empty string. This works in all
browsers. Fixes issue #808.
2017-04-11 10:57:21 +02:00
Solly Ross 6d6f0db0da Refactor ES6 module structure/split up Util
This commit restructures many of the ES6 modules, splitting them
up to actual export multiple functions instead of a single object.

It also splits up Util into multiple sub-modules, to make it easier
to maintain.

Finally, localisation is renamed to localization.
2017-03-21 17:39:05 -04:00