mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-02-07 21:38:40 +00:00
Scrutinizer fixes
This commit is contained in:
parent
7fa81ff321
commit
9970805938
|
|
@ -25,6 +25,8 @@
|
|||
{
|
||||
this.canvas = canvas;
|
||||
this.ctx = canvas.getContext('2d');
|
||||
|
||||
/** global: screen */
|
||||
this.width = screen.width;
|
||||
this.height = screen.height;
|
||||
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@
|
|||
* @param {string|int} group Group id
|
||||
* @param {function} callback Callback
|
||||
* @param {boolean} remove Should be removed after execution
|
||||
* @param {boolean} remove Reset after triggering
|
||||
* @param {boolean} reset Reset after triggering
|
||||
*
|
||||
* @return {void}
|
||||
*
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
{
|
||||
const self = this;
|
||||
|
||||
/** global: Notification */
|
||||
if(Notification.permission !== 'granted' && Notification.permission !== 'denied') {
|
||||
Notification.requestPermission(function(permission) {
|
||||
if(permission === 'granted') {
|
||||
|
|
@ -40,6 +41,7 @@
|
|||
|
||||
jsOMS.Message.Notification.Browser.BrowserNotification.prototype.send = function(msg)
|
||||
{
|
||||
/** global: Notification */
|
||||
let n = new Notification(/* ... */);
|
||||
};
|
||||
}(window.jsOMS = window.jsOMS || {}));
|
||||
|
|
@ -37,6 +37,7 @@
|
|||
IPAD: 'ipad', /* IPad */
|
||||
ANDROID: 'android', /* Android */
|
||||
BLACKBERRY: 'blackberry', /* Blackberry */
|
||||
MOBILE: 'webos' /* Mobile */
|
||||
MOBILE: 'webos', /* Mobile */
|
||||
UNKNOWN: 'UNKNOWN' /* Unknown */
|
||||
});
|
||||
}(window.jsOMS = window.jsOMS || {}));
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@
|
|||
*/
|
||||
jsOMS.Message.Request.Request.getBrowser = function ()
|
||||
{
|
||||
/** global: InstallTrigger */
|
||||
/** global: navigator */
|
||||
if ((!!window.opr && !!opr.addons) || !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0) {
|
||||
return jsOMS.Message.Request.BrowserType.OPERA;
|
||||
} else if (typeof InstallTrigger !== 'undefined') {
|
||||
|
|
@ -78,11 +80,14 @@
|
|||
{
|
||||
for (let os in jsOMS.Message.Request.OSType) {
|
||||
if (jsOMS.Message.Request.OSType.hasOwnProperty(os)) {
|
||||
/** global: navigator */
|
||||
if (navigator.appVersion.toLowerCase().indexOf(jsOMS.Message.Request.OSType[os]) !== -1) {
|
||||
return jsOMS.Message.Request.OSType[os];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return jsOMS.Message.Request.OSType.UNKNOWN;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
jsOMS.UI.Input.unbind = function (input)
|
||||
{
|
||||
this.app.inputManager.getKeyboardManager().unbind(input);
|
||||
/** global: changeBind */
|
||||
input.removeEventListener('change', changeBind, false);
|
||||
};
|
||||
|
||||
|
|
@ -69,6 +70,7 @@
|
|||
break;
|
||||
case 'table':
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -133,7 +135,6 @@
|
|||
}
|
||||
} catch (exception) {
|
||||
jsOMS.Log.Logger.instance.error('Invalid JSON object: ' + xhr, 'FormManager');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@
|
|||
e = e !== null ? e.querySelectorAll('[data-lazyload]') : document.querySelectorAll('[data-lazyload]');
|
||||
const length = e.length;
|
||||
|
||||
/** global: IntersectionObserver */
|
||||
if(!this.visObs && window.IntersectionObserver) {
|
||||
this.visObs = new IntersectionObserver(function(eles, obs) {
|
||||
eles.forEach(ele => {
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@
|
|||
touch.pageX, // screenX - the page X coordinate
|
||||
touch.pageY, // screenY - the page Y coordinate
|
||||
touch.pageX, // clientX - the window X coordinate
|
||||
toch.pageY, // clientY - the window Y coordinate
|
||||
touch.pageY, // clientY - the window Y coordinate
|
||||
false, // ctrlKey
|
||||
false, // altKey
|
||||
false, // shiftKey
|
||||
|
|
@ -105,6 +105,7 @@
|
|||
|
||||
document.dispatchEvent(rightClick);
|
||||
} else if (elapsedTime < 500) {
|
||||
/** global: Event */
|
||||
const e = new Event('keyup');
|
||||
|
||||
if (distY > 100) {
|
||||
|
|
|
|||
|
|
@ -14,8 +14,16 @@
|
|||
jsOMS.Autoloader.defineNamespace('jsOMS.UI.Input.Voice');
|
||||
|
||||
// todo: remove once obsolete
|
||||
/** global: webkitSpeechRecognition */
|
||||
/** global: SpeechRecognition */
|
||||
var SpeechRecognition = typeof SpeechRecognition !== 'undefined' ? SpeechRecognition : typeof webkitSpeechRecognition !== 'undefined' ? webkitSpeechRecognition : null;
|
||||
|
||||
/** global: webkitSpeechGrammarList */
|
||||
/** global: SpeechGrammarList */
|
||||
var SpeechGrammarList = typeof SpeechGrammarList !== 'undefined' ? SpeechGrammarList : typeof webkitSpeechGrammarList !== 'undefined' ? webkitSpeechGrammarList : null;
|
||||
|
||||
/** global: webkitSpeechRecognitionEvent */
|
||||
/** global: SpeechRecognitionEvent */
|
||||
var SpeechRecognitionEvent = typeof SpeechRecognitionEvent !== 'undefined' ? SpeechRecognitionEvent : typeof webkitSpeechRecognitionEvent !== 'undefined' ? webkitSpeechRecognitionEvent : null;
|
||||
|
||||
/**
|
||||
|
|
@ -48,6 +56,7 @@
|
|||
*/
|
||||
jsOMS.UI.Input.Voice.ReadManager.prototype.read = function(text)
|
||||
{
|
||||
/** global: SpeechSynthesisUtterance */
|
||||
let utter = new SpeechSynthesisUtterance(text);
|
||||
utter.lang = this.lang;
|
||||
utter.voice = this.voice;
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
this.generalUI = new jsOMS.UI.GeneralUI();
|
||||
|
||||
const self = this;
|
||||
/** global: MutationObserver */
|
||||
this.domObserver = new MutationObserver(function(mutations) {
|
||||
const length = mutations.length;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
"use strict";
|
||||
window.addEventListener('error', function (e)
|
||||
{
|
||||
/** global: jsOMS */
|
||||
jsOMS.Log.Logger.instance.error(e.error);
|
||||
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -292,6 +292,7 @@
|
|||
case 'button':
|
||||
this.bindButton(elements[i]);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -320,6 +321,7 @@
|
|||
case 'button':
|
||||
this.bindButton(elements[i]);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user