diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..fa7d19d
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,24 @@
+name: Generate static content (without deploying)
+on:
+ push:
+ pull_request:
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+jobs:
+ # Single deploy job since we're just deploying
+ generate:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ lfs: true
+
+ - uses: denoland/setup-deno@v2
+ with:
+ deno-version: v2.x.x
+
+ - run: deno run --allow-all index.ts
\ No newline at end of file
diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml
index a84439e..064ffb1 100644
--- a/.github/workflows/pages.yml
+++ b/.github/workflows/pages.yml
@@ -33,9 +33,9 @@ jobs:
with:
lfs: true
- - uses: denoland/setup-deno@v1
+ - uses: denoland/setup-deno@v2
with:
- deno-version: v1.x.x
+ deno-version: v2.x.x
- run: deno run --allow-all index.ts
diff --git a/credits.old.js b/credits.old.js
deleted file mode 100644
index 281d85d..0000000
--- a/credits.old.js
+++ /dev/null
@@ -1,160 +0,0 @@
-module.exports = [
- {
- link: 'https://pillowfort.social/posts/1632320',
- validate (filename) {
- return filename.startsWith('flag-')
- }
- },
- {
- link: 'https://rekkanogotoku.com/',
- files: ['viperbtn.gif']
- },
- {
- link: 'https://niv.gay/',
- files: ['niv-banner.gif']
- },
- {
- link: 'https://kernel.org',
- validate (filename) {
- return filename.startsWith('xenia_')
- }
- },
- {
- link: 'https://heckscaper.com',
- validate (filename) {
- return filename.startsWith('hs8831') ||
- [
- 'emma.gif',
- 'emmalink.gif'
- ].includes(filename)
- }
- },
- {
- link: `http://www.mabsland.com/Adoption.html`,
- validate (filename) {
- return filename.startsWith('Censor_')
- }
- },
- {
- link: 'https://lapfox.com',
- validate (filename) {
- return filename.startsWith('lapfox') || filename.startsWith('rotteen') || filename.startsWith('kitcaliber')
- }
- },
- {
- link: 'https://en.pronouns.page/',
- files: [
- 'pronouns.page'
- ]
- },
- {
- link: 'https://notepad.org',
- files: [
- 'button_np.gif'
- ]
- },
- {
- link: 'https://mogai-genders.fandom.com/wiki/Catgender',
- files: ['catgender.gif']
- },
- {
- link: 'https://ada.untergrund.net/',
- files: ['ada.gif']
- },
- {
- link: 'https://pouet.net',
- files: ['pouet.gif']
- },
- {
- link: 'https://otherkin.fandom.com/wiki/Therians',
- files: ['therian.png']
- },
- {
- link: 'https://code.visualstudio.com',
- files: ['vscode.gif']
- },
- {
- link: 'https://en.wikipedia.org/wiki/Source_(game_engine)',
- validate (filename) {
- return filename.startsWith('source-')
- }
- },
- {
- link: 'https://yesterweb.org/no-to-web3/',
- files: ['noweb3.gif', 'roly-saynotoweb3.gif']
- },
- {
- link: 'https://nikutrax.neocities.org/',
- files: ['niku.png']
- },
- {
- link: 'https://casey.pet/',
- files: ['casey.png']
- },
- {
- link: 'https://yesterweb.org',
- files: ['yesterweb.png']
- },
- {
- link: 'https://crushcapitalism.com/',
- files: ['crushcapitalism.png']
- },
- {
- link: 'https://sanya.gay',
- files: ['sanya.png']
- },
- {
- link: 'https://exo.pet',
- validate (filename) {
- return filename.startsWith('exopet') || filename == 'fdfdfd.gif'
- }
- },
- {
- link: 'https://web.archive.org/web/20110513011151/http://graphics.rootmode.com/',
- validate (filename) {
- return filename.includes('-gnu-')
- }
- },
- {
- link: 'https://kate.pet',
- files: ['kate.gif']
- },
- {
- link: 'http://creativecommons.org/publicdomain/zero/1.0/',
- files: ['public-domain.png']
- },
- {
- link: 'https://treblesand.dreamwidth.org/',
- files: ['plural_ALT.png', 'plural.png']
- },
- {
- link: `https://88x31.kate.pet/`,
- files: ['_88x31.kate.pet']
- },
- {
- link: 'https://hyenatown.neocities.org/',
- files: ['vscodium100.gif']
- },
- {
- link: 'https://forum.artixlinux.org/index.php/topic,3871.0.html',
- files: ['artix.png', 'artix.gif']
- },
- {
- link: 'https://wiki.ubuntu.com/WebsiteButtons',
- validate (filename) {
- return filename.match(/^(ubuntu|getubuntu|poweredby(|_)ubuntu)/gi)
- }
- },
- {
- link: 'https://transistorcafe.net/~voltbun/artwork.html',
- files: ['vbwebspace.gif', 'xenia-now.gif', 'xeniatrans_now.gif']
- },
- {
- link: 'http://transistorcafe.net/',
- files: ['TransistorCafeButton.gif']
- },
- {
- link: 'https://www.sominemo.com/',
- files: ['sominemo.gif']
- }
-]
diff --git a/deno.json b/deno.json
new file mode 100644
index 0000000..51a4fd3
--- /dev/null
+++ b/deno.json
@@ -0,0 +1,5 @@
+{
+ "imports": {
+ "@std/path": "jsr:@std/path@^1.1.6"
+ }
+}
diff --git a/deno.lock b/deno.lock
new file mode 100644
index 0000000..44e4cb5
--- /dev/null
+++ b/deno.lock
@@ -0,0 +1,23 @@
+{
+ "version": "5",
+ "specifiers": {
+ "jsr:@std/internal@^1.0.14": "1.0.14",
+ "jsr:@std/path@^1.1.6": "1.1.6"
+ },
+ "jsr": {
+ "@std/internal@1.0.14": {
+ "integrity": "291516b3d4c35024d6ffbc0a9df5bf4c64116e05b50012cf846710152d2ffdf7"
+ },
+ "@std/path@1.1.6": {
+ "integrity": "c68485c2a4dfbb5ae3cc74fae4e8c4e5d874cf8a8ed12927917235c758b46cbe",
+ "dependencies": [
+ "jsr:@std/internal"
+ ]
+ }
+ },
+ "workspace": {
+ "dependencies": [
+ "jsr:@std/path@^1.1.6"
+ ]
+ }
+}
diff --git a/footer.html b/footer.html
index cf76f35..5d8166d 100644
--- a/footer.html
+++ b/footer.html
@@ -18,20 +18,23 @@
console.log('Copied to clipboard;\n', content)
alert('Coped HTML to clipboard')
}
- catch (except){}
+ catch (except) {
+ console.error('failed to copy content to clipboard', {
+ error: except,
+ content
+ });
+ }
}
document.addEventListener('click', (e) =>
{
- if (e.target.localName == "img")
+ if (e.target.localName !== "img") return;
+ let targetContent = `
`;
+ if (e.target.attributes.targetLink != undefined)
{
- let targetContent = `
`
- if (e.target.attributes.targetLink != undefined)
- {
- targetContent = `${targetContent}`
- }
- clipboardCopy(targetContent)
- e.preventDefault()
+ targetContent = `${targetContent}`;
}
+ clipboardCopy(targetContent);
+ e.preventDefault();
})