Presences
Presences copied to clipboard
feat(Musixmatch): presence rewrite
Description
Musixmatch presence rewrite: add support for curators.musixmatch.com (curators missions and lyrics editor), dynamic covers in presence (/artist and /lyrics) and more
Acknowledgements
- [x] I read the Presence Guidelines
- [x] I linted the code by running
yarn format
- [x] The PR title follows the repo's commit conventions
Screenshots
Proof showing the creation/modification is working as expected
One question, @NMW03 can I change main author to my discord id/name and add you as contributor?
Maybe you can replace if/else if statements by a switch/case statement, it could increase the readability of the code by avoiding a repetition of
path.includes("...")
@RisingSunLight42 you mean
switch (true) {
case path.includes(...): ...
}
?
Maybe you can replace if/else if statements by a switch/case statement, it could increase the readability of the code by avoiding a repetition of
path.includes("...")
@RisingSunLight42 you mean
switch (true) { case path.includes(...): ... }
?
No Something more like :
switch(path.split("/")[index]) {
case "home":
...
}
...
Usually, the first if/else statement can be easily replaced by a switch since in the url it's almost always domain.com/thePageTested/somethingOther
So if you split it, you can test the string thePageTested
in a switch that is equal to path.includes("test")
Maybe you can replace if/else if statements by a switch/case statement, it could increase the readability of the code by avoiding a repetition of
path.includes("...")
@RisingSunLight42 you mean
switch (true) { case path.includes(...): ... }
?
No Something more like :
switch(path.split("/")[index]) { case "home": ... } ...
Usually, the first if/else statement can be easily replaced by a switch since in the url it's almost always
domain.com/thePageTested/somethingOther
So if you split it, you can test the string
thePageTested
in a switch that is equal topath.includes("test")
If you're still confused I implemented it in #6610
i can add this switch and change more selectors, but later
👋 @xKubsoneQ Don't forget to be active and apply changes for example, after one week without any updates, PR can be closed if there's no legitimate reason.