tauri: expose isTauri in utils to check if gb is running in tauri
environment
This commit is contained in:
parent
e9a8387d7b
commit
8875e0604a
|
@ -28,6 +28,10 @@ weechat.factory('utils', function() {
|
||||||
return window.cordova !== undefined;
|
return window.cordova !== undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const _isTauri = window.__TAURI__ !== undefined;
|
||||||
|
var isTauri = function() {
|
||||||
|
return _isTauri;
|
||||||
|
}
|
||||||
|
|
||||||
// Inject a javascript (used by KaTeX)
|
// Inject a javascript (used by KaTeX)
|
||||||
var inject_script = function(script_url) {
|
var inject_script = function(script_url) {
|
||||||
|
@ -87,6 +91,7 @@ weechat.factory('utils', function() {
|
||||||
getClassStyle: getClassStyle,
|
getClassStyle: getClassStyle,
|
||||||
isMobileUi: isMobileUi,
|
isMobileUi: isMobileUi,
|
||||||
isCordova: isCordova,
|
isCordova: isCordova,
|
||||||
|
isTauri: isTauri,
|
||||||
inject_script: inject_script,
|
inject_script: inject_script,
|
||||||
inject_css: inject_css,
|
inject_css: inject_css,
|
||||||
hexStringToByte: hexStringToByte,
|
hexStringToByte: hexStringToByte,
|
||||||
|
|
Loading…
Reference in New Issue