Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /home/picotech/domains/qr.picotech.app/public_html_v3_4/public/js/plugins-init/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
function generateQR() {
let e = $("#restaurant option:selected").attr("data-url");
if (!e) return void $("#downloadImage").hide();
$("#downloadImage").show();
const o = $("#selectTable").val();
o && (e = e + "&table=" + o);
const n = $("#fillColor").val(), t = $("#bgColor").val(), a = $("#textColor").val(), r = $("#qrText").val(),
i = parseInt($("#qrMode").val()), l = parseFloat($("#qrTextSize").val()), s = parseFloat($("#qrPosX").val()),
d = parseFloat($("#qrPosY").val()), c = $("#qrPreImage")[0];
$("#qrCode").empty().qrcode({
render: "image",
size: 250,
fill: n,
background: t,
text: e,
ecLevel: "H",
mode: i,
mSize: l,
mPosX: s,
mPosY: d,
radius: 0,
label: r,
fontname: "sans",
fontcolor: a,
quiet: 1,
image: c
})
}
function handleQRModeChange() {
const e = $("#qrMode").val(), o = $("#imageSection"), n = $("#textSection"), t = $("#customization");
t.show(), 0 == e ? (o.hide(), n.hide(), t.hide()) : 1 == e || 2 == e ? (n.show(), o.hide()) : 3 != e && 4 != e || (n.hide(), o.show())
}
function handleSizeChange(e) {
const o = parseInt(e[0]) / 100 / 3;
$("#qrTextSize").val(o), generateQR()
}
function handlePosXChange(e) {
const o = parseInt(e[0]) / 100;
$("#qrPosX").val(o), generateQR()
}
function handlePosYChange(e) {
const o = parseInt(e[0]) / 100;
$("#qrPosY").val(o), generateQR()
}
$("#restaurant,#selectTable,#fillColor,#textColor,#bgColor,#qrMode,#qrText").on("change asColorPicker::change keyup", function (e) {
setTimeout(function () {
generateQR()
}, 300)
}), $("#downloadImage").on("click", function (e) {
e.preventDefault();
let o = $("#restaurant").val(), n = $("#qrCode img").first().attr("src"), t = document.createElement("a");
t.href = n, t.download = "qr-" + o + ".png", t.click()
}), $(".as_colorpicker").asColorPicker(), $("#qrImage").on("change", function (e) {
const o = $("#qrImage")[0];
let n = o;
o.files && o.files[0] && ((n = new window.FileReader).onload = function (e) {
$("#qrPreImage").attr("src", e.target.result), setTimeout(generateQR, 300)
}, n.readAsDataURL(o.files[0]))
}), $("#qrMode").on("change", function (e) {
handleQRModeChange()
}), handleQRModeChange();
let size = document.getElementById("size");
noUiSlider.create(size, {
start: 35,
behaviour: "snap",
connect: [!0, !1],
range: {min: 0, max: 100}
}), size.noUiSlider.on("change", handleSizeChange);
let posX = document.getElementById("qrPosXSlider");
noUiSlider.create(posX, {
start: 50,
behaviour: "snap",
connect: [!0, !1],
range: {min: 0, max: 100}
}), posX.noUiSlider.on("change", handlePosXChange);
let posY = document.getElementById("qrPosYSlider");
noUiSlider.create(posY, {
start: 50,
behaviour: "snap",
connect: [!0, !1],
range: {min: 0, max: 100}
}), posY.noUiSlider.on("change", handlePosYChange);
const qrCodeGeneratedSection = $("#qrCodeGeneratedSection"), stickyTop = qrCodeGeneratedSection.offset().top;
$(window).on("scroll", function () {
$(window).scrollTop() >= stickyTop - 130 ? qrCodeGeneratedSection.css({
position: "fixed",
top: "140px",
width: "100%",
"max-width": "34%"
}) : qrCodeGeneratedSection.css({position: "relative", top: "0px", width: "initial", "max-width": "initial"})
}), $(document).ready(function () {
$("#restaurant").val($("#restaurant option:eq(1)").val()).trigger("change")
});
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0053 ]-- |