From f811ba371d346fefa8fd51bc2ae793908e158870 Mon Sep 17 00:00:00 2001 From: Nikita Karamov Date: Sat, 18 Mar 2023 02:11:18 +0100 Subject: [PATCH] Add copyright notices --- assets/pentagon.svg | 1 + assets/s2f.svg | 1 + assets/share2fedi.svg | 1 + script/build-icons | 3 +++ script/icons.js | 5 +++++ src/components/instance-select.astro | 5 +++++ src/count.js | 27 ++------------------------- src/pages/api/detect/[host].ts | 5 +++++ src/pages/api/instances.ts | 5 +++++ src/pages/api/share.ts | 5 +++++ src/pages/index.astro | 26 +++++--------------------- src/styles/main.scss | 21 ++------------------- src/util.ts | 5 +++++ 13 files changed, 45 insertions(+), 65 deletions(-) diff --git a/assets/pentagon.svg b/assets/pentagon.svg index 987bfa4..4fef2e9 100644 --- a/assets/pentagon.svg +++ b/assets/pentagon.svg @@ -1,3 +1,4 @@ + diff --git a/assets/s2f.svg b/assets/s2f.svg index d028f34..a5ae769 100644 --- a/assets/s2f.svg +++ b/assets/s2f.svg @@ -1,3 +1,4 @@ + diff --git a/assets/share2fedi.svg b/assets/share2fedi.svg index 86b952a..ee1d2bc 100644 --- a/assets/share2fedi.svg +++ b/assets/share2fedi.svg @@ -1,3 +1,4 @@ + diff --git a/script/build-icons b/script/build-icons index 9910111..43224c6 100755 --- a/script/build-icons +++ b/script/build-icons @@ -1,6 +1,9 @@ #!/bin/bash # This script converts raw SVG icons to favicons according to the article: # https://evilmartians.com/chronicles/how-to-favicon-in-2021-six-files-that-fit-most-needs +# +# © 2023 Nikita Karamov +# Licensed under AGPL v3 or later set -euo pipefail diff --git a/script/icons.js b/script/icons.js index 08aee6c..137c80c 100644 --- a/script/icons.js +++ b/script/icons.js @@ -1,3 +1,8 @@ +/*! + * © 2023 Nikita Karamov + * Licensed under AGPL v3 or later + */ + import { readFileSync, writeFileSync } from "node:fs"; import { join } from "node:path"; import sharp from "sharp"; diff --git a/src/components/instance-select.astro b/src/components/instance-select.astro index c2ea5b2..f189642 100644 --- a/src/components/instance-select.astro +++ b/src/components/instance-select.astro @@ -1,4 +1,9 @@ --- +/*! + * © 2023 Nikita Karamov + * Licensed under AGPL v3 or later + */ + let instances; try { const response = await fetch(new URL("/api/instances", Astro.url)); diff --git a/src/count.js b/src/count.js index 4a75bea..a71193b 100644 --- a/src/count.js +++ b/src/count.js @@ -1,29 +1,6 @@ /*! - * @source: https://github.com/kytta/share2fedi/blob/main/lib/count.js - * - * @licstart The following is the entire license notice for the - * JavaScript code in this page. - * - * share2fedi - Instance-agnostic share page for the Fediverse. - * Copyright (C) 2023 Nikita Karamov - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - * @licend The above is the entire license notice - * for the JavaScript code in this page. - * - * SPDX-License-Identifier: AGPL-3.0-or-later + * © 2022 Nikita Karamov + * Licensed under AGPL v3 or later */ // This is the analytics code for Share₂Fedi. It just sends a beacon diff --git a/src/pages/api/detect/[host].ts b/src/pages/api/detect/[host].ts index 1e93ca4..f16354a 100644 --- a/src/pages/api/detect/[host].ts +++ b/src/pages/api/detect/[host].ts @@ -1,3 +1,8 @@ +/*! + * © 2023 Nikita Karamov + * Licensed under AGPL v3 or later + */ + import { APIRoute } from "astro"; import { normalizeURL } from "../../../util"; diff --git a/src/pages/api/instances.ts b/src/pages/api/instances.ts index 0ac8d9c..9addd6c 100644 --- a/src/pages/api/instances.ts +++ b/src/pages/api/instances.ts @@ -1,3 +1,8 @@ +/*! + * © 2023 Nikita Karamov + * Licensed under AGPL v3 or later + */ + import { APIRoute } from "astro"; export const get: APIRoute = async () => { diff --git a/src/pages/api/share.ts b/src/pages/api/share.ts index 61c213d..347ff93 100644 --- a/src/pages/api/share.ts +++ b/src/pages/api/share.ts @@ -1,3 +1,8 @@ +/*! + * © 2023 Nikita Karamov + * Licensed under AGPL v3 or later + */ + import { APIRoute } from "astro"; export const post: APIRoute = async ({ redirect, request, url }) => { diff --git a/src/pages/index.astro b/src/pages/index.astro index 7432df0..48d1f61 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,4 +1,8 @@ --- +/*! + * © 2023 Nikita Karamov + * Licensed under AGPL v3 or later + */ import InstanceSelect from "../components/instance-select.astro"; import "../styles/main.scss"; @@ -7,27 +11,7 @@ const prefilledText = searchParameters.get("text"); const prefilledInstance = searchParameters.get("instance"); --- - + diff --git a/src/styles/main.scss b/src/styles/main.scss index e626f42..365c240 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -1,23 +1,6 @@ /*! - * @source: https://github.com/kytta/share2fedi/blob/main/lib/scss/style.scss - * - * share2fedi - Instance-agnostic share page for the Fediverse. - * Copyright (C) 2020-2023 Nikita Karamov - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - * SPDX-License-Identifier: AGPL-3.0-or-later + * © 2023 Nikita Karamov + * Licensed under AGPL v3 or later */ @use "sass:math"; diff --git a/src/util.ts b/src/util.ts index 5b7a2b1..a793150 100644 --- a/src/util.ts +++ b/src/util.ts @@ -1,3 +1,8 @@ +/*! + * © 2023 Nikita Karamov + * Licensed under AGPL v3 or later + */ + /** * Adds missing "https://" and ending slash to the URL *