Added m3u8 stream support to media module. Added Elegant Angel. Added regex parameter to qu's number method. Various tags.

This commit is contained in:
DebaucheryLibrarian
2020-07-17 03:39:13 +02:00
parent 66d6322c1d
commit a88c2f0760
27 changed files with 222 additions and 223 deletions

View File

@@ -140,10 +140,18 @@ function styles(context, selector, styleAttr) {
return elStyles;
}
function number(context, selector, attr = true) {
function number(context, selector, match = /\d+/, attr = 'textContent') {
const value = q(context, selector, attr);
return value ? Number(value) : null;
if (value && match) {
return Number(value.match(match)?.[0]);
}
if (value) {
return Number(value);
}
return null;
}
function meta(context, selector, attrArg = 'content', applyTrim = true) {
@@ -280,6 +288,8 @@ const quFuncs = {
date,
dur: duration,
duration,
element: q,
el: q,
exists,
image,
images,