Add ccv3 cbs
This commit is contained in:
@@ -186,4 +186,8 @@ html, body{
|
||||
border-left: 0.4rem solid var(--risu-theme-borderc);
|
||||
/* transition colors */
|
||||
transition: border-color 0.5s;
|
||||
}
|
||||
|
||||
.x-risu-risu-comment{
|
||||
@apply border border-darkborderc bg-darkbg text-textcolor rounded-md shadow-sm focus:outline-none transition-colors duration-200 px-4 py-2 min-w-0
|
||||
}
|
||||
@@ -970,12 +970,12 @@ const matcher = (p1:string,matcherArg:matcherArg) => {
|
||||
return arra[randomIndex]
|
||||
}
|
||||
else{
|
||||
const arr = p1.split(/\:|\,/g)
|
||||
const arr = p1.replace(/\\,/g, '§X').split(/\:|\,/g)
|
||||
const randomIndex = Math.floor(Math.random() * (arr.length - 1)) + 1
|
||||
if(matcherArg.tokenizeAccurate){
|
||||
return arra[0]
|
||||
}
|
||||
return arr[randomIndex]
|
||||
return arr[randomIndex]?.replace(/§X/g, ',') ?? ''
|
||||
}
|
||||
}
|
||||
if(p1.startsWith('pick')){
|
||||
@@ -989,12 +989,12 @@ const matcher = (p1:string,matcherArg:matcherArg) => {
|
||||
return arra[randomIndex]
|
||||
}
|
||||
else{
|
||||
const arr = p1.split(/\:|\,/g)
|
||||
const arr = p1.replace(/\\,/g, '§X').split(/\:|\,/g)
|
||||
const randomIndex = Math.floor(rand() * (arr.length - 1)) + 1
|
||||
if(matcherArg.tokenizeAccurate){
|
||||
return arra[0]
|
||||
}
|
||||
return arr[randomIndex]
|
||||
return arr[randomIndex]?.replace(/§X/g, ',') ?? ''
|
||||
}
|
||||
}
|
||||
if(p1.startsWith('roll')){
|
||||
@@ -1020,6 +1020,23 @@ const matcher = (p1:string,matcherArg:matcherArg) => {
|
||||
|
||||
return calcString(substring).toString()
|
||||
}
|
||||
if(p1.startsWith('//')){
|
||||
return ''
|
||||
}
|
||||
if(p1.startsWith('hidden_key:')){
|
||||
return ''
|
||||
}
|
||||
if(p1.startsWith('reverse:')){
|
||||
return p1.substring(
|
||||
p1[8] === ':' ? 9 : 8
|
||||
).split('').reverse().join('')
|
||||
}
|
||||
if(p1.startsWith('comment:')){
|
||||
if(!matcherArg.displaying){
|
||||
return ''
|
||||
}
|
||||
return `<div class="risu-comment">${p1.substring(8)}</div>`
|
||||
}
|
||||
return null
|
||||
} catch (error) {
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user