1
0
mirror of https://github.com/chylex/Discord-History-Tracker.git synced 2024-11-25 22:42:51 +01:00

Compare commits

..

No commits in common. "d35280a6a6fed6accf951925d1927fc854204399" and "2424a8ac8db863bbcee55d384d6268ce00ed6016" have entirely different histories.

7 changed files with 18 additions and 20 deletions

View File

@ -20,13 +20,13 @@
<DebugType>none</DebugType> <DebugType>none</DebugType>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.5" /> <PackageReference Include="Avalonia" Version="11.0.0" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.0.5" /> <PackageReference Include="Avalonia.Controls.DataGrid" Version="11.0.0" />
<PackageReference Include="Avalonia.Controls.ItemsRepeater" Version="11.0.5" /> <PackageReference Include="Avalonia.Controls.ItemsRepeater" Version="11.0.0" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.5" /> <PackageReference Include="Avalonia.Desktop" Version="11.0.0" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.5" Condition=" '$(Configuration)' == 'Debug' " /> <PackageReference Include="Avalonia.Diagnostics" Version="11.0.0" Condition=" '$(Configuration)' == 'Debug' " />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.5" /> <PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.0" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.5" /> <PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Server\Server.csproj" /> <ProjectReference Include="..\Server\Server.csproj" />

View File

@ -40,9 +40,7 @@ static class DiscordAppSettings {
public static async Task<bool?> AreDevToolsEnabled() { public static async Task<bool?> AreDevToolsEnabled() {
try { try {
return AreDevToolsEnabled(await ReadSettingsJson()); return AreDevToolsEnabled(await ReadSettingsJson());
} catch (Exception e) { } catch (Exception) {
Log.Error("Cannot read settings file.");
Log.Error(e);
return null; return null;
} }
} }

View File

@ -9,7 +9,7 @@ class DISCORD {
} }
static getMessageElements() { static getMessageElements() {
return this.getMessageOuterElement().querySelectorAll("[class*='message_']"); return this.getMessageOuterElement().querySelectorAll("[class*='message-']");
} }
static hasMoreMessages() { static hasMoreMessages() {
@ -168,7 +168,7 @@ class DISCORD {
if (dms) { if (dms) {
let name; let name;
for (const ele of dms.querySelectorAll("[class*='channel_'] [class*='selected_'] [class^='name_'] *")) { for (const ele of dms.querySelectorAll("[class*='channel-'] [class*='selected-'] [class^='name-'] *, [class*='channel-'][class*='selected-'] [class^='name-'] *")) {
const node = Array.prototype.find.call(ele.childNodes, node => node.nodeType === Node.TEXT_NODE); const node = Array.prototype.find.call(ele.childNodes, node => node.nodeType === Node.TEXT_NODE);
if (node) { if (node) {
@ -199,7 +199,7 @@ class DISCORD {
else if (obj.guild_id) { else if (obj.guild_id) {
let guild; let guild;
for (const child of DOM.getReactProps(document.querySelector("nav header [class*='headerContent_']")).children) { for (const child of DOM.getReactProps(document.querySelector("nav header [class*='headerContent-']")).children) {
if (child && child.props && child.props.guild) { if (child && child.props && child.props.guild) {
guild = child.props.guild; guild = child.props.guild;
break; break;
@ -251,10 +251,10 @@ class DISCORD {
if (dms) { if (dms) {
const currentChannel = DOM.queryReactClass("selected", dms); const currentChannel = DOM.queryReactClass("selected", dms);
const currentChannelContainer = currentChannel && currentChannel.closest("[class*='channel_']"); const currentChannelContainer = currentChannel && currentChannel.closest("[class*='channel-']");
const nextChannel = currentChannelContainer && currentChannelContainer.nextElementSibling; const nextChannel = currentChannelContainer && currentChannelContainer.nextElementSibling;
if (!nextChannel || !nextChannel.getAttribute("class").includes("channel_")) { if (!nextChannel || !nextChannel.getAttribute("class").includes("channel-")) {
return false; return false;
} }
@ -281,7 +281,7 @@ class DISCORD {
let nextChannel = null; let nextChannel = null;
for (let index = 0; index < allTextChannels.length - 1; index++) { for (let index = 0; index < allTextChannels.length - 1; index++) {
if (allTextChannels[index].className.includes("selected_")) { if (allTextChannels[index].className.includes("selected-")) {
nextChannel = allTextChannels[index + 1]; nextChannel = allTextChannels[index + 1];
break; break;
} }

View File

@ -11,7 +11,7 @@ class DOM {
* Returns the first child element containing the specified obfuscated class. Parent defaults to the entire document. * Returns the first child element containing the specified obfuscated class. Parent defaults to the entire document.
*/ */
static queryReactClass(cls, parent) { static queryReactClass(cls, parent) {
return (parent || document).querySelector(`[class*="${cls}_"]`); return (parent || document).querySelector(`[class*="${cls}-"]`);
} }
/** /**

View File

@ -8,5 +8,5 @@ using DHT.Utils;
namespace DHT.Utils; namespace DHT.Utils;
static class Version { static class Version {
public const string Tag = "38.0.0.0"; public const string Tag = "37.2.0.0";
} }

View File

@ -4,7 +4,7 @@ set list=win-x64 linux-x64 osx-x64
rmdir /S /Q bin rmdir /S /Q bin
(for %%a in (%list%) do ( (for %%a in (%list%) do (
dotnet publish Desktop -c Release -r %%a -o ./bin/%%a -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishReadyToRun=false -p:PublishTrimmed=true -p:TrimMode=partial -p:JsonSerializerIsReflectionEnabledByDefault=true --self-contained true dotnet publish Desktop -c Release -r %%a -o ./bin/%%a -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishReadyToRun=false -p:PublishTrimmed=true -p:TrimMode=partial --self-contained true
powershell "Compress-Archive -Path ./bin/%%a/* -DestinationPath ./bin/%%a.zip -CompressionLevel Optimal" powershell "Compress-Archive -Path ./bin/%%a/* -DestinationPath ./bin/%%a.zip -CompressionLevel Optimal"
)) ))

View File

@ -17,7 +17,7 @@ rm -rf "./bin"
configurations=(win-x64 linux-x64 osx-x64) configurations=(win-x64 linux-x64 osx-x64)
for cfg in ${configurations[@]}; do for cfg in ${configurations[@]}; do
dotnet publish Desktop -c Release -r "$cfg" -o "./bin/$cfg" -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishReadyToRun=false -p:PublishTrimmed=true -p:TrimMode=partial -p:JsonSerializerIsReflectionEnabledByDefault=true --self-contained true dotnet publish Desktop -c Release -r "$cfg" -o "./bin/$cfg" -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishReadyToRun=false -p:PublishTrimmed=true -p:TrimMode=partial --self-contained true
makezip "$cfg" makezip "$cfg"
done done