Skip to content

Commit

Permalink
🚀 Updated version to 1.4.1
Browse files Browse the repository at this point in the history
Updated the version in package.json from 1.3.13 to 1.4.1, enhancing the gaming experience on autodarts.io.
  • Loading branch information
creazy231 committed Jun 17, 2024
1 parent 56312ab commit 6fb3780
Show file tree
Hide file tree
Showing 47 changed files with 578 additions and 376 deletions.
Binary file not shown.
20 changes: 0 additions & 20 deletions AD Tools/Shared (App)/Base.lproj/Main.html

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Autodarts Tools
# Tools for Autodarts

![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/creazy231/autodarts-tools/release.yml)
![GitHub package.json version](https://img.shields.io/github/package-json/v/creazy231/autodarts-tools)
Expand All @@ -11,7 +11,7 @@
)](https://apps.apple.com/de/app/autodarts-tools/id6479754594)

> [!CAUTION]
> **Autodarts Tools** is developed by the community and is not an integral part of the actual Autodarts
> **Tools for Autodarts** is developed by the community and is not an integral part of the actual Autodarts
## Features

Expand Down
20 changes: 20 additions & 0 deletions Tools for Autodarts/Shared (App)/Base.lproj/Main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'">

<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

<link rel="stylesheet" href="../Style.css">
<script src="../Script.js" defer></script>
</head>
<body>
<img src="../Icon.png" width="128" height="128" alt="Tools for Autodarts Icon">
<p class="platform-ios">You can turn on Tools for Autodarts Safari extension in Settings.</p>
<p class="platform-mac state-unknown">You can turn on Tools for Autodarts extension in Safari Extensions preferences.</p>
<p class="platform-mac state-on">Tools for Autodarts extension is currently on. You can turn it off in Safari Extensions preferences.</p>
<p class="platform-mac state-off">Tools for Autodarts extension is currently off. You can turn it on in Safari Extensions preferences.</p>
<button class="platform-mac open-preferences">Quit and Open Safari Extensions Preferences…</button>
</body>
</html>
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ function show(platform, enabled, useSettingsInsteadOfPreferences) {
document.body.classList.add(`platform-${platform}`);

if (useSettingsInsteadOfPreferences) {
document.getElementsByClassName('platform-mac state-on')[0].innerText = "AD Tools extension is currently on. You can turn it off in the Extensions section of Safari Settings.";
document.getElementsByClassName('platform-mac state-off')[0].innerText = "AD Tools extension is currently off. You can turn it on in the Extensions section of Safari Settings.";
document.getElementsByClassName('platform-mac state-unknown')[0].innerText = "You can turn on AD Tools extension in the Extensions section of Safari Settings.";
document.getElementsByClassName('platform-mac state-on')[0].innerText = "Tools for Autodarts extension is currently on. You can turn it off in the Extensions section of Safari Settings.";
document.getElementsByClassName('platform-mac state-off')[0].innerText = "Tools for Autodarts extension is currently off. You can turn it on in the Extensions section of Safari Settings.";
document.getElementsByClassName('platform-mac state-unknown')[0].innerText = "You can turn on Tools for Autodarts extension in the Extensions section of Safari Settings.";
document.getElementsByClassName('platform-mac open-preferences')[0].innerText = "Quit and Open Safari Settings…";
}

Expand Down
File renamed without changes.
File renamed without changes.

Large diffs are not rendered by default.

Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<dict>
<key>SchemeUserState</key>
<dict>
<key>AD Tools (iOS).xcscheme_^#shared#^_</key>
<key>Tools for Autodarts (iOS).xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
<integer>1</integer>
</dict>
<key>AD Tools (macOS).xcscheme_^#shared#^_</key>
<key>Tools for Autodarts (macOS).xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
<integer>0</integer>
</dict>
</dict>
</dict>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@
<application id="hnw-xV-0zn" sceneMemberID="viewController">
<menu key="mainMenu" title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
<items>
<menuItem title="AD Tools" id="1Xt-HY-uBw">
<menuItem title="Tools for Autodarts" id="1Xt-HY-uBw">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="AD Tools" systemMenu="apple" id="uQy-DD-JDr">
<menu key="submenu" title="Tools for Autodarts" systemMenu="apple" id="uQy-DD-JDr">
<items>
<menuItem title="About AD Tools" id="5kV-Vb-QxS">
<menuItem title="About Tools for Autodarts" id="5kV-Vb-QxS">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="orderFrontStandardAboutPanel:" target="Ady-hI-5gd" id="Exp-CZ-Vem"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
<menuItem title="Hide AD Tools" keyEquivalent="h" id="Olw-nP-bQN">
<menuItem title="Hide Tools for Autodarts" keyEquivalent="h" id="Olw-nP-bQN">
<connections>
<action selector="hide:" target="Ady-hI-5gd" id="PnN-Uc-m68"/>
</connections>
Expand All @@ -41,7 +41,7 @@
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
<menuItem title="Quit AD Tools" keyEquivalent="q" id="4sb-4s-VLi">
<menuItem title="Quit Tools for Autodarts" keyEquivalent="q" id="4sb-4s-VLi">
<connections>
<action selector="terminate:" target="Ady-hI-5gd" id="Te7-pn-YzF"/>
</connections>
Expand All @@ -53,7 +53,7 @@
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
<items>
<menuItem title="AD Tools Help" keyEquivalent="?" id="FKE-Sm-Kum">
<menuItem title="Tools for Autodarts Help" keyEquivalent="?" id="FKE-Sm-Kum">
<connections>
<action selector="showHelp:" target="Ady-hI-5gd" id="y7X-2Q-9no"/>
</connections>
Expand All @@ -77,7 +77,7 @@
<scene sceneID="R2V-B0-nI4">
<objects>
<windowController showSeguePresentationStyle="single" id="B8D-0N-5wS" sceneMemberID="viewController">
<window key="window" title="AD Tools" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" releasedWhenClosed="NO" animationBehavior="default" id="IQv-IB-iLA">
<window key="window" title="Tools for Autodarts" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" releasedWhenClosed="NO" animationBehavior="default" id="IQv-IB-iLA">
<windowStyleMask key="styleMask" titled="YES" closable="YES"/>
<windowCollectionBehavior key="collectionBehavior" fullScreenNone="YES"/>
<rect key="contentRect" x="196" y="240" width="425" height="325"/>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion entrypoints/match.content/StreamingMode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ async function setGameData(matchStatus: IMatchStatus) {
try {
game.players = matchStatus.playerInfo;
game.throws = matchStatus.throws;
game.turnPoints = matchStatus.turnPoints;
game.turnPoints = matchStatus.turnPoints || "🎯";
const gameSettingsContainerElement = document.querySelector("#ad-ext-game-variant")?.parentElement;
Expand Down
17 changes: 17 additions & 0 deletions entrypoints/match.content/setPlayerInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ export async function setPlayerInfo() {
const matchhasLegs = playerStatsEl.children[0].children.length > 0;
const matchhasSets = playerStatsEl.children[0].children.length > 1;

let playerLegs, playerSets;

const playerPTags = playerCardEl.querySelectorAll("p");

try {
playerLegs = playerPTags[playerPTags.length >= 4 ? 2 : 1].textContent?.trim();
if (playerPTags.length >= 4) {
playerSets = playerPTags[1].textContent?.trim();
}
} catch (e) {
console.error("Autodarts Tools: Set Player Info - Error: ", e);
}

return {
name: playerCardEl.querySelector(".ad-ext-player-name")?.textContent || "",
score: playerCardEl.querySelector(".ad-ext-player-score")?.textContent?.trim() ?? "0",
Expand All @@ -29,9 +42,13 @@ export async function setPlayerInfo() {
...(matchhasSets && { sets: playerStatsEl?.children[0]?.children[0]?.textContent?.trim() }),
darts: getDartsThrown(playerCardEl as HTMLElement),
stats: getStats(playerCardEl as HTMLElement),
legs: playerLegs && Number.parseInt(playerLegs) ? Number.parseInt(playerLegs) : 0,
sets: playerSets && Number.parseInt(playerSets) ? Number.parseInt(playerSets) : undefined,
};
});

console.log(playerInfo);

await AutodartsToolsMatchStatus.setValue({
...matchStatus,
playerCount,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "autodarts-tools",
"description": "Autodarts Tools enhances the gaming experience on autodarts.io",
"version": "1.3.13",
"version": "1.4.1",
"type": "module",
"author": {
"name": "Tobias Thiele",
Expand Down
4 changes: 2 additions & 2 deletions wxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export default defineConfig({
"storage",
"*://discord.com/api/webhooks/*",
],
name: "Autodarts Tools",
description: "Autodarts Tools enhances the gaming experience on autodarts.io",
name: "Tools for Autodarts",
description: "Tools for Autodarts enhances the gaming experience on autodarts.io",
},
dev: {
reloadCommand: "Alt+T",
Expand Down
Loading

0 comments on commit 6fb3780

Please sign in to comment.