tizenbrew-module 1.0.3 → 1.0.4

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.
Files changed (2) hide show
  1. package/index.js +7 -23
  2. package/package.json +2 -3
package/index.js CHANGED
@@ -1,23 +1,12 @@
1
1
  (function () {
2
- // If the module is executed in the TizenBrew menu, force-launch the browser
3
- if (window.location.href.indexOf('net22.cc') === -1) {
4
- try {
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
- }
14
- } catch (e) {
15
- window.location.href = 'https://net22.cc';
16
- }
17
- return; // Stop script execution in the menu.
2
+ // Inject the CSS dynamically because TizenBrew 'mods' packages only inject the main JS file.
3
+ var css = '* { cursor: none !important; } ::-webkit-scrollbar { display: none !important; } html, body { -ms-overflow-style: none !important; scrollbar-width: none !important; } :focus, .tizen-focus { outline: none !important; border: 5px solid #00ffcc !important; transform: scale(1.1) !important; box-shadow: 0 0 20px 5px rgba(0, 255, 204, 0.8) !important; transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease !important; z-index: 9999 !important; border-radius: 8px; background-color: rgba(0, 255, 204, 0.1) !important; } .focusable { transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease; }';
4
+ var styleNode = document.createElement('style');
5
+ styleNode.innerHTML = css;
6
+ if (document.head) {
7
+ document.head.appendChild(styleNode);
18
8
  }
19
9
 
20
- // Wrapped in an IIFE to prevent variable collisions in TizenBrew's global scope
21
10
  var KEY_ENTER = 13;
22
11
  var KEY_UP = 38;
23
12
  var KEY_DOWN = 40;
@@ -29,7 +18,7 @@
29
18
 
30
19
  var focusableElements = [];
31
20
  var currentFocusIndex = -1;
32
-
21
+
33
22
  function updateFocusableElements() {
34
23
  try {
35
24
  var nodeList = document.querySelectorAll(FOCUSABLE_SELECTORS);
@@ -222,19 +211,14 @@
222
211
  }
223
212
  });
224
213
 
225
- // Replace MutationObserver completely with a safe setInterval
226
- // This is incredibly robust for older TVs, prevents any infinite DOM loops,
227
- // and doesn't rely on the MutationObserver API existing.
228
214
  setInterval(function () {
229
215
  updateFocusableElements();
230
216
  }, 1500);
231
217
 
232
- // Initial check
233
218
  window.addEventListener('load', function () {
234
219
  updateFocusableElements();
235
220
  });
236
221
 
237
- // Failsafe execution
238
222
  updateFocusableElements();
239
223
 
240
224
  })();
package/package.json CHANGED
@@ -1,14 +1,13 @@
1
1
  {
2
2
  "name": "tizenbrew-module",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Custom TV remote mapping for net22.cc",
5
5
  "main": "index.js",
6
- "style": "style.css",
7
6
  "author": "Netmirror",
8
7
  "packageType": "mods",
9
8
  "appName": "Net22 Player",
10
9
  "title": "Net22 Player",
11
- "websiteURL": "*://*.net22.cc/*",
10
+ "websiteURL": "https://net22.cc/",
12
11
  "keys": [
13
12
  "ArrowUp",
14
13
  "ArrowDown",