#๐Ÿงฉ-plugin-development

1 messages ยท Page 2 of 1

wraith carbon
#

because your function is slow

viral roost
#

skill issue

lost geode
opal fern
#

console log

#

and return true

wraith carbon
#

too slow!

viral roost
#

console.log is intensive y'know trolley

next stone
#

this isn't difficult knowledge

#

tripping isDeveloper in a certain way does it too

oblique viper
#

Was just one example

opal fern
#

Does anyone know how I can grab all blocked users?

little relic
viral roost
#

hardcoded t variable ๐Ÿค“

opal fern
viral roost
#

fair

opal fern
#

because I replaced it with another hardcoded variable!

viral roost
#

woo!

covert heart
#

Heyo, just wanted to ask a question about the quickCSS editor? How did you embed a vscode editor into it? Im trying to do something similar for a note taking application im developing

austere gulch
#

it's monaco editor

covert heart
#

Monaco?

#

Ah

#

That

#

Thanks ๐Ÿ™‚

dull magnet
#

just check the source code

proud parrotBOT
# dull magnet https://github.com/Vendicated/Vencord/blob/main/src/components/monacoWin.html

**monacoWin.html: **

<!doctype html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <title>QuickCss Editor</title>
    <link rel="stylesheet" data-name="vs/editor/editor.main"
        href="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.34.0/min/vs/editor/editor.main.min.css">
    <style>
        html,
        body,
        #container {
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
            overflow: hidden;
        }
    </style>
</head>

