From af84a2a625b442ed9f9e1a8f9abb97688fc971f0 Mon Sep 17 00:00:00 2001 From: smartfrigde <37928912+smartfrigde@users.noreply.github.com> Date: Mon, 23 May 2022 15:42:13 +0200 Subject: [PATCH] Add a license header for OpenAsar version settings/version info injection --- README.md | 2 +- src/preload/preload.ts | 24 +++++++++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c204d55..80e9f95 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ ArmCord is also available on the Snap store [here](https://snapcraft.io/armcord) [electron-discord-webapp](https://github.com/SpacingBat3/electron-discord-webapp) [custom-electron-titlebar (css only)](https://github.com/AlexTorresSk/custom-electron-titlebar) [electron-builder](https://electron.build) -[OpenAsar (~~stole~~ borrowed code for adding custom build info seemlessly)](https://github.com/GooseMod/OpenAsar) +[OpenAsar](https://github.com/GooseMod/OpenAsar) # Sponsors [![JetBrains supports ArmCord with free licenses to their software to core developers](https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg)](https://jb.gg/OpenSourceSupport) diff --git a/src/preload/preload.ts b/src/preload/preload.ts index 2d3fd71..fcde5a0 100644 --- a/src/preload/preload.ts +++ b/src/preload/preload.ts @@ -50,8 +50,30 @@ if (window.location.href.indexOf("splash.html") > -1) { } }); } +/* +MIT License -// Settings info version injection (Stolen and modified from OpenAsar, mwuh ha ha ha ha >:D) +Copyright (c) 2022 GooseNest + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ +// Settings info version injection setInterval(() => { const host = document.getElementsByClassName("info-3pQQBb")[0]; if (!host || document.querySelector("#ac-ver")) return;