Skip to content

Commit

Permalink
feat: device based ua setting
Browse files Browse the repository at this point in the history
  • Loading branch information
reisxd committed Aug 31, 2024
1 parent 5818013 commit 34eb235
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tizenbrew-app/TizenBrew/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,17 @@ <h3>Change the User-Agent of TizenBrew modules for some effects like fixing the
userAgentWarnMenu("Mozilla/5.0 (LINUX; Tizen/3.0/2017.1.0) Cobalt/9.lts-gold (unlike Gecko) gles Evergreen/1.0.0 Starboard/9, Samsung_TV_KANTM_2017/T-MDEUC-1420.0 (Samsung, UE50MU7000, Wired)", true);
} else if (selectedItem.id == "QN55Q80AAFXZA") {
userAgentWarnMenu("Mozilla/5.0 (LINUX; Tizen/6.0/2021.1.3) Cobalt/21.lts.4.302899-gold (unlike Gecko) v8/7.7.299.8-jit gles Evergreen/1.4.3 Starboard/12, Samsung_TV_NIKEM2_2021/T-NKM2AKUC-2111.1 (Samsung, QN55Q80AAFXZA, Wired)", true);
} else if (selectedItem.id == "UADEVICE") {
var deviceName = "", chipsetModel, firmware, model, connectionType = "Wired";
firmware = tizen.systeminfo.getCapability("http://tizen.org/custom/sw_version");
var buildString = tizen.systeminfo.getCapability("http://tizen.org/system/build.string");
model = tizen.systeminfo.getCapability("http://tizen.org/system/model_name");

chipsetModel = buildString.split("-")[3];
deviceName = `_TV_${chipsetModel}`;
var newUserAgent = `${window.navigator.userAgent}, ${deviceName}/${firmware} (Samsung, ${model}, ${connectionType})`;
userAgentWarnMenu(newUserAgent, false);

}
break;
case 406:
Expand Down Expand Up @@ -187,6 +198,9 @@ <h1>UE50MU7000 (Works on Tizen 3+)</h1>
<div class="card" tabindex="0" id="QN55Q80AAFXZA">
<h1>QN55Q80AAFXZA (Works on Tizen 6+)</h1>
</div>
<div class="card" tabindex="0" id="UADEVICE">
<h1>User-Agent based on Device (should bring some features)</h1>
</div>
<div class="card" tabindex="0" id="cobalt9">
<h1>Cobalt 9 (Stable, works on Tizen 3+</h1>
</div>
Expand Down

0 comments on commit 34eb235

Please sign in to comment.