From 8d7bcfd3602371cf510f4d5529253578a16671c6 Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Wed, 16 Jun 2021 19:00:09 +0200 Subject: [PATCH 1/8] Add some tweaks to Plugin Scanner --- BetterDiscordApp/src/modules/pluginCertifier.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BetterDiscordApp/src/modules/pluginCertifier.js b/BetterDiscordApp/src/modules/pluginCertifier.js index 9448fb4..e0211af 100644 --- a/BetterDiscordApp/src/modules/pluginCertifier.js +++ b/BetterDiscordApp/src/modules/pluginCertifier.js @@ -79,6 +79,7 @@ export function checkViruses(hash, data, resultCallback, removeCallback, filenam const scrpt = removeComment === 1 ? no_comments : data if(test.exec(scrpt)){ isHarmful = threats[type] + Utils.showToast(`${hashToUrl[hash].split("/").pop()} failed at test`, test, ". Marked as", threats[type]) console.log(`${hashToUrl[hash].split("/").pop()} failed at test`, test, ". Marked as", threats[type]) break } @@ -93,7 +94,7 @@ export function checkViruses(hash, data, resultCallback, removeCallback, filenam hash: hash, filename } - + Utils.showToast(`Found potentially dangerous ${cache[hash].type.toLowerCase()}: ${cache[hash].name}`) console.log(`Found potentially dangerous ${cache[hash].type.toLowerCase()}: ${cache[hash].name}`) resultCallback(cache[hash]) From c6bc14a1d7500737f7e52d5c192eba529f89b52d Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Wed, 16 Jun 2021 19:07:12 +0200 Subject: [PATCH 2/8] BandageBD Naming --> LightcordBD --- BetterDiscordApp/src/loadingIcon.js | 2 +- BetterDiscordApp/src/modules/core.js | 4 ++-- BetterDiscordApp/src/modules/utils.js | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/BetterDiscordApp/src/loadingIcon.js b/BetterDiscordApp/src/loadingIcon.js index 06e4865..b985c2e 100644 --- a/BetterDiscordApp/src/loadingIcon.js +++ b/BetterDiscordApp/src/loadingIcon.js @@ -1,6 +1,6 @@ export default () => { const v2Loader = document.createElement("div"); v2Loader.className = "bd-loaderv2"; - v2Loader.title = "BandagedBD is loading..."; + v2Loader.title = "LightcordBD is loading..."; document.body.appendChild(v2Loader); }; \ No newline at end of file diff --git a/BetterDiscordApp/src/modules/core.js b/BetterDiscordApp/src/modules/core.js index 8353e97..e1711e7 100644 --- a/BetterDiscordApp/src/modules/core.js +++ b/BetterDiscordApp/src/modules/core.js @@ -54,12 +54,12 @@ Core.prototype.init = async function() { } if (window.ED) { - Utils.alert("Not Supported", "BandagedBD does not work with EnhancedDiscord. Please uninstall one of them."); + Utils.alert("Not Supported", "LightcordBD does not work with EnhancedDiscord. Please uninstall one of them."); return; } if (window.WebSocket && window.WebSocket.name && window.WebSocket.name.includes("Patched")) { - Utils.alert("Not Supported", "BandagedBD does not work with Powercord. Please uninstall one of them."); + Utils.alert("Not Supported", "LightcordBD does not work with Powercord. Please uninstall one of them."); return; } diff --git a/BetterDiscordApp/src/modules/utils.js b/BetterDiscordApp/src/modules/utils.js index 89b581c..72838a2 100644 --- a/BetterDiscordApp/src/modules/utils.js +++ b/BetterDiscordApp/src/modules/utils.js @@ -54,15 +54,15 @@ export default class Utils { } static log(moduleName, message) { - console.log(`%c[BandagedBD]%c [${moduleName}]%c ${message}`, "color: #3a71c1; font-weight: 700;", "color: #3a71c1;", ""); + console.log(`%c[LightcordBD]%c [${moduleName}]%c ${message}`, "color: #3a71c1; font-weight: 700;", "color: #3a71c1;", ""); } static warn(moduleName, message) { - console.warn(`%c[BandagedBD]%c [${moduleName}]%c ${message}`, "color: #E8A400; font-weight: 700;", "color: #E8A400;", ""); + console.warn(`%c[LightcordBD]%c [${moduleName}]%c ${message}`, "color: #E8A400; font-weight: 700;", "color: #E8A400;", ""); } static err(moduleName, message, error) { - console.log(`%c[BandagedBD]%c [${moduleName}]%c ${message}`, "color: red; font-weight: 700;", "color: red;", ""); + console.log(`%c[LightcordBD]%c [${moduleName}]%c ${message}`, "color: red; font-weight: 700;", "color: red;", ""); if (error) { console.groupCollapsed("%cError: " + error.message, "color: red;"); console.error(error.stack); From c3afe9e275f6d968ed56fcfc5c7e0c761295b692 Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Wed, 16 Jun 2021 19:20:33 +0200 Subject: [PATCH 3/8] Correct badges in chat --- BetterDiscordApp/src/modules/core.js | 62 +++++++++++++++++++++------- 1 file changed, 46 insertions(+), 16 deletions(-) diff --git a/BetterDiscordApp/src/modules/core.js b/BetterDiscordApp/src/modules/core.js index e1711e7..87f53ec 100644 --- a/BetterDiscordApp/src/modules/core.js +++ b/BetterDiscordApp/src/modules/core.js @@ -485,22 +485,52 @@ Core.prototype.patchMessageHeader = function() { if (!children || !author || !author.id)return // if (header && header.className) header.className += " " if (!Array.isArray(children)) return; - if (author.id === "249746236008169473") { // Rauenzi: BandagedBD Developer - children.push( - BDV2.React.createElement(TooltipWrap, {color: "black", side: "top", text: "BandagedBD Developer"}, - BDV2.React.createElement(Anchor, {className: "bd-chat-badge", href: "https://github.com/rauenzi/BetterDiscordApp", title: "BandagedBD", target: "_blank"}, - BDV2.React.createElement(BDLogo, {size: "16px", className: "bd-logo"}) - ) - ) - ); - } else if (author.id === "696481194443014174" || author.id === "696003456611385396"){ // Not Thomiz: Lightcord Developer, Phorcys: Lightcord Developer - children.push( - BDV2.React.createElement(TooltipWrap, {color: "black", side: "top", text: "Lightcord Developer"}, - BDV2.React.createElement(Anchor, {className: "bd-chat-badge", href: "https://github.com/Lightcord/Lightcord", title: "Lightcord", target: "_blank"}, - BDV2.React.createElement(LightcordLogo, {size: "16px", className: "bd-logo"}) - ) - ) - ); + if (author.id === "249746236008169473") { + // Rauenzi: BandagedBD Developer + children.push( + BDV2.React.createElement( + TooltipWrap, + { color: "black", side: "top", text: "BandagedBD Developer" }, + BDV2.React.createElement( + Anchor, + { + className: "bd-chat-badge", + href: "https://github.com/rauenzi/BetterDiscordApp", + title: "BandagedBD", + target: "_blank", + }, + BDV2.React.createElement(BDLogo, { + size: "16px", + className: "bd-logo", + }) + ) + ) + ); //(props.user.id === "696481194443014174" || props.user.id === "363022107753578496"|| props.user.id === "424639027606585356"){ // Not Thomiz: Lightcord Developer, Phorcys: Lightcord Developer, smartfridge: Lightcord Dev + } else if ( + author.id === "696481194443014174" || + author.id === "363022107753578496" || + author.id === "424639027606585356" + ) { + // Not Thomiz: Lightcord Developer, Phorcys: Lightcord Developer + children.push( + BDV2.React.createElement( + TooltipWrap, + { color: "black", side: "top", text: "Lightcord Developer" }, + BDV2.React.createElement( + Anchor, + { + className: "bd-chat-badge", + href: "https://github.com/Lightcord/Lightcord", + title: "Lightcord", + target: "_blank", + }, + BDV2.React.createElement(LightcordLogo, { + size: "16px", + className: "bd-logo", + }) + ) + ) + ); } const id = uuidv4() children.push( From 799790d88333e72c8a84b76bff2f9d5029123839 Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Wed, 16 Jun 2021 20:08:04 +0200 Subject: [PATCH 4/8] Add CI build --- .github/workflows/build.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..271dbf8 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,31 @@ +name: Build/release + +on: push + +jobs: + release: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + + steps: + - name: Check out Git repository + uses: actions/checkout@v1 + + - name: Install Node.js, NPM and Yarn + uses: actions/setup-node@v1 + with: + node-version: 12 + + - name: Build/release Electron app + uses: samuelmeuli/action-electron-builder@v1 + with: + # GitHub token, automatically provided to the action + # (No need to define this secret in the repo settings) + github_token: ${{ secrets.github_token }} + + # If the commit is tagged with a version (e.g. "v1.0.0"), + # release the app after building + release: ${{ startsWith(github.ref, 'refs/tags/v') }} \ No newline at end of file From f2963f63c60157b0d06583e415863ec700ee91f4 Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Wed, 16 Jun 2021 20:19:40 +0200 Subject: [PATCH 5/8] v0.1.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f3e3f18..8f069ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lightcord", - "version": "0.1.6", + "version": "0.1.7", "description": "A simple - customizable - Discord Client.", "main": "dist/index.js", "scripts": { From e77736b60a3b999c6019e19c008e4827d5cdcc62 Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Wed, 16 Jun 2021 20:36:03 +0200 Subject: [PATCH 6/8] Update build.yml --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 271dbf8..f90ba04 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,8 @@ jobs: uses: actions/setup-node@v1 with: node-version: 12 - + - run: npm run devInstall + - run: npm run compile - name: Build/release Electron app uses: samuelmeuli/action-electron-builder@v1 with: From 32c8bb43494a9e3d006d5f98f8d73f1a1e6b3fc1 Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Wed, 16 Jun 2021 20:36:17 +0200 Subject: [PATCH 7/8] v0.1.8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8f069ec..a372101 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lightcord", - "version": "0.1.7", + "version": "0.1.8", "description": "A simple - customizable - Discord Client.", "main": "dist/index.js", "scripts": { From 596eaec377a1a12c2ade8b354ba2eca89829005f Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Wed, 16 Jun 2021 20:53:06 +0200 Subject: [PATCH 8/8] Downgrade the version lmfao --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a372101..f3e3f18 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lightcord", - "version": "0.1.8", + "version": "0.1.6", "description": "A simple - customizable - Discord Client.", "main": "dist/index.js", "scripts": {