From b525c5887f1a81a4a88257f7750b22e882dbf4c9 Mon Sep 17 00:00:00 2001 From: dakkar Date: Sat, 15 Jun 2024 11:36:55 +0100 Subject: add copyright text to all our files --- packages/frontend/src/scripts/check-animated-mfm.ts | 13 +++++++++---- packages/frontend/src/scripts/chiptune2.ts | 5 +++++ packages/frontend/src/scripts/favicon-dot.ts | 13 +++++++++---- packages/frontend/src/scripts/get-note-versions-menu.ts | 5 +++++ packages/frontend/src/scripts/search-engine-map.ts | 5 +++++ 5 files changed, 33 insertions(+), 8 deletions(-) (limited to 'packages/frontend/src/scripts') diff --git a/packages/frontend/src/scripts/check-animated-mfm.ts b/packages/frontend/src/scripts/check-animated-mfm.ts index eac18738ee..ec040a0234 100644 --- a/packages/frontend/src/scripts/check-animated-mfm.ts +++ b/packages/frontend/src/scripts/check-animated-mfm.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: marie and other Sharkey contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + import * as mfm from '@transfem-org/sfm-js'; export function checkAnimationFromMfm(nodes: mfm.MfmNode[]): boolean { @@ -8,9 +13,9 @@ export function checkAnimationFromMfm(nodes: mfm.MfmNode[]): boolean { node.props.name === 'twitch' || node.props.name === 'shake' || node.props.name === 'spin' || - node.props.name === 'jump' || - node.props.name === 'bounce' || - node.props.name === 'rainbow' || + node.props.name === 'jump' || + node.props.name === 'bounce' || + node.props.name === 'rainbow' || node.props.name === 'sparkle') { return true; } else { @@ -20,7 +25,7 @@ export function checkAnimationFromMfm(nodes: mfm.MfmNode[]): boolean { return false; } }); - + if (animatedNodes.length > 0) { return true; } else { diff --git a/packages/frontend/src/scripts/chiptune2.ts b/packages/frontend/src/scripts/chiptune2.ts index 56afb9b708..220002ff1e 100644 --- a/packages/frontend/src/scripts/chiptune2.ts +++ b/packages/frontend/src/scripts/chiptune2.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: marie and other Sharkey contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + /* eslint-disable */ const ChiptuneAudioContext = window.AudioContext || window.webkitAudioContext; diff --git a/packages/frontend/src/scripts/favicon-dot.ts b/packages/frontend/src/scripts/favicon-dot.ts index e338f55f72..ba6dcb5d30 100644 --- a/packages/frontend/src/scripts/favicon-dot.ts +++ b/packages/frontend/src/scripts/favicon-dot.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: leah and other Sharkey contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + import tinycolor from 'tinycolor2'; class FavIconDot { @@ -17,13 +22,13 @@ class FavIconDot { */ public async setup() { const element: HTMLLinkElement = await this.getOrMakeFaviconElement(); - + this.faviconEL = element; this.src = this.faviconEL.getAttribute('href'); this.ctx = this.canvas.getContext('2d'); - + this.faviconImage = document.createElement('img'); - + this.hasLoaded = new Promise((resolve, reject) => { (this.faviconImage as HTMLImageElement).addEventListener('load', () => { this.canvas.width = (this.faviconImage as HTMLImageElement).width; @@ -100,7 +105,7 @@ export function setFavIconDot(visible: boolean) { icon = new FavIconDot(); await icon.setup(); } - + (icon as FavIconDot).setVisible(visible); }; diff --git a/packages/frontend/src/scripts/get-note-versions-menu.ts b/packages/frontend/src/scripts/get-note-versions-menu.ts index 84292f1277..9108191d73 100644 --- a/packages/frontend/src/scripts/get-note-versions-menu.ts +++ b/packages/frontend/src/scripts/get-note-versions-menu.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: marie and other Sharkey contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + import { Ref, defineAsyncComponent } from 'vue'; import * as Misskey from 'misskey-js'; import { i18n } from '@/i18n.js'; diff --git a/packages/frontend/src/scripts/search-engine-map.ts b/packages/frontend/src/scripts/search-engine-map.ts index 3fb06d135d..03e5061597 100644 --- a/packages/frontend/src/scripts/search-engine-map.ts +++ b/packages/frontend/src/scripts/search-engine-map.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: leah and other Sharkey contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + //store the URL and if its none of these its a custom one export const searchEngineMap = { //The first one is the default search engine -- cgit v1.2.3-freya