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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user