mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-05-13 19:30:36 +02:00
@@ -66,7 +66,7 @@
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
then set expr to it
|
then set expr to it
|
||||||
then call math.evaluate(expr)
|
then call math.evaluate(expr).toNumber()
|
||||||
if result exists and result is a Number
|
if result exists and result is a Number
|
||||||
js(result)
|
js(result)
|
||||||
return result.toLocaleString(undefined, {minimumFractionDigits: 0, maximumFractionDigits: 40})
|
return result.toLocaleString(undefined, {minimumFractionDigits: 0, maximumFractionDigits: 40})
|
||||||
|
|||||||
@@ -2,18 +2,23 @@ import _hyperscript from 'hyperscript.org/dist/_hyperscript.min';
|
|||||||
import './_htmx.js';
|
import './_htmx.js';
|
||||||
import Alpine from "alpinejs";
|
import Alpine from "alpinejs";
|
||||||
import mask from '@alpinejs/mask';
|
import mask from '@alpinejs/mask';
|
||||||
import { create, all } from 'mathjs';
|
import {create, all} from 'mathjs';
|
||||||
|
|
||||||
window.Alpine = Alpine;
|
window.Alpine = Alpine;
|
||||||
window._hyperscript = _hyperscript;
|
window._hyperscript = _hyperscript;
|
||||||
window.math = create(all, { });
|
window.math = create(all, {
|
||||||
|
number: 'BigNumber', // Default type of number:
|
||||||
|
// 'number' (default), 'BigNumber', or 'Fraction'
|
||||||
|
precision: 64, // Number of significant digits for BigNumbers
|
||||||
|
relTol: 1e-60,
|
||||||
|
absTol: 1e-63
|
||||||
|
});
|
||||||
|
|
||||||
Alpine.plugin(mask);
|
Alpine.plugin(mask);
|
||||||
Alpine.start();
|
Alpine.start();
|
||||||
_hyperscript.browserInit();
|
_hyperscript.browserInit();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const successAudio = new Audio("/static/sounds/success.mp3");
|
const successAudio = new Audio("/static/sounds/success.mp3");
|
||||||
const popAudio = new Audio("/static/sounds/pop.mp3");
|
const popAudio = new Audio("/static/sounds/pop.mp3");
|
||||||
window.paidSound = successAudio;
|
window.paidSound = successAudio;
|
||||||
|
|||||||
Reference in New Issue
Block a user