Merge pull request #1079 from JustAGenericUsername/main
This commit is contained in:
commit
78a7015247
|
|
@ -3939,7 +3939,7 @@ renderPostPixel(function(ctx){
|
||||||
if ((pixel.element == "sign") && pixel.sign){
|
if ((pixel.element == "sign") && pixel.sign){
|
||||||
ctx.font = `12pt Arial`
|
ctx.font = `12pt Arial`
|
||||||
ctx.fillStyle = pixel.color;
|
ctx.fillStyle = pixel.color;
|
||||||
ctx.fillText(pixel.sign = pixel.sign.replace(/\$\{([\w.\[\]]+)\}/g, (_, path) => {
|
ctx.fillText(pixel.sign.replace(/\$\{([\w.\[\]]+)\}/g, (_, path) => {
|
||||||
try {
|
try {
|
||||||
const value = new Function('return globalThis.' + path)();
|
const value = new Function('return globalThis.' + path)();
|
||||||
return typeof value === 'object' ? JSON.stringify(value) : value ?? '';
|
return typeof value === 'object' ? JSON.stringify(value) : value ?? '';
|
||||||
|
|
@ -3951,7 +3951,7 @@ renderPostPixel(function(ctx){
|
||||||
if (pixel.charge || pixel.chargeCD){
|
if (pixel.charge || pixel.chargeCD){
|
||||||
ctx.font = `12pt Arial`
|
ctx.font = `12pt Arial`
|
||||||
ctx.fillStyle = pixel.color;
|
ctx.fillStyle = pixel.color;
|
||||||
ctx.fillText(pixel.sign = pixel.sign.replace(/\$\{([\w.\[\]]+)\}/g, (_, path) => {
|
ctx.fillText(pixel.sign.replace(/\$\{([\w.\[\]]+)\}/g, (_, path) => {
|
||||||
try {
|
try {
|
||||||
const value = new Function('return globalThis.' + path)();
|
const value = new Function('return globalThis.' + path)();
|
||||||
return typeof value === 'object' ? JSON.stringify(value) : value ?? '';
|
return typeof value === 'object' ? JSON.stringify(value) : value ?? '';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue