Skip to content

Commit 22955f5

Browse files
authored
Refactor WebLinkMatcher.ts and add additional. (#1924)
* Refactor WebLinkMatcher.ts and add additional. # ExtLinks.css: - Re-order ExtLinks.css by logo image name alphabetically. - - With exception for those those that have a logo in a different repository, move those to the top. - Clean up usage of background-image vs background. - Fix icon matching with links that only matched to http:// to also work with https:// - Add icon matching with links that did have icons, but were not being used. - Add additional icon matching with new icons (see: VocaDB/ExtIcons#7) - Icon matching via ^ match or * match has been left mostly the same, could still be a discussion point. - Clean up styling. # WebLinkMatcher.ts - Add additonal Weblink matchers relating to VocaDB/ExtIcons#7 * Revert "Refactor WebLinkMatcher.ts and add additional." This reverts commit 4efdaa5. * Add additional linkmatchers. * Replace all double with single quotes. * Add trailing slash to all URLs. * Replace all instances of background: with background-image: * Unify http and https checks. Some matchers would only match with http or https URLs. * Make bracket usage consistent. * Remove or combine duplicate entries. * Split Dwango and Animelo to use correct image. * Remove dead comment. * Move matchers with images not in ExtIcons to the top and add a comment where neccesary. * Sort all icon matchers alphabetically by png filename. * Adjust fasic and thbwiki to match filename. * Add icon matchers that have images but no matchers. - bsky - dojin-music * Add additional icon matchers. See: VocaDB/ExtIcons#7 - ah-soft - ai-voice - bandlab - dreamtonics - genius - github - marshmallow-qa - musixmatch - project sekai fandom wiki - reddit - voicevox - voisona * Fix missed unified http/https check. * Add back trailing slashes. * Process feedback. - Re-add accidentally removed link matchers. - Fix brace. * Remove regex from link matchers. * Fix malformed link matchers. * Set archive matcher last so it always takes precedence.
1 parent 1368142 commit 22955f5

2 files changed

Lines changed: 565 additions & 454 deletions

File tree

VocaDbWeb/Scripts/Shared/WebLinkMatcher.ts

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2029,6 +2029,76 @@ export class WebLinkMatcher {
20292029
desc: 'Blog',
20302030
cat: WebLinkCategory.Official,
20312031
},
2032+
{
2033+
url: '.reddit.com',
2034+
desc: 'Reddit',
2035+
cat: WebLinkCategory.Official,
2036+
},
2037+
{
2038+
url: '.github.com',
2039+
desc: 'Github',
2040+
cat: WebLinkCategory.Official,
2041+
},
2042+
{
2043+
url: 'marshmallow-qa.com',
2044+
desc: 'Marshmallow QA',
2045+
cat: WebLinkCategory.Other,
2046+
},
2047+
{
2048+
url: 'ah-soft.com',
2049+
desc: 'AH-Software',
2050+
cat: WebLinkCategory.Commercial,
2051+
},
2052+
{
2053+
url: 'store.dreamtonics.com',
2054+
desc: 'Dreamtonics',
2055+
cat: WebLinkCategory.Commercial,
2056+
},
2057+
{
2058+
url: 'voisona.com/song',
2059+
desc: 'Voisona Song',
2060+
cat: WebLinkCategory.Commercial,
2061+
},
2062+
{
2063+
url: 'voisona.com/talk',
2064+
desc: 'Voisona Talk',
2065+
cat: WebLinkCategory.Commercial,
2066+
},
2067+
{
2068+
url: 'musixmatch.com',
2069+
desc: 'Musixmatch Lyrics',
2070+
cat: WebLinkCategory.Reference,
2071+
},
2072+
{
2073+
url: 'pjsekai.com',
2074+
desc: 'Project SEKAI Wiki',
2075+
cat: WebLinkCategory.Reference,
2076+
},
2077+
{
2078+
url: 'projectsekai.fandom.com',
2079+
desc: 'Project SEKAI Wiki',
2080+
cat: WebLinkCategory.Reference,
2081+
},
2082+
{
2083+
url: 'voicevox.hiroshiba.jp',
2084+
desc: 'VOICEVOX',
2085+
cat: WebLinkCategory.Commercial,
2086+
},
2087+
{
2088+
url: 'aivoice.jp/product',
2089+
desc: 'A.I. VOICE',
2090+
cat: WebLinkCategory.Commercial,
2091+
},
2092+
{
2093+
url: 'aivoice.jp',
2094+
desc: 'A.I. VOICE',
2095+
cat: WebLinkCategory.Official,
2096+
},
2097+
{
2098+
url: 'bandlab.com',
2099+
desc: 'BandLab',
2100+
cat: WebLinkCategory.Official,
2101+
},
20322102
];
20332103

20342104
private static isMatch(url: string, item: WebLinkMatcher): boolean {

0 commit comments

Comments
 (0)