Skip to content

Commit

Permalink
update classes name
Browse files Browse the repository at this point in the history
  • Loading branch information
Outpox committed May 16, 2022
1 parent b8e83be commit b08a3c3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
28 changes: 14 additions & 14 deletions bluetooth.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,20 @@ async function refreshPairedList() {
function getDeviceRowHTML(device) {
const div = document.createElement('div');
div.classList.add(
'gamepaddialog_Field_eKmEX',
'gamepaddialog_WithFirstRow_2bDqk',
'gamepaddialog_InlineWrapShiftsChildrenBelow_3LCXh',
'gamepaddialog_WithBottomSeparator_3YKpU',
'gamepaddialog_ExtraPaddingOnChildrenBelow_3nLNL',
'gamepaddialog_StandardPadding_xIITX',
'gamepaddialog_Clickable_2Huzv',
'gamepaddialog_HighlightOnFocus_2HFrm',
'gamepaddialog_Field_S-_La',
'gamepaddialog_WithFirstRow_qFXi6',
'gamepaddialog_InlineWrapShiftsChildrenBelow_pHUb6',
'gamepaddialog_WithBottomSeparator_1lUZx',
'gamepaddialog_ExtraPaddingOnChildrenBelow_5UO-_',
'gamepaddialog_StandardPadding_XRBFu',
'gamepaddialog_Clickable_27UVY',
'gamepaddialog_HighlightOnFocus_wE4V6',
'Panel',
'Focusable'
);

if (!device.connected) {
div.classList.add('gamepaddialog_Disabled_aIeh3');
div.classList.add('gamepaddialog_Disabled_1pmyx');
}

div.onclick = () => toggleDeviceConnection(device.mac, device.connected);
Expand All @@ -90,14 +90,14 @@ async function refreshPairedList() {
}

div.innerHTML =
`<div class="gamepaddialog_FieldLabelRow_2VcTl">
<div class="gamepaddialog_FieldLabel_3jMlJ">
<div class="gamepaddialog_FieldLeadIcon_3CGpa">
`<div class="gamepaddialog_FieldLabelRow_H9WOq">
<div class="gamepaddialog_FieldLabel_3b0U-">
<div class="gamepaddialog_FieldLeadIcon_OKYIj">
${deviceSVG}
</div>
<div>
<span>${device.name}</span>
<div class="gamepaddialog_FieldChildren_2rhav">
<div class="gamepaddialog_FieldChildren_14_HB">
${device.connected ?
'<div class="bluetoothsettings_NotConnectedLabel_31Z4e connected">Connected</div>' :
'<div class="bluetoothsettings_NotConnectedLabel_31Z4e">Not Connected</div>'}
Expand All @@ -112,7 +112,7 @@ async function refreshPairedList() {
const devices = await getPairedDevices();
const devicesDiv = document.querySelector('#devices');

devicesDiv.querySelectorAll('.gamepaddialog_Field_eKmEX').forEach(e => e.remove());
devicesDiv.querySelectorAll('.gamepaddialog_Field_S-_La').forEach(e => e.remove());

devices.forEach(device => {
devicesDiv.insertAdjacentElement('beforeend', getDeviceRowHTML(device));
Expand Down
24 changes: 12 additions & 12 deletions main_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@

<body onload="main()">
<div class="quickaccessmenu_TabGroupPanel_1QO7b Panel Focusable">
<div class="quickaccesscontrols_PanelSectionRow_26R5w">
<div class="quickaccesscontrols_PanelSectionRow_26R5w">
<div class="quickaccesscontrols_PanelSectionRow_2VQ88">
<div class="quickaccesscontrols_PanelSectionRow_2VQ88">

<div class="gamepaddialog_Field_eKmEX gamepaddialog_WithFirstRow_2bDqk gamepaddialog_WithBottomSeparator_3YKpU gamepaddialog_ExtraPaddingOnChildrenBelow_3nLNL gamepaddialog_StandardPadding_xIITX gamepaddialog_HighlightOnFocus_2HFrm Panel Focusable"
<div class="gamepaddialog_Field_S-_La gamepaddialog_WithFirstRow_qFXi6 gamepaddialog_VerticalAlignCenter_3XNvA gamepaddialog_ExtraPaddingOnChildrenBelow_5UO-_ gamepaddialog_StandardPadding_XRBFu gamepaddialog_HighlightOnFocus_wE4V6 Panel Focusable"
style="--indent-level:0;">
<div class="gamepaddialog_FieldLabelRow_2VcTl">
<div class="gamepaddialog_FieldLabel_3jMlJ">
<div class="gamepaddialog_FieldLeadIcon_3CGpa">
<div class="gamepaddialog_FieldLabelRow_H9WOq">
<div class="gamepaddialog_FieldLabel_3b0U-">
<div class="gamepaddialog_FieldLeadIcon_OKYIj">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36" fill="none">
<path
d="M29.41 11L16.81 2H14V13.68L8.17999 9.39L5.79999 12.61L13.12 18L5.79999 23.39L8.17999 26.61L14 22.32V34H16.81L29.41 25L19.87 18L29.41 11ZM18 7.76L22.59 11L18 14.41V7.76ZM18 28.24V21.59L22.59 25L18 28.24Z"
Expand All @@ -44,14 +44,14 @@
</div>
</div>

<div class="quickaccesscontrols_PanelSectionRow_26R5w">
<div class="gamepaddialog_Field_eKmEX gamepaddialog_WithFirstRow_2bDqk gamepaddialog_WithBottomSeparator_3YKpU gamepaddialog_ExtraPaddingOnChildrenBelow_3nLNL gamepaddialog_StandardPadding_xIITX gamepaddialog_HighlightOnFocus_2HFrm Panel Focusable"
<div class="quickaccesscontrols_PanelSectionRow_2VQ88">
<div class="gamepaddialog_Field_S-_La gamepaddialog_WithFirstRow_qFXi6 gamepaddialog_VerticalAlignCenter_3XNvA gamepaddialog_ExtraPaddingOnChildrenBelow_5UO-_ gamepaddialog_StandardPadding_XRBFu gamepaddialog_HighlightOnFocus_wE4V6 Panel Focusable"
style="--indent-level:0;">
<div class="gamepaddialog_FieldLabelRow_2VcTl">
<div class="gamepaddialog_FieldLabel_3jMlJ">
<div class="gamepaddialog_FieldLabelRow_H9WOq">
<div class="gamepaddialog_FieldLabel_3b0U-">
Paired devices
</div>
<div id="refreshDiv" class="gamepaddialog_FieldChildren_2rhav" onclick="main()">
<div id="refreshDiv" class="gamepaddialog_FieldChildren_14_HB" onclick="main()">
<svg id="refresh" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 367.136 367.136"
fill="none">
<path d="M336.554,86.871c-11.975-18.584-27.145-34.707-44.706-47.731L330.801,0H217.436v113.91L270.4,60.691
Expand All @@ -61,7 +61,7 @@
C365.442,150.223,355.453,116.201,336.554,86.871z" fill="currentColor" />
</svg>
<svg id="loader" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36" fill="none"
class="gamepadui_svg_library_Spinner_3m_2l">
class="gamepadui_svg_library_Spinner_2Hc4f">
<path
d="M18 10C17.4696 10 16.9609 9.78929 16.5858 9.41421C16.2107 9.03914 16 8.53043 16 8V3H20V8C20 8.53043 19.7893 9.03914 19.4142 9.41421C19.0391 9.78929 18.5304 10 18 10Z"
fill="currentColor"></path>
Expand Down

0 comments on commit b08a3c3

Please sign in to comment.