[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ops-www] branch master updated: make fns protected
From: |
gnunet |
Subject: |
[taler-taler-ops-www] branch master updated: make fns protected |
Date: |
Sun, 31 Mar 2024 16:29:06 +0200 |
This is an automated email from the git hooks/post-receive script.
nora-grothoff pushed a commit to branch master
in repository taler-ops-www.
The following commit(s) were added to refs/heads/master by this push:
new 8bfe7ef make fns protected
8bfe7ef is described below
commit 8bfe7ef0f929e3447e9981f8cec1163963199a17
Author: Nullptrderef <nullptrderef@proton.me>
AuthorDate: Sun Mar 31 16:29:03 2024 +0200
make fns protected
---
static/js/vendored/ua.ts | 42 +++++++++++++++---------------------------
1 file changed, 15 insertions(+), 27 deletions(-)
diff --git a/static/js/vendored/ua.ts b/static/js/vendored/ua.ts
index f743110..18ee218 100644
--- a/static/js/vendored/ua.ts
+++ b/static/js/vendored/ua.ts
@@ -109,50 +109,38 @@ export default class Platform {
if (this.browser) document.body.classList.add(this.browser);
}
- public get desktop(): boolean {
- return this.device === Device.Desktop;
- }
-
- public get tablet(): boolean {
- return this.device === Device.Tablet;
- }
-
- public get mobile(): boolean {
- return this.device === Device.Mobile;
- }
-
/** Checks if the user is on desktop (true if not mobile and not tablet) */
- public isDesktop(): boolean {
+ protected isDesktop(): boolean {
return !this.isMobile() && !this.isTablet();
}
/** Checks if the user is on a tablet or not */
- public isTablet(): boolean {
+ protected isTablet(): boolean {
return /tablet|ipad/i.test(this.userAgent);
}
/** Checks if the user is on a list of known phones */
- public isMobile(): boolean {
+ protected isMobile(): boolean {
return /mobile|iphone|ipod|android|windows *phone/i.test(this.userAgent);
}
/** Checks if the user is on android */
- public isAndroid(): boolean {
+ protected isAndroid(): boolean {
return /android/i.test(this.userAgent);
}
/** Checks if the user is on iOS */
- public isIOS(): boolean {
+ protected isIOS(): boolean {
return /ipad|iphone|ipod/i.test(this.userAgent);
}
/** Checks if the user is on Linux */
- public isLinux(): boolean {
+ protected isLinux(): boolean {
return /linux/i.test(this.userAgent);
}
/** Checks if the user is on Macos/MacOS */
- public isMacOS(): boolean {
+ protected isMacOS(): boolean {
return /macintosh|os *x/i.test(this.userAgent);
}
@@ -160,36 +148,36 @@ export default class Platform {
* Checks if the user is on a Windows User-Agent
* Note: Name is misleading; Windows refers to itself as Win32 on x64 aswell.
*/
- public isWin32(): boolean {
+ protected isWin32(): boolean {
return /windows|win64|win32/i.test(this.userAgent);
}
/** Checks if we're chrome/chromium based */
- public isChromiumBased(): boolean {
+ protected isChromiumBased(): boolean {
return /chrome|chromium/i.test(this.userAgent);
}
/** Checks if we're chrome/chromium but not a fork thereof */
- public isChrome(): boolean {
+ protected isChrome(): boolean {
return this.isChromiumBased() && !this.isOpera() && !this.isEdge();
}
/** Checks if we're on firefox */
- public isFirefox(): boolean {
+ protected isFirefox(): boolean {
return /firefox/i.test(this.userAgent);
}
/** Checks if we're on opera */
- public isOpera(): boolean {
+ protected isOpera(): boolean {
return /opr/i.test(this.userAgent);
}
/** Chceks if we're on Edge */
- public isEdge(): boolean {
+ protected isEdge(): boolean {
return /edge/i.test(this.userAgent);
}
/** Checks if we're on Safari */
- public isSafari(): boolean {
+ protected isSafari(): boolean {
return (
/safari/i.test(this.userAgent) &&
!this.isChrome() &&
@@ -199,7 +187,7 @@ export default class Platform {
}
/** Checks if we're on IE/pre-chromium Edge */
- public isIE(): boolean {
+ protected isIE(): boolean {
return /msie|trident/i.test(this.userAgent);
}
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-taler-ops-www] branch master updated: make fns protected,
gnunet <=