mirror of
https://github.com/grocy/grocy.git
synced 2026-04-06 21:06:15 +02:00
15 lines
344 B
JavaScript
15 lines
344 B
JavaScript
$(function()
|
|
{
|
|
$(".print-timestamp").text(moment().format("l LT"));
|
|
|
|
const url = new URL(window.location);
|
|
//open print dialog only if the parameter "preview" is not set
|
|
if (!url.searchParams.has("preview"))
|
|
{
|
|
window.print();
|
|
|
|
//redirect to the shoppinglist
|
|
url.searchParams.delete("print");
|
|
window.location.replace(url);
|
|
}
|
|
}); |