From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from localhost.localdomain (unknown [138.197.159.143]) by gnuweeb.org (Postfix) with ESMTPSA id 5666F7E5AE; Sun, 12 Jun 2022 12:07:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1655035644; bh=7l7qCSfk4zx2XG+YNYlYT3j24H5Hxf0QfjXz51SjLNo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iwR0YRAPeKDvHSPSsiAJm4sYNElYJdTccnzoty5WWWSRwYKlB5DFbOLfkvaM4jrUH 8y5ujAYSvFm3yogprSraKcoFIT8/GjTLngVuSwtAw5Dy4aAz+EeYPDJiNNiDt1afzT fDWQ4f65aJzaiHIsgEwdxA06Mp7GUzRxh/NbDzeRXHJ0fhSiBYGEs9R3NiOT1640c3 MAxl9F6Ja6elXhTAlYHLtb4ZZTq5/1H2Em/hXi8eTuSzyS1YjB800FIHK0WsRYT4/P YsA0QjrKfxYt6Tw0ccyOXQiBWdBqrf1VElptMULlqAeLjLowacyQnAzkue7z3yaIuW D7GuZrxMUJU1g== From: Alviro Iskandar Setiawan To: "Fernanda Ma'rouf" , Akiekano Cc: Alviro Iskandar Setiawan , "GNU/Weeb Mailing List" , Ammar Faizi , Ammar Alifian Fahdan , Irvan Malik Azantha , Khoiri , Muhammad Irvan Hakim Subject: [PATCH buubuu v1 01/10] assets: Create common.js to place common used helpers Date: Sun, 12 Jun 2022 12:07:11 +0000 Message-Id: <20220612120720.2750101-1-alviro.iskandar@gnuweeb.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We will have many JavaScript helper functions that will be used all over the place. Create a single file that we can include this from all HTML pages to reduce the burden of rewriting those functions again and again. Signed-off-by: Alviro Iskandar Setiawan --- assets/common.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 assets/common.js diff --git a/assets/common.js b/assets/common.js new file mode 100644 index 0000000..ef20eac --- /dev/null +++ b/assets/common.js @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (C) 2022 Alviro Iskandar Setiawan + * + * This is the common JavaScript file that will be included from all + * pages. It contains often used helpers. + */ + + +function get_eid(id) { + return document.getElementById(id); +} -- Alviro Iskandar Setiawan