tizenbrew-module 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +9 -6
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
// If the module is executed in the TizenBrew menu, force-launch the browser
|
|
3
3
|
if (window.location.href.indexOf('net22.cc') === -1) {
|
|
4
4
|
try {
|
|
5
|
-
//
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
// Use native Tizen API to launch the TV's built-in web browser
|
|
6
|
+
if (typeof tizen !== 'undefined' && tizen.application && tizen.ApplicationControl) {
|
|
7
|
+
var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/view", "https://net22.cc");
|
|
8
|
+
tizen.application.launchAppControl(appControl, null, function() {}, function(e) {
|
|
9
|
+
window.location.href = 'https://net22.cc';
|
|
10
|
+
});
|
|
11
|
+
} else {
|
|
12
|
+
window.location.href = 'https://net22.cc';
|
|
13
|
+
}
|
|
11
14
|
} catch (e) {
|
|
12
15
|
window.location.href = 'https://net22.cc';
|
|
13
16
|
}
|
package/package.json
CHANGED