<body>
    <div id="container"></div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.34.0/min/vs/loader.min.js"></script>

    <script>
        require.config({ paths: { 'vs': 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.34.0/min/vs' } });
        require(["vs/editor/editor.main"], () => {
            getCurrentCss().then(css => {
                var editor = monaco.editor.create(document.getElementById('container'), {
                    value: css,
                    language: 'css',
                    theme: getTheme(),
                });
                editor.onDidChangeModelContent(() =>
                    setCss(editor.getValue())
                );
                window.addEventListener("resize", () => {
                    // make monaco re-layout
                    editor.layout();
                });
            });
        });


    </script>
</body>

</html>

slow charm
#

he left

dull magnet
#

lol

#

so mean

slow charm
#

used to being used whore

honest storm
#

yall

#

why tf is the app.asar fucked when injecting vencord

opal fern
#

Thats... curious

opal fern
#

There is a fix apparently

#

buuuut i am not having issues so cant tell you what it is exactly

little relic
#

worked fine for me when i tried it

opal fern
#

Hold on

#

I found the issue

#

๐Ÿ˜ญ

#

You import findByProps in a different way I do

#

All sorted

#

Again, thank you for the snippet

little relic
#

lol

dull magnet
austere gulch
opal fern
green vessel
green vessel
oblique prairie
chrome folio
arctic island
amber ferry
#

very minor thing that doesnt come up often but would be pretty nice, mobile.twitter links dont convert to fx

potent fox
wraith carbon
signal hemlock
opal fern
#

Can someone add ... at the end when the text is cut

austere gulch
#

it's more of a pain to implement than you'd think

simple folio
#

it shouldn't be?

#

text-overflow: ellipses;

dull magnet
#

doesnt work

hollow inlet
#

i would say find the text length

#

but that's hard to do when the window could be any size

austere gulch
near aurora
#

i literally tried to add it when i was making the pr but it wouldn't add the ellipsis

#

we could do it through js ig

austere gulch
#

yeah it's just a huge ballache

dull magnet
near aurora
#

how

#

oh js Right?

#

add an &ellipsis;

#

to thr end

#

rather than ...

#

less space

austere gulch
#

everybody gangsta til the wide characters get used

dull magnet
#

no

#

its pure css

simple folio
#

how did you fix

dull magnet
#

with deprecated css properties that may not work on all browsers

#

๐Ÿ™‚

#

css my beloved

simple folio
#

guh

#

browsers so bad

dull magnet
simple folio
dull magnet
simple folio
#

true

#

firefox so bad at css

dull magnet
#

firefox is so dogshit because mozilla has too big of an ego

opal fern
#

whaaat

austere gulch
#

Firefox stopped innovating years ago

opal fern
#

i like firefox/mozilla

dull magnet
#

they refuse to add dogshit features which seems good on paper but is just painful because browsers are bad so you need dogshit features

austere gulch
#

now their entire business is just redesigning the general ui of their browser every few years

simple folio
#

ven loves browsers not following web standards

austere gulch
#

I use chredge
I used to feel shame but edge is actually a nice browser to use now sk

dull magnet
#

guh at least firefox supports this

austere gulch
#

Microsoft actively making it worse by trying to advertise edge to me while I'm using Edge lmao

dull magnet
austere gulch
#

I was gonna say line clamp might work

dull magnet
#

its this mess

#

it works fine

#

but probably doesn't work on firefox

austere gulch
#

trol

dull magnet
#

and also beautiful deprecated properties

#

๐Ÿ˜„

austere gulch
#

as much as I hate h265 and anything to do with v-nova, Firefox doing a little trolling by not supporting h265

#

they don't even pass through to the os to decode it

#

they refuse to because its proprietary xd

dull magnet
#

anyway it looks good

austere gulch
#

av1 is superior anyways tho

simple folio
dull magnet
dull magnet
dull magnet
#

it looks fine

austere gulch
#

av1 is based

simple folio
#

description will have more space above it

dull magnet
#

soon

austere gulch
#

I actually uh

#

have been secretly thinking of a redesign that might look nicer trolley

simple folio
#

m3-ify discord trollzoom

austere gulch
#

because adhd why would I ever finish one task before starting another trolley

austere gulch
#

did it work on ff

dull magnet
#

idk

#

firefox literally doesn't support -webkit-box

austere gulch
#

xd

dull magnet
#

but it seems to be the only way

austere gulch
#

Well it shouldn't make ff any different to what it looks like now at least

simple folio
#

ven uses firefox mobile

dull magnet
#

-webkit-box is the predecessor of flexbox if i understood correctly (deprecated)

#

but it has some special behaviour that makes ellipses just work

simple folio
#

love

dull magnet
#

i love inventing new words

simple folio
#

ven will make his own version of css

austere gulch
#

I don't get why multi line ellipses wasn't added to spec immediately

dull magnet
#

lmao yeah

dull magnet
austere gulch
#

it's a huge pain point for so many people

dull magnet
#

i hope they also never remove with

simple folio
dull magnet
austere gulch
#

ive never heard of with in css

dull magnet
#

not in css

#

i mean js with

austere gulch
#

oh

#

lol

dull magnet
#
with (console) {
  log("hi");
}```
austere gulch
#

every time you use with, mozilla kills an orphan

#

(mozilla hates with)

dull magnet
simple folio
#

with can be nice in kotlin

austere gulch
dull magnet
#

with is terrible in js but needed in very niche scenarios

#

with equality proxy

simple folio
#

equality

#

ven hates ๐Ÿค

dull magnet
amber ferry
#

loading quotes looks funny, can you customize it

simple folio
#

quirks

dull magnet
#

No but could easily be added

amber ferry
dull magnet
simple folio
#

isYahooMail

austere gulch
#

personally I think they should remove quirk stuff

dull magnet
#

they can't

austere gulch
#

just force these websites not to write shit code

simple folio
#

ven uses Netscape navigator 1.0

dull magnet
#

doesnt work that way

#

if they break popular websites like amazon people will blame their browser and they will lose many users

#

and everyone will complain to webkit

austere gulch
simple folio
#

like webkits going anywhere

dull magnet
#

and it's web philosophy to NEVER break anything

#

which is why they also will never remove deprecated apis unless there's a really really good reason (talking vulnerabilities)

austere gulch
#

ja

simple folio
#

amazons website is so ugly

austere gulch
opal fern
#

browsers trying to not be antique pieces of shit (impossible)

austere gulch
simple folio
#

amazon one of the worlds largest companies but they can't hire any good web designers

dull magnet
#

nah

#

"it works on firefox, clearly chrome is bad browser"

opal fern
#

visually it doesnt look good

#

but ig under the hood it is best and advanced

dull magnet
#

Good article

#

when they have to rename an api because some stupid module messes with internal classes

austere gulch
#

when they have to h

dull magnet
#

private and marked with @UnsupportedAppUsage yet apps still use it and they still can't change them

#

and before you say "just change it whats the problem", imagine updating to new Android and suddenly facebook app and other apps break

#

everyone is gonna blame android when it's facebooks fault

austere gulch
#

xdd

dull magnet
#

Also we use that same field in Aliucord as well tonguecat

austere gulch
#

horror

dull magnet
#

many apps access it probably, it's the easiest way to load dex files at runtime

austere gulch
#

lmao

dull magnet
#

and that's just one single file

austere gulch
#

husk

dull magnet
#

it's probably like that a lot throughout the codebase

#

imagine you're an android developer and try refactoring internals to clean up code and suddenly half your apps break

opal fern
#

the amount of hate currently flowing through my veins

dull magnet
#

I also use an internal api that they changed 4 times throughout android versions

#

so i have

if (android 26)
   methodName = "blah"
else if (android 27)
   methodName = "bleh"
else if (android 29)
   methodName = "bluh"
else
   methodName = "xd"
proud parrotBOT
# dull magnet <https://github.com/Aliucord/hook/blob/main/core/src/main/cpp/profile_saver.cpp#...

**profile_saver.cpp: **Lines 27-42

// MIUI moment, see https://github.com/canyie/pine/commit/ef0f5fb08e6aa42656065e431c65106b41f87799
process_profiling_info = AliuHook::elf_img.GetSymbolAddress(
        "_ZN3art12ProfileSaver20ProcessProfilingInfoEbPtb", false);
if (!process_profiling_info) {
    const char *symbol;
    if (AliuHook::android_version < 26) {
        // https://android.googlesource.com/platform/art/+/nougat-release/runtime/jit/profile_saver.cc#270
        symbol = "_ZN3art12ProfileSaver20ProcessProfilingInfoEPt";
    } else if (AliuHook::android_version < 31) {
        // https://android.googlesource.com/platform/art/+/android11-release/runtime/jit/profile_saver.cc#514
        symbol = "_ZN3art12ProfileSaver20ProcessProfilingInfoEbPt";
    } else {
        // https://android.googlesource.com/platform/art/+/android12-release/runtime/jit/profile_saver.cc#823
        symbol = "_ZN3art12ProfileSaver20ProcessProfilingInfoEbbPt";
    }
    process_profiling_info = AliuHook::elf_img.GetSymbolAddress(symbol);
dull magnet
#

pretty funny

simple folio
#

@dull magnet

dull magnet
#

wha

#

Idk what you're talking about

simple folio
#

guh

#

had to use pine version for a bit

dull magnet
#

no that was just lsposed not having updated yet

#

pretty sure this

slender copper
#

wanna try and make a plugin that adds translations

#

right now poking around hoping to find the best place to hook

south ledge
#

iirc juby made one for powercord a while back

slender copper
#

think i got it

#

remaining question is, where is the best place to like read the translations out of?

#

like it should be easy to install translations, i gues

#

without bundling them into vencord

slow charm
slender copper
#

wait no i mean translations of the discord ui

slender copper
#

ok fuck it appears the find key is insufficient to find the module i actually want to patch

#

desired module (e,t,n)=>{var r={"./bg":363541,"./bg.json":363541,"./cs":842613,"./cs.json":842613,"./da":13616,"./da.json":13616,"./de":997644,"./de.json":997644,"./el":18677,"./el.json":18677,"./en-US":568601,"./en-US.js":568601,"./es-ES":129608,"./es-ES.json":129608,"./fi":332025,"./fi.json":332025,"./fr":992684,"./fr.json":992684,"./hi":522738,"./hi.json":522738,"./hr":144421,"./hr.json":144421,"./hu":489936,\n"./hu.json":489936,"./it":242216,"./it.json":242216,"./ja":474953,"./ja.json":474953,"./ko":365247,"./ko.json":365247,"./lt":918012,"./lt.json":918012,"./nl":131763,"./nl.json":131763,"./no":141469,"./no.json":141469,"./pl":132011,"./pl.json":132011,"./pt-BR":257899,"./pt-BR.json":257899,"./ro":984417,"./ro.json":984417,"./ru":908647,"./ru.json":908647,"./sv-SE":538613,"./sv-SE.json":538613,"./th":611291,"./th.json":611291,"./tr":673272,"./tr.json":673272,"./uk":808374,"./uk.json":808374,"./vi":488703,"./vi.json":488703,"./zh-CN":355783,"./zh-CN.json":355783,"./zh-TW":612244,"./zh-TW.json":612244};function o(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");t.code="MODULE_NOT_FOUND";throw t}return r[e]}o.keys=function(){return Object.keys(r)};o.resolve=i;e.exports=o;o.id=932706}

slender copper
#

ok so hm

#

discovered actually i do want to patch both modules

opal fern
#

I dont get it

#

(Excuse theme change, one is discord app console and other is firefox)

dull magnet
#

you can't do webpack search on top level in plugins

#

they load too early

#

use lazyWebpack

#
const RelationshipStore = lazyWebpack(filters.byProps("getRelationShips"));
opal fern
#

I love how you could tell the error even tho i forgor to include code snippet

dull magnet
#

basically plugins load way before webpack is initialised

#

so you can't do webpack search on top level at all

#

the only place where its safe to use raw find() is in start() and stop()

#

in other places use lazyWebpack or waitFor

opal fern
#

Alright

#

how do i cache something for personal use

dull magnet
#

๐Ÿค”

#

Cache what

opal fern
#

i have object

#

big object

#

i wanna only grab object every blue moon

#

so as to not start dumpster-fire

dull magnet
#

wha

#

explain better

#

you want to cache object across restarts?

#

like cache for a week?

opal fern
#

actually

#

fuck that, im just gonna store as constant

dull magnet
#

wha

dull magnet
opal fern
#

I want to fetch all blocked users to compare with a message author, but I also want to call the function to fetch the blocked users only once

dull magnet
#

๐Ÿค”

#

why would you need to fetch them

opal fern
#

in my mind, calling every message is a bad idea

dull magnet
#

bro I have no idea what you're trying to say

opal fern
#

yeah

#

sorry, im really out of it because big sick

#

Ik what I wanna do now tho

dull magnet
#

just call isBlocked()

opal fern
#

dw about it

dull magnet
#

what's the problem

opal fern
#

fml

dull magnet
#

you think calling isBlocked for every message is bad?

#

dw about it, look at its code

#

it's just an object lookup and comparison

#

one of the most efficient operations you can have in js

opal fern
#

alr, thank you ven

dull magnet
#

@opal fern why not pr that to the hide blocked messages plugin

#

behind a setting

opal fern
#

Good for what I want, but I dont think others will find any use in it

#

I can pr it in ig

#

as an option in hideBlockedMessages ofc

#

Ill look into it now actually

dull magnet
#

lol

#

the entirety of discord is proprietary

#

and their voice & video is native

#

in any case

#
find: "blah",
replacement: [{
  match: /,.{1,3}\.default\.ensureModule\("discord_krisp"\)/,
  replace: ",Promise.resolve()",
}, {
  match: /;.{1,3}\.default\.requireModue\("discord_krisp"\);(.+?case (\d):.{0,30}Failed to load Krisp)/,
  replace: (_, rest, code) => `;return [${code}];${rest}`
}]```
#

untested but should work probably

#

oh yeah just kil the whole thing that works as well

#

but uh the match is kinda bad imo

#

better if you add a .{0,300}discord_krisp to be on the safe side

#

lmaooo

#

if you make a proper accident for disliking krisp i can add it

green vessel
next stone
#

yop

dull magnet
fresh birch
#

hacks

dull magnet
#

discord::util::GetAllProcessIds()

#

mmmmmm

#

Base64EncodingTable AyameSweat

#

why do they b64 it

austere gulch
#

skill issue

green vessel
#

this is vencord

#

whatd you expect

dull magnet
#

nah hes right dont troll too much

green vessel
#

i havent left one comment on the gh smh

austere gulch
wild flower
#

explode

dull magnet
#

nah

green vessel
#

aliucord server things

austere gulch
#

megucord

cinder wigeon
#

you will explod NOW

dull magnet
#

explode

cinder wigeon
#

๐Ÿคฏ

#

But links are more funny

#

And it works well

#

It made me join this server :)

dull magnet
#

owoYay ๐Ÿ‘ ๐Ÿ‘

lost geode
#

๐Ÿง†

austere gulch
#

every time I see moyai on discord mobile I expect a thud but it never happens ๐Ÿ˜”

#

vencord RNA now

dull magnet
#

imagine not having Aliucord moyai smh smh

wild flower
#

killjoy

#

explod

dull magnet
austere gulch
oblique prairie
umbral ivy
lone panther
#

ive seen people say they get it but how ๐Ÿ˜  i want krisp

lone panther
#

except it's way worse

manic obsidian
#

Hi I have no idea how to use css and no idea what im doing but how would I replace for example every "hi" as "hello" just everywhere on discord?

near aurora
#

you can't really do it with css

#

use regex, the main building stone of vencord lol

manic obsidian
#

oh right

#

how

near aurora
#

idk check plugin docs

dull magnet
#

I wanna make an in client patch helper

#

where it shows you the result live as you change your patch

slow charm
#

real

#

then add a monkey patcher

dull magnet
#

no

slow charm
#

count your days

lone panther
dull magnet
#

by just doing it

lone panther
#

understandable

slow charm
#

skill

cursive plank
dull magnet
#

no

#

embedded

dull magnet
#

like this

#

obviously less ugly

fresh birch
#

whoa vendy so smort

viral roost
#

no way

slow charm
cursive plank
wraith carbon
#

that's insane

cursive plank
#

@dull magnet

#

@dull magnet

#

@dull magnet

#

@dull magnet

#

@dull magnet

#

release when?

simple folio
#

when its not ugly hopefully

cursive plank
#

fucking hell, i cant express how much pain making patches is w/o it

dull magnet
potent fox
#

LOVE

#

we will have vencord for scratch soon

simple folio
potent fox
dull magnet
potent fox
#

dumb

amber mantle
#

do NOT the monaco

fresh birch
#

why there be australians in here

#

so many upside down pfps

slow charm
#

ugly

#

@fresh birch dog

fresh birch
#

what

slow charm
#

dog

fresh birch
#

bork

dull magnet
cursive plank
#

At this point, why not make it so that you can save the patch to a third party plugin?

dull magnet
#

js pretends this try catch doesn't exist?????

#

wtf

#

OH

#
setState(x => ow)```
#

react is calling it lmfao

opal fern
near aurora
#

use codemirror plz

#

more lightweight

#

and you don't need monaco for plugin settings

dull magnet
#

PR if you want

#

quickcss already uses Monaco

near aurora
#

fair enough

#

like i don't care that much its just sad that any time anyone needs to embed an editor they use monaco

#

which is like using a death star to kill a fly

#

and also its kinda un-smooth because the scrolling is line based by default

#

or like

#

not smooth

#

idk

dull magnet
#

Monaco is the editor 95% of devs are used to

#

and it's very easy to embed

#

an important factor is the ability to load it from cdn because I'm not bundling an entire ide with Vencord

simple folio
#

you will embed vscode blobcatcozy

potent fox
#

Use monaco with morbius theme

slow charm
#

use a normal input box

#

it should be under updater right?

#

why isn't it

#

oh

#

it should be there always i think

#

or an option to show it

dull magnet
#

the code isn't included in main release, use dev build

slow charm
#

yea i saw

potent fox
#

wher dev build

#

guh explode

dull magnet
#

use dev build

#

pnpm watch

#

makes dev build

potent fox
#

Explode

#

Ok

near aurora
#

is Array.from(array-like) the same thing as [...array-like]?

#

by array-like i mean for example NodeList

dull magnet
#

mostly

near aurora
#

apart from having to be careful when omiting semicolons line before with the 2nd one it should be the same no?

dull magnet
#

it depends

#

if you're passing an actual iterable or array they're the same

near aurora
#

i wanna do node.children, convert to array, array.foreach

dull magnet
#

if you're passing an ArrayLike the behaviour differs

dull magnet
near aurora
#

ye ik but also other stuff

#

i want it to be array

dull magnet
#

they're the same in this case, pick your poison

#

but in other cases they vastly differ

#

but im also gonna be real if you're manipulating raw dom elements you're very likely doing something very wrong

cursive plank
#

Cause most of the time I map them

#

Why does nodelist not have map? :monkepain:

#

If it can iterated, then it can be a parameter to Array.from()

near aurora
#

making a userscript for another site and was just wondering where can i get a quick js answer from ppl who are not talking out of their ass

#

other coding servers im in either are too dead or too big & everybody ignores

dull magnet
#

lmao

#

yeah just spread it

near aurora
#

this userscript is kinda a clusterfuck lol

#

im implementing so bad coding patterns, like function overrides and shit

#

unmaintainable trolley

dull magnet
#

horror

#

what u doing

#

tbf that's the nature of user scripts

near aurora
dull magnet
#

I've yet to see a user script that wasn't the worst shit code ever

near aurora
#

im making a song lyrics utils userscript

#

it is pretty well structured, i rewrote it three times

#

old version here

#

update soontm

#

but basically it supports a bunch of sites with song lyrics and parses & formats them. you can easily add opensong (song presenter software) headings, which are [V1], [V2] for verses, etc

#

and all the lyrics

#

and so this is the standard extractor

#

and on a per-site basis i can overwrite some of the functions

#

genius.com has more than 1 lyrics container sometimes so instead of text(), i need to use a custom querySelectorAll thingy

#

i can overwrite the functions like this

#

arguably the worst way of doing it but eh

#

don't wanna re-implement everything for every site

dull magnet
near aurora
#

right now there's a switch case statement that matches window.location.hostname and then mostly calls extractors._standard, sometimes different shit

#

sometimes i need 2 inject css, sometimes overwrite functions etc

#

this being the 3rd rewrite it actually has some structure because the other 2 versions were an absolute clusterfuck and there was no context separation between sites, only a shit ton of ifs handling edge-cases for every site

#

the userscript adds a few buttons like this. you can see it currently added the verse headings, thats the first button. 2nd is remove, 3rd is copy lyrics & 4th is just an indicator, because sometimes i hide my custom div bc no space on site

#

oh did i say shit userscript? i mean the absolute engineering marvel this userscript is, overcomplicated to oblivion trolley

#

tbf not all my userscripts are like this, most are shit lol

dull magnet
#

that's cool

near aurora
#

it uses a currency conversion api on foreign shopify pages to get the conversion rates to euro once a day, cache them, & convert all price tags on the site to eur

#

im even storing the api key in violentmonkey storage, not hardcoded in the code trolley

#

and then there are userscripts like this:

#

just add a bigass table

dull magnet
#

lmao

near aurora
#

that table is word exported to html and copy+ pasted

#

i used it to cheat in online exams for chemistry bc we were allowed to use ptable.com

dull magnet
#

lmaoo

#

dirty cheater

near aurora
#

arguably a lot of effort if i could've just alt-tabbed to word but the screen not brightly flashing white on the camera was a win

near aurora
dull magnet
#

it works

near aurora
#

oh it uses an account proxy server

#

damn smart

#

ok

opal fern
#

Can't watch YouTube porn anymore because of age restrictions

near aurora
#

unless you use opensong it's a glorified copy lyrics button lol

#

guys who else wanna do codevember 2022

#

thing i made up

#

where i uninstall twitter for the whole november & instead try to code every day

#

at the end i'll have hopefully broken my twitter addiction & will have done a bunch of sideprojects that were in the "planned" stage for a long time

cursive plank
# dull magnet I've yet to see a user script that wasn't the worst shit code ever

rate my userscript

// ==UserScript==
// @name         rule34 audio
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       Arjix
// @match        https://rule34.xxx/index.php?page=post*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=rule34.xxx
// @grant        none
// ==/UserScript==

document.querySelector("video").volume = 1
#

rate another userscript of mine

// ==UserScript==
// @name         Highlight videos in pools
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       Arjix
// @match        https://rule34.xxx/index.php?page=pool*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=rule34.xxx
// @grant        none
// ==/UserScript==

Array.from(document.querySelectorAll("img.preview")).forEach((img) => { if (img.title.split(" ").includes("video")) { img.style.border = "3px solid #0000ff" } })
near aurora
#

genius

#

also bold of u to check r34 on pc AND post this on the first day of nnn trolley

oblique prairie
#

i mean

#

if you can't hold out atleast 1 day you actually down bad worse than genshin players fr

opal fern
#

Now shut the fuck up about it

near aurora
#

dw i can

#

lulz

near aurora
near aurora
slow charm
#

no...

#

codecember is my personal favorite

cursive plank
#

pretty old

#

oh snap

#

not on github

#

well

#

it is pretty old

#

but i cant prove it

cursive plank
#

actually more than 10 months old, i just uploaded it to github then

near aurora
#

fix it then pl0x

#

nah codevember on top bc i made it up & unconvetional

#

nobody expects codevember, everybody expects hacktober

dull magnet
oblique prairie
near aurora
#

@cursive plank fixed ur userscript

#

can i pr?

#

too lazy just dmed the udpate

dull magnet
#

trollage

shadow ruin
#

good pfp material

oblique prairie
#

:3

lone panther
#

it's just crossposts from my mastodon acct now

austere gulch
south ridge
#

how do i get the Minipopover module

dull magnet
south ridge
#

i was trying

#

doesnt find it with any of the props, displayname is gone and idk what else there is

dull magnet
#

because those props are react props

#

not exports

#

findByProps should be named findByExportNames to be more appropriate

#

but that'd be awkward

#

you very likely will need to do a code search

south ridge
#

uhhh

#

what the fuck is this shit

dull magnet
#

there should be

#

send full module

#

27292929: () => {}

#

but why do you even need to find it

south ridge
#

i want to add an icon

dull magnet
#

regex patch

#

no need to find via webpack

south ridge
#

but regex patch is ewie and complicated D8

dull magnet
#

how

#

it's simpler than whatever other mods do

#

if you know regex

south ridge
potent fox
#

regex was suprisingly easier than what I thought tbh

south ridge
#

i dont know if i can properly use it in the way i want it to

dull magnet
#

(show)

#

regex patches are unironically easier once you figured them out

#

because you don't have to find hacky workarounds to things like memos, don't have to cope with some things not being exported or frozen and you don't have to deal with props.children.children[3].props.children.children.splice("cock")

south ridge
dull magnet
#

oh element

#

what in da props

#

and what's type

#

as in does this contain the renderer items

south ridge
dull magnet
#

ah

#

so very likely O.type is what renders them

#

check that function

south ridge
#

how

dull magnet
#

wdym how

#

right click and jump to definition

south ridge
#

Okok

regal rune
#

sammy becoming based

south ridge
dull magnet
#

there you go

#

xn({
key: "view-thread",
label: At.Z.Messages.VIEW_THREAD,
icon: gn.Z,
channel: t,
message: n,
onClick: ht.Db
})

#

this creates the buttons

#

to add your own, write a regex to match where you wanna insert it and call it with your own stuff

#

Super simple

dull magnet
south ridge
#

Alright, I'll try

#

Thanks ^^

dull magnet
#

if you need help, let me know, but I'm sure you can figure it out

#

each element is like
x? xn({...}) :null

#

so just match exactly that with ur regex

#

and include key:"key of the element you wanna insert after"in ur regex to match the right one

south ridge
#

Will do

regal rune
#

modders are much more experienced than app devs themselves

#

change my mind

viral roost
#

actually they are just different skillsets ๐Ÿค“

dull magnet
#

๐Ÿ‘

#

mb

dull magnet
#

btw why make that replacement so complicated

#

"$&Vencord.Plugins..."

dull magnet
#

convert it to gif from what?

#

apng to gif lol

#

you'll have to use some library

#

this might be good

#

you can get the frames from that then generate gif

#

its pretty minimal

simple folio
#

can't discord play apngs already though

#

couldn't that be used on attachments

dull magnet
#

actually

lost geode
#

yeah i think discord can play animated .png

dull magnet
dull magnet
#

no

simple folio
#

but why convert

dull magnet
simple folio
#

discord can already play apngs

dull magnet
#

see petpet plugin for how it generates gifs from frames

simple folio
#

i don't mean they play from attachments

dull magnet
#

wing can u shut

#

this is for converting to gifs to send in chat

simple folio
#

gu

dull magnet
#

basically it draws to canvas then adds that canvas to gif encoder

#

this also draws to canvas

lost geode
#

it run if you open in your browser but not in discord

simple folio
#

use some lib that parses lottie into a gif

lost geode
#

๐Ÿ˜ญ

dull magnet
#

just dont support lottie

simple folio
#

or that

dull magnet
#

lottie is only for discord default stickers

#

so you could download all of them and do it ahead of time

#

and dump them in some channel

simple folio
#

non default lottie stickers exist

dull magnet
#

cause it uses nodejs eventemitter

#

but maybe theres a better library

dull magnet
#

location.origin / location.hostname

simple folio
#

location.latitude location.longitude

dull magnet
#

you love

#

each frame is a png

#

you can just use gifencoder from petpet to generate gif in a few lines of code with that

#

what

#

wtf are u using

#

gif.coffee????

#
const importApngJs = makeLazy(async () => {
  const exports = {}
  const winProxy = new Proxy(window, { set: (_, k, v) => exports[k] = v });
  Function("self", await fetch("https://cdnjs.cloudflare.com/ajax/libs/apng-canvas/2.1.1/apng-canvas.min.js").then(r => r.text()))(winProxy);
  return exports.APNG;
});


// once needed
const apng = await importApngJs();
#

uses ultra epic promise polyfill teef

#

if u wanna make it more efficient fork and remove polyfills and other junk and compile to esm then you can just import(it)

#

but its 14kb its whatever

#

1 byte

#

my love

#

show code

#

wtf is that paste

#

wtf is createImageBitmap

#

no

#

not supported

#

nah thats ugly

dull magnet
#

its made by same guy except it returns Image not Blob

#

and you can put Image on canvas directly

#

yes lmao

#

just use the one i sent and then write each frame directly

#

yeye

sharp lantern
#

can i write plugins in coffeescript

simple folio
#

so fast

dull magnet
sharp lantern
#

good

south ridge
#

regex patching looks kinda unstable

dull magnet
#

nah

#

not if u write good patches

south ridge
#

itll break like every time the variables chang-

#

good point

#

how do i ignore newlines

dull magnet
#

you won't have to deal with newlines

#

Vencord strips all of them before your patch is applied

south ridge
#

so how do i check if my thing works D8

#

nvm got it

#

it don work Astolfo_waa_FB

dull magnet
#

cause your regex has spaces silly

#

discord has 0 spaces

#

๐Ÿถ

#

did u not use the patchhelper?

south ridge
#

nolol

dull magnet
#

bruhhh why

#

run pnpm watch

#

then go into settings > patchhelper

#

and use that tool

south ridge
#

wait what even is the find thing

dull magnet
#

string in the module u wanna find

south ridge
#

husk

#

misused that then

viral roost
#

mfw newlines in patch

dull magnet
#

for example .MESSAGE_TODOS_MARK_AS_DONE

south ridge
#

okay it didnt show up as failed but it didnt work either

dull magnet
#

use patchhelper omg

south ridge
#

fr

#

it hate multiple matches

dull magnet
#

fix

viral roost
#

oh yeah how do i PatchHelper

dull magnet
#

you need dev build

south ridge
#

^

dull magnet
#

which you build via pnpm watch

#

uh no

viral roost
#

oh

dull magnet
#

what exactly is the glitching

#

like look at the individual frames to see whats going on

#

lmao

#

send code

south ridge
#

im pretty sure the generated code doesnt work

#

its replace not replacement

#

lol

#

yea

#

webpack changed

#

its not xn anymore husk

#

how the fuck

#

am i supposed to make persistent patches

#

nvm i can just use . whereverthere is a variable

dull magnet
#

yes?

#

you don't include any variables

#
match: /?(.{1,3})\(\{key:"blah".+?\}\)/,
replace: (m, createMenuItem) => `${m},Vencord.Plugins.plugins.YourPlugin.makeItem(${createMenuItem})`
#

then make that method it calls on ur plugin object and make it return ur custom item

south ridge
#

hmm

#

interesting

wraith carbon
dull magnet
#

isnt that one pretty pointless now?

#

since noone is building from source anymore

wraith carbon
#

oh

#

true

dull magnet
#

im sorry, thank you for working on it

#

perhaps you could remake it with a different method?

#

im thinking every time you open settings

  • fetch data of last time they were opened ( see last point )
  • for each plugin that is new (aka not stored before) , mark it as new
  • for each plugin in the store that was marked as new no more than 2 days ago, also mark it as new
  • store all current plugins in datastore. For each plugin that is newly new, also store a newTimestamp along with it
#

hope that makes sense

wraith carbon
#

Could do

dull magnet
#

thatd be cool

#

use DataStore api

green vessel
#

also this just seems pointless to me

green vessel
#
diff --git a/src/components/PatchHelper.tsx b/src/components/PatchHelper.tsx
index 853febc..8bfa606 100644
--- a/src/components/PatchHelper.tsx
+++ b/src/components/PatchHelper.tsx
@@ -202,7 +202,7 @@ function PatchHelper() {
     find: ${JSON.stringify(find)},
     replacement: {
         match: /${match.replace(/(?<!\\)\//g, "\\/")}/,
-        replacement: ${typeof replacement === "function" ? replacement.toString() : JSON.stringify(replacement)}
+        replace: ${typeof replacement === "function" ? replacement.toString() : JSON.stringify(replacement)}
     }
 }
         `.trim();

bleh

dull magnet
#

yop

#

I will fix whenever I make some other change

#

don't really wanna make a useless commit

green vessel
#

make four commits changing one character

south ridge
#

step 1 โคโ€โขโกโคโ€Œโ€โกโ€Œโขโ€โฃโกโ€Œโขโกโ€Œโขโ€โขโกโขโ€Œโฃโคโ€โกโ€Œโ€Œโ€โกโ€Œโขโฃโกโ€โฃโ€Œโ€โ€Œโ€Œโขโ€Œโขโฃโ€โ€โ€โกโคโขโ€โกโขof porting invisible chat is done

opal fern
#

horror

south ridge
#

:D

opal fern
#

Don't pull this shit in here

south ridge
#

:D

dull magnet
south ridge
south ridge
#

omg yes โ™ฅ๏ธ โ™ฅ๏ธ โ™ฅ๏ธ

#

i brok ven

dull magnet
#

wha

fresh birch
#

3 three letter words

#

3 letter acronym

opal fern
#

3 four letter acronym

sweet depot
#

Explod

near aurora
#

@ ven how 2 git gud at regex

dull magnet
#

regex isn't well suited for that job idk why that person is mad

near aurora
#

discord giveth i taketh away

near aurora
#

it still too fucking wide tho

cinder wigeon
#

just learn the symbols and profit

wanton sierra
near aurora
#

what even is invisible chat

wanton sierra
# near aurora what even is invisible chat

When the days are cold
And the cards all fold
And the saints we see are all made of gold
When your dreams all fail
And the ones we hail
Are the worst of all, and the blood's run stale

When you feel my heat, look into my eyes
It's where my demons hide
It's where my demons hide
Don't get too close, it's dark inside
It's where my demons hide
It's where my demons hide

near aurora
#

what

wanton sierra
near aurora
#

i took away colors

#

can't have shit in my theme

#

tbh i just didn't like how out of place it looked

#

even though discord wants to desperately earn money, i don't care

dull magnet
#

restore my theme immediately

near aurora
#

no

#

consistency > goofyness

#

i could restore only your theme tho lol trolley

#

will see what do

near aurora
#

nobody:
discord: rect

austere gulch
#

circle rect my beloved

oblique prairie
near aurora
#

discord is fighting real hard with me (the red border is for debug, look how fucked it is)

#

im just trying to restore harmony,,,

#

vendy i am sorry as much as i love you you cant have ur colors

#

i have overstimulation

#

head bout to explod from new profiles

#

i need to hide more shit, not just new profiles

#

im really close to doing all: unset on the popout parent at this point

#

or just like

#

not relying on variables and hardcoding colors with my own scss variables

cinder wigeon
#

I will use

cinder wigeon
lone panther
#

because then you'd have to find where it says there is no custom profile

cinder wigeon
#

Just find wherever it gets the data from, patch it to return the data without the custom profile info

#

{ ...$1, customProfile: null }

#

Or something

#

Actually that might be a cool plugin idea
NoNitro and you could make it also hide server avatars, profile banners, etc

#

I might make that

regal rune
#

yes pls

#

these profiles are shit

near aurora
#

ill make css for it

cinder wigeon
#

bruh thats really easy to remove all the gradients just unset all of the css variables in the style attr

#

nevermind its slightly more complicated

#

plugin would be simpler

viral roost
#

are settings available at patch time? (in a patch replacement)

dull magnet
#

yes

#

Well you have to be careful with race conditions

#

top level no I think

#

but if you make replacement a function then yes

#

the issue is that to return defaults, plugins need to have finished initialising, but inside your plugin top level it will obviously run before plugins finished

#

you can fix that by doing like ```js
Settings.plugins.MyPlugin ??= {}
const settings = Settings.plugins.MyPlugin

#

but it's easier to just use a function and not worry about it

near aurora
#

i took away all the colors

#

all of them

#

instead of

#

i would say im sorry but i am not

#

it is a lot nicer to look at

#

it was too wide

#

might revisit & remove the strict overwrites i set in the future but not for now

dull magnet
#

apologise now

near aurora
#

sorry ven ily ill restore your colors

#

is what a pussy would say

#

i stil love you but no colors

dull magnet
green vessel
#

profle themes look good

dull magnet
#

that shit look like the battle pass

near aurora
#

so W I D E

#

why

#

i don't like so wide

green vessel
#

why are you so wide

#

bitchass mf

near aurora
#

i love this but it takes so much space

#

from the screen

#

i guess i could make it a custom module or something

#

this is still good

#

less wide

#

more clean

green vessel
#

that looks disgusting

green vessel
#

your opinion fucking sucks dude

near aurora
#

ffs where's that emoji re-parser plugin

#

"your subjective opinion is objectively wrong" ๐Ÿค“

green vessel
#

youre just always wrong ngl

near aurora
#

cope, mald, seethe

green vessel
#

ratio + yb better

near aurora
#

i am considering adding it back just for ven

#

but not sure yet

#

i think i need less visual stimuli, not more

#

been contemplating compact mode, even

#

ok yeah no this sucks

#

cozy it is

dull magnet
#

i will die

near aurora
#

noooo

#

don't die

#

ill fix

#

but tmrw

#

too tired rn

dull magnet
dull magnet
near aurora
#

can't too dumb to do that

#

also no longer drunk

#

i will go to bed soonish

#

i think i'll just leave premium profiles like they are but shirnk from 340px to 300 + muted text colors (where applicable)

#

and only apply custom styles to non premium

regal rune
#

maids

dull magnet
#

im gonna work on spotify controls

#

typescript tripping

magic violet
#

do u need to learn javascript before typescript?

austere gulch
#

may as well

cursive plank
#

anything that you can do in js, can be done in ts

#

so by learning ts, you also learn js

#

unless you already knew js

onyx terrace
#

ts is just js with types

#

so you remove the types and you got plain js

cursive plank
#

i never learnt js

#

or ts for that matter

#

i just use them

#

lmao

#

once you know python + kotlin
js is the easiest shit

#

ts might need some doc lookups
but thats all

onyx terrace
#

I mean yeah, once you're experienced enough in programming, you can pick up pretty much any language just by looking at its syntax

cursive plank
#

you learn them by using it

onyx terrace
#

so long the paradigm it's built on isn't too different from what you're used to

#

as a mainly Java developer, Haskell confused the shit out of me

cursive plank
#

i like to call them easter eggs

onyx terrace
#

or any functional language for that matter

cursive plank
#

jsfuck is a really nice easter egg

opal fern
grim hare
#

all the weirdness of js makes sense if you understand how things are handled within the language

#

objects on objects on objects

near aurora
#

@main rampart i mean melvim wasn't that mad lol

#

like u did give credits and compling to licences is kinda important ig

#

post result

#

lazy

#

ok

green vessel
#

bro really said window.alert()

oblique prairie
#

why don't you windows.alert("some bitches") for yourself?

#

why not?

#

fuck you

#

what

#

why lol

lone panther
green vessel
#

we bouta be alerting windows ๐Ÿ˜ฑ

lilac cipher
#

i will soon contribute

silver cave
#

do not

lilac cipher
#

true

sullen garden
#

please fix the button and also the album its hella big and not really fit with discord ui/ux guidelines thx