Merge pull request #288 from smartfrigde/master

0.1.7 😳
This commit is contained in:
smartfridge 2021-06-16 20:53:54 +02:00 committed by GitHub
commit 2bd69b87f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 86 additions and 23 deletions

32
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,32 @@
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
- run: npm run devInstall
- run: npm run compile
- 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') }}

View File

@ -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);
};

View File

@ -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;
}
@ -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(

View File

@ -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])

View File

@ -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);