just a clean up
- moved pattern testers out of match module (thanks you @radkii) - button borders are now easier to see the reason this commit exists is because i tried to implement a language picker and failed to do it properly so here we are
This commit is contained in:
parent
aa9bb7d5d5
commit
2212ea7dc8
10 changed files with 139 additions and 125 deletions
|
@ -12,7 +12,7 @@ import renderPage from "./modules/pageRender.js";
|
||||||
import { apiJSON, languageCode } from "./modules/sub/utils.js";
|
import { apiJSON, languageCode } from "./modules/sub/utils.js";
|
||||||
import { Bright, Cyan } from "./modules/sub/consoleText.js";
|
import { Bright, Cyan } from "./modules/sub/consoleText.js";
|
||||||
import stream from "./modules/stream/stream.js";
|
import stream from "./modules/stream/stream.js";
|
||||||
import loc from "./localization/manager.js";
|
import loc, { loadLoc } from "./localization/manager.js";
|
||||||
import { buildFront } from "./modules/build.js";
|
import { buildFront } from "./modules/build.js";
|
||||||
|
|
||||||
const commitHash = shortCommit();
|
const commitHash = shortCommit();
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
--transparent: rgba(0, 0, 0, 0);
|
--transparent: rgba(0, 0, 0, 0);
|
||||||
--without-padding: calc(100% - 4rem);
|
--without-padding: calc(100% - 4rem);
|
||||||
--border-15: 0.15rem solid var(--accent);
|
--border-15: 0.15rem solid var(--accent);
|
||||||
|
--font-mono: 'Noto Sans Mono', 'Consolas', 'SF Mono', monospace;
|
||||||
}
|
}
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
:root {
|
:root {
|
||||||
|
@ -44,7 +45,7 @@ body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
background: var(--background);
|
background: var(--background);
|
||||||
color: var(--accent);
|
color: var(--accent);
|
||||||
font-family: 'Noto Sans Mono', 'Consolas', 'SF Mono', monospace;
|
font-family: var(--font-mono);
|
||||||
user-select: none;
|
user-select: none;
|
||||||
-webkit-tap-highlight-color: var(--transparent);
|
-webkit-tap-highlight-color: var(--transparent);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -89,7 +90,7 @@ a {
|
||||||
button {
|
button {
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
font-family: 'Noto Sans Mono', 'Consolas', 'SF Mono', monospace;
|
font-family: var(--font-mono);
|
||||||
color: var(--accent);
|
color: var(--accent);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
|
@ -130,7 +131,7 @@ input[type="checkbox"] {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
}
|
}
|
||||||
.mono {
|
.mono {
|
||||||
font-family: 'Noto Sans Mono', 'Consolas', 'SF Mono', monospace;
|
font-family: var(--font-mono);
|
||||||
}
|
}
|
||||||
.center {
|
.center {
|
||||||
top: 50%;
|
top: 50%;
|
||||||
|
@ -169,13 +170,13 @@ input[type="checkbox"] {
|
||||||
color: var(--accent);
|
color: var(--accent);
|
||||||
border: 0;
|
border: 0;
|
||||||
float: right;
|
float: right;
|
||||||
border-bottom: 0.1rem solid var(--accent-unhover);
|
border-bottom: 0.15rem solid var(--accent-unhover);
|
||||||
transition: border-bottom 0.2s;
|
transition: border-bottom 0.2s;
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
#url-input-area:focus {
|
#url-input-area:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-bottom: 0.1rem solid var(--accent);
|
border-bottom: var(--border-15);
|
||||||
}
|
}
|
||||||
#download-button {
|
#download-button {
|
||||||
height: 2.5rem;
|
height: 2.5rem;
|
||||||
|
@ -334,7 +335,7 @@ input[type="checkbox"] {
|
||||||
align-content: center;
|
align-content: center;
|
||||||
padding: 0.6rem;
|
padding: 0.6rem;
|
||||||
padding-right: 1rem;
|
padding-right: 1rem;
|
||||||
border: 0.1rem solid;
|
border: var(--border-15);
|
||||||
width: auto;
|
width: auto;
|
||||||
margin: 0 0.5rem 0.5rem 0;
|
margin: 0 0.5rem 0.5rem 0;
|
||||||
}
|
}
|
||||||
|
@ -364,8 +365,8 @@ input[type="checkbox"] {
|
||||||
color: var(--accent-unhover-2);
|
color: var(--accent-unhover-2);
|
||||||
}
|
}
|
||||||
.switch {
|
.switch {
|
||||||
border-top: solid 0.1rem var(--accent);
|
border-top: var(--border-15);
|
||||||
border-bottom: solid 0.1rem var(--accent);
|
border-bottom: var(--border-15);
|
||||||
padding: 0.8rem;
|
padding: 0.8rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -376,13 +377,13 @@ input[type="checkbox"] {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.switch.full {
|
.switch.full {
|
||||||
border: solid 0.1rem var(--accent);
|
border: var(--border-15);
|
||||||
}
|
}
|
||||||
.switch.left {
|
.switch.left {
|
||||||
border-left: solid 0.1rem var(--accent);
|
border-left: var(--border-15);
|
||||||
}
|
}
|
||||||
.switch.right {
|
.switch.right {
|
||||||
border-right: solid 0.1rem var(--accent);
|
border-right: var(--border-15);
|
||||||
}
|
}
|
||||||
.switch.space-right {
|
.switch.space-right {
|
||||||
margin-right: 1rem
|
margin-right: 1rem
|
||||||
|
|
|
@ -41,7 +41,7 @@ function changeDownloadButton(action, text) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
document.addEventListener("keydown", function(event) {
|
document.addEventListener("keydown", function (event) {
|
||||||
if (event.key == "Tab") {
|
if (event.key == "Tab") {
|
||||||
eid("download-button").value = '>>'
|
eid("download-button").value = '>>'
|
||||||
eid("download-button").style.padding = '0 1rem'
|
eid("download-button").style.padding = '0 1rem'
|
||||||
|
@ -81,7 +81,7 @@ function popup(type, action, text) {
|
||||||
case "download":
|
case "download":
|
||||||
if (action == 1) {
|
if (action == 1) {
|
||||||
eid("pd-download").href = text;
|
eid("pd-download").href = text;
|
||||||
eid("pd-copy").setAttribute("onClick", `copy('pd-copy', '${text}')` );
|
eid("pd-copy").setAttribute("onClick", `copy('pd-copy', '${text}')`);
|
||||||
}
|
}
|
||||||
eid("popup-download").style.visibility = vis(action);
|
eid("popup-download").style.visibility = vis(action);
|
||||||
break;
|
break;
|
||||||
|
@ -200,4 +200,4 @@ eid("url-input-area").addEventListener("keyup", (event) => {
|
||||||
if (event.key === 'Enter') {
|
if (event.key === 'Enter') {
|
||||||
eid("download-button").click();
|
eid("download-button").click();
|
||||||
}
|
}
|
||||||
})
|
})
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "bahasa indonesia",
|
"name": "indonesia",
|
||||||
"code": "id",
|
"code": "id",
|
||||||
"substrings": {
|
"substrings": {
|
||||||
"ContactLink": "<a class=\"text-backdrop\" href=\"{repo}\">beri tau saya</a>"
|
"ContactLink": "<a class=\"text-backdrop\" href=\"{repo}\">beri tau saya</a>"
|
||||||
|
|
|
@ -3,6 +3,7 @@ import { appName, repo } from "../modules/config.js";
|
||||||
import loadJson from "../modules/sub/loadJSON.js";
|
import loadJson from "../modules/sub/loadJSON.js";
|
||||||
|
|
||||||
const locPath = './src/localization/languages'
|
const locPath = './src/localization/languages'
|
||||||
|
|
||||||
let loc = {}
|
let loc = {}
|
||||||
|
|
||||||
export async function loadLoc() {
|
export async function loadLoc() {
|
||||||
|
|
|
@ -3,7 +3,7 @@ const config = loadJson("./src/config.json");
|
||||||
const packageJson = loadJson("./package.json");
|
const packageJson = loadJson("./package.json");
|
||||||
|
|
||||||
export const
|
export const
|
||||||
services = loadJson("./src/modules/services/_config.json"),
|
services = loadJson("./src/modules/servicesConfig.json"),
|
||||||
appName = packageJson.name,
|
appName = packageJson.name,
|
||||||
version = packageJson.version,
|
version = packageJson.version,
|
||||||
streamLifespan = config.streamLifespan,
|
streamLifespan = config.streamLifespan,
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
import { apiJSON } from "./sub/utils.js";
|
import { apiJSON } from "./sub/utils.js";
|
||||||
import { errorUnsupported, genericError } from "./sub/errors.js";
|
import { errorUnsupported, genericError } from "./sub/errors.js";
|
||||||
|
|
||||||
|
import { testers } from "./servicesPatternTesters.js";
|
||||||
|
|
||||||
import bilibili from "./services/bilibili.js";
|
import bilibili from "./services/bilibili.js";
|
||||||
import reddit from "./services/reddit.js";
|
import reddit from "./services/reddit.js";
|
||||||
import twitter from "./services/twitter.js";
|
import twitter from "./services/twitter.js";
|
||||||
|
@ -12,120 +14,108 @@ import tumblr from "./services/tumblr.js";
|
||||||
|
|
||||||
export default async function (host, patternMatch, url, ip, lang, format, quality) {
|
export default async function (host, patternMatch, url, ip, lang, format, quality) {
|
||||||
try {
|
try {
|
||||||
|
if (!testers[host]) return apiJSON(0, { t: errorUnsupported(lang) });
|
||||||
|
if (!(testers[host](patternMatch))) throw Error();
|
||||||
|
|
||||||
|
let r;
|
||||||
switch (host) {
|
switch (host) {
|
||||||
case "twitter":
|
case "twitter":
|
||||||
if (patternMatch["id"] && patternMatch["id"].length < 20) {
|
r = await twitter({
|
||||||
let r = await twitter({
|
id: patternMatch["id"],
|
||||||
id: patternMatch["id"],
|
lang: lang
|
||||||
lang: lang
|
});
|
||||||
});
|
return (!r.error) ? apiJSON(1, { u: r.split('?')[0] }) : apiJSON(0, { t: r.error });
|
||||||
return (!r.error) ? apiJSON(1, { u: r.split('?')[0] }) : apiJSON(0, { t: r.error })
|
|
||||||
} else throw Error()
|
|
||||||
case "vk":
|
case "vk":
|
||||||
if (patternMatch["userId"] && patternMatch["videoId"] &&
|
r = await vk({
|
||||||
patternMatch["userId"].length <= 10 && patternMatch["videoId"].length == 9) {
|
userId: patternMatch["userId"],
|
||||||
let r = await vk({
|
videoId: patternMatch["videoId"],
|
||||||
userId: patternMatch["userId"],
|
lang: lang, quality: quality
|
||||||
videoId: patternMatch["videoId"],
|
});
|
||||||
lang: lang, quality: quality
|
return (!r.error) ? apiJSON(2, { type: "bridge", lang: lang, u: r.url, filename: r.filename,
|
||||||
});
|
service: host, ip: ip, salt: process.env.streamSalt }) : apiJSON(0, { t: r.error });
|
||||||
return (!r.error) ? apiJSON(2,
|
|
||||||
{ type: "bridge", lang: lang, u: r.url, filename:
|
|
||||||
r.filename, service: host, ip: ip, salt: process.env.streamSalt }) : apiJSON(0, { t: r.error });
|
|
||||||
} else throw Error()
|
|
||||||
case "bilibili":
|
case "bilibili":
|
||||||
if (patternMatch["id"] && patternMatch["id"].length >= 12) {
|
r = await bilibili({
|
||||||
let r = await bilibili({
|
id: patternMatch["id"].slice(0, 12),
|
||||||
id: patternMatch["id"].slice(0, 12),
|
lang: lang
|
||||||
lang: lang
|
});
|
||||||
});
|
return (!r.error) ? apiJSON(2, {
|
||||||
return (!r.error) ? apiJSON(2, {
|
type: "render", u: r.urls, lang: lang,
|
||||||
type: "render", u: r.urls, lang: lang,
|
service: host, ip: ip,
|
||||||
service: host, ip: ip,
|
filename: r.filename,
|
||||||
filename: r.filename,
|
salt: process.env.streamSalt, time: r.time
|
||||||
salt: process.env.streamSalt, time: r.time
|
}) : apiJSON(0, { t: r.error });
|
||||||
}) : apiJSON(0, { t: r.error });
|
|
||||||
} else throw Error()
|
|
||||||
case "youtube":
|
case "youtube":
|
||||||
if (patternMatch["id"] && patternMatch["id"].length >= 11) {
|
let fetchInfo = {
|
||||||
let fetchInfo = {
|
id: patternMatch["id"].slice(0,11),
|
||||||
id: patternMatch["id"].slice(0,11),
|
lang: lang, quality: quality,
|
||||||
lang: lang, quality: quality,
|
format: "mp4"
|
||||||
format: "mp4"
|
};
|
||||||
};
|
if (url.match('music.youtube.com')) {
|
||||||
if (url.match('music.youtube.com')) {
|
format = "audio"
|
||||||
format = "audio"
|
}
|
||||||
}
|
switch (format) {
|
||||||
switch (format) {
|
case "webm":
|
||||||
case "webm":
|
fetchInfo["format"] = "webm";
|
||||||
fetchInfo["format"] = "webm";
|
break;
|
||||||
break;
|
case "audio":
|
||||||
case "audio":
|
fetchInfo["format"] = "webm";
|
||||||
fetchInfo["format"] = "webm";
|
fetchInfo["isAudioOnly"] = true;
|
||||||
fetchInfo["isAudioOnly"] = true;
|
fetchInfo["quality"] = "max";
|
||||||
fetchInfo["quality"] = "max";
|
break;
|
||||||
break;
|
}
|
||||||
}
|
r = await youtube(fetchInfo);
|
||||||
let r = await youtube(fetchInfo);
|
return (!r.error) ? apiJSON(2, {
|
||||||
return (!r.error) ? apiJSON(2, {
|
type: r.type, u: r.urls, lang: lang, service: host, ip: ip,
|
||||||
type: r.type, u: r.urls, lang: lang, service: host, ip: ip,
|
filename: r.filename, salt: process.env.streamSalt,
|
||||||
filename: r.filename, salt: process.env.streamSalt,
|
isAudioOnly: fetchInfo["isAudioOnly"] ? fetchInfo["isAudioOnly"] : false,
|
||||||
isAudioOnly: fetchInfo["isAudioOnly"] ? fetchInfo["isAudioOnly"] : false,
|
time: r.time,
|
||||||
time: r.time,
|
}) : apiJSON(0, { t: r.error });
|
||||||
}) : apiJSON(0, { t: r.error });
|
|
||||||
} else throw Error()
|
|
||||||
case "reddit":
|
case "reddit":
|
||||||
if (patternMatch["sub"] && patternMatch["id"] && patternMatch["title"] &&
|
r = await reddit({
|
||||||
patternMatch["sub"].length <= 22 && patternMatch["id"].length <= 10 && patternMatch["title"].length <= 96) {
|
sub: patternMatch["sub"],
|
||||||
let r = await reddit({
|
id: patternMatch["id"],
|
||||||
sub: patternMatch["sub"],
|
title: patternMatch["title"], lang: lang,
|
||||||
id: patternMatch["id"],
|
});
|
||||||
title: patternMatch["title"], lang: lang,
|
return (!r.error) ? apiJSON(r.typeId, {
|
||||||
});
|
type: r.type, u: r.urls, lang: lang,
|
||||||
return (!r.error) ? apiJSON(r.typeId, {
|
service: host, ip: ip,
|
||||||
type: r.type, u: r.urls, lang: lang,
|
filename: r.filename, salt: process.env.streamSalt
|
||||||
service: host, ip: ip,
|
}) : apiJSON(0, { t: r.error });
|
||||||
filename: r.filename, salt: process.env.streamSalt
|
|
||||||
}) : apiJSON(0, { t: r.error });
|
|
||||||
} else throw Error()
|
|
||||||
case "tiktok":
|
case "tiktok":
|
||||||
if ((patternMatch["user"] && patternMatch["postId"] && patternMatch["postId"].length <= 21) ||
|
r = await tiktok({
|
||||||
(patternMatch["id"] && patternMatch["id"].length <= 13)) {
|
postId: patternMatch["postId"],
|
||||||
let r = await tiktok({
|
id: patternMatch["id"], lang: lang,
|
||||||
postId: patternMatch["postId"],
|
});
|
||||||
id: patternMatch["id"], lang: lang,
|
return (!r.error) ? apiJSON(2, {
|
||||||
});
|
type: "bridge", u: r.urls, lang: lang,
|
||||||
return (!r.error) ? apiJSON(2, {
|
service: host, ip: ip,
|
||||||
type: "bridge", u: r.urls, lang: lang,
|
filename: r.filename, salt: process.env.streamSalt
|
||||||
service: host, ip: ip,
|
}) : apiJSON(0, { t: r.error });
|
||||||
filename: r.filename, salt: process.env.streamSalt
|
|
||||||
}) : apiJSON(0, { t: r.error });
|
|
||||||
} else throw Error()
|
|
||||||
case "douyin":
|
case "douyin":
|
||||||
if ((patternMatch["postId"] && patternMatch["postId"].length <= 21) ||
|
r = await douyin({
|
||||||
(patternMatch["id"] && patternMatch["id"].length <= 13)) {
|
postId: patternMatch["postId"],
|
||||||
let r = await douyin({
|
id: patternMatch["id"], lang: lang,
|
||||||
postId: patternMatch["postId"],
|
});
|
||||||
id: patternMatch["id"], lang: lang,
|
return (!r.error) ? apiJSON(2, {
|
||||||
});
|
type: "bridge", u: r.urls, lang: lang,
|
||||||
return (!r.error) ? apiJSON(2, {
|
service: host, ip: ip,
|
||||||
type: "bridge", u: r.urls, lang: lang,
|
filename: r.filename, salt: process.env.streamSalt
|
||||||
service: host, ip: ip,
|
}) : apiJSON(0, { t: r.error });
|
||||||
filename: r.filename, salt: process.env.streamSalt
|
|
||||||
}) : apiJSON(0, { t: r.error });
|
|
||||||
} else throw Error()
|
|
||||||
case "tumblr":
|
case "tumblr":
|
||||||
if ((patternMatch["id"] && patternMatch["id"].length < 21) ||
|
r = await tumblr({
|
||||||
(patternMatch["id"] && patternMatch["id"].length < 21 &&
|
id: patternMatch["id"], url: url, user: patternMatch["user"] ? patternMatch["user"] : false,
|
||||||
patternMatch["user"] && patternMatch["user"].length <= 32)) {
|
lang: lang
|
||||||
let r = await tumblr({
|
});
|
||||||
id: patternMatch["id"], url: url, user: patternMatch["user"] ? patternMatch["user"] : false,
|
return (!r.error) ? apiJSON(1, { u: r.split('?')[0] }) : apiJSON(0, { t: r.error });
|
||||||
lang: lang
|
|
||||||
});
|
|
||||||
return (!r.error) ? apiJSON(1, { u: r.split('?')[0] }) : apiJSON(0, { t: r.error })
|
|
||||||
} else throw Error()
|
|
||||||
default:
|
default:
|
||||||
return apiJSON(0, { t: errorUnsupported(lang) })
|
return apiJSON(0, { t: errorUnsupported(lang) });
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return apiJSON(0, { t: genericError(lang, host) })
|
return apiJSON(0, { t: genericError(lang, host) })
|
||||||
|
|
|
@ -2,7 +2,9 @@ import { services, appName, authorInfo, version, quality, repo, donations } from
|
||||||
import { getCommitInfo } from "./sub/currentCommit.js";
|
import { getCommitInfo } from "./sub/currentCommit.js";
|
||||||
import loc from "../localization/manager.js";
|
import loc from "../localization/manager.js";
|
||||||
|
|
||||||
let s = services
|
let s = services;
|
||||||
|
let com = getCommitInfo();
|
||||||
|
|
||||||
let enabledServices = Object.keys(s).filter((p) => {
|
let enabledServices = Object.keys(s).filter((p) => {
|
||||||
if (s[p].enabled) {
|
if (s[p].enabled) {
|
||||||
return true
|
return true
|
||||||
|
@ -19,8 +21,6 @@ let donate = ``
|
||||||
for (let i in donations) {
|
for (let i in donations) {
|
||||||
donate += `<div class="subtitle">${i} (REPLACEME)</div><div id="don-${i}" class="text-to-copy" onClick="copy('don-${i}')">${donations[i]}</div>`
|
donate += `<div class="subtitle">${i} (REPLACEME)</div><div id="don-${i}" class="text-to-copy" onClick="copy('don-${i}')">${donations[i]}</div>`
|
||||||
}
|
}
|
||||||
|
|
||||||
let com = getCommitInfo();
|
|
||||||
export default function(obj) {
|
export default function(obj) {
|
||||||
let isIOS = obj.useragent.toLowerCase().match("iphone os")
|
let isIOS = obj.useragent.toLowerCase().match("iphone os")
|
||||||
try {
|
try {
|
||||||
|
@ -196,7 +196,7 @@ export default function(obj) {
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
<script type="text/javascript">const loc = {noInternet:"${loc(obj.lang, 'ErrorNoInternet')}", noURLReturned: "${loc(obj.lang, 'ErrorBadFetch')}"}</script>
|
<script type="text/javascript">const loc = {noInternet:"${loc(obj.lang, 'ErrorNoInternet')}", noURLReturned: "${loc(obj.lang, 'ErrorBadFetch')}"};</script>
|
||||||
<script type="text/javascript" src="cobalt.js"></script>
|
<script type="text/javascript" src="cobalt.js"></script>
|
||||||
</html>`;
|
</html>`;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
22
src/modules/servicesPatternTesters.js
Normal file
22
src/modules/servicesPatternTesters.js
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
export let testers = {
|
||||||
|
"twitter": (patternMatch) => (patternMatch["id"] && patternMatch["id"].length < 20),
|
||||||
|
|
||||||
|
"vk": (patternMatch) => (patternMatch["userId"] && patternMatch["videoId"] &&
|
||||||
|
patternMatch["userId"].length <= 10 && patternMatch["videoId"].length == 9),
|
||||||
|
|
||||||
|
"bilibili": (patternMatch) => (patternMatch["id"] && patternMatch["id"].length >= 12),
|
||||||
|
|
||||||
|
"youtube": (patternMatch) => (patternMatch["id"] && patternMatch["id"].length >= 11),
|
||||||
|
|
||||||
|
"reddit": (patternMatch) => (patternMatch["sub"] && patternMatch["id"] && patternMatch["title"] &&
|
||||||
|
patternMatch["sub"].length <= 22 && patternMatch["id"].length <= 10 && patternMatch["title"].length <= 96),
|
||||||
|
|
||||||
|
"tiktok": (patternMatch) => ((patternMatch["user"] && patternMatch["postId"] && patternMatch["postId"].length <= 21) ||
|
||||||
|
(patternMatch["id"] && patternMatch["id"].length <= 13)),
|
||||||
|
|
||||||
|
"douyin": (patternMatch) => ((patternMatch["postId"] && patternMatch["postId"].length <= 21) ||
|
||||||
|
(patternMatch["id"] && patternMatch["id"].length <= 13)),
|
||||||
|
|
||||||
|
"tumblr": (patternMatch) => ((patternMatch["id"] && patternMatch["id"].length < 21) ||
|
||||||
|
(patternMatch["id"] && patternMatch["id"].length < 21 && patternMatch["user"] && patternMatch["user"].length <= 32)),
|
||||||
|
};
|
Loading…
Reference in a new issue