Skip to content
Open
Show file tree
Hide file tree
Changes from 64 commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
a814446
feat: add Hangar activity
n4kushi Jun 14, 2026
79ebda5
Delete websites/H/Hangar directory
n4kushi Jun 14, 2026
ca4f99b
Add files via upload
n4kushi Jun 14, 2026
12b42ef
Delete websites/H/hangar directory
n4kushi Jun 14, 2026
3f286a8
Add files via upload
n4kushi Jun 14, 2026
6322f39
Merge branch 'main' into main
n4kushi Jun 14, 2026
eb6aa7f
Update presence.ts
n4kushi Jun 14, 2026
bcd8090
Update presence.ts
n4kushi Jun 14, 2026
bd20caa
Refactor presence setup and data handling
n4kushi Jun 14, 2026
9cfea9b
Refactor presence data handling in presence.ts
n4kushi Jun 14, 2026
34a9709
Delete websites/H/Hangar directory
n4kushi Jun 14, 2026
e93f5cc
Add files via upload
n4kushi Jun 14, 2026
2c9c1b4
Add files via upload
n4kushi Jun 14, 2026
b0602a4
Update presence.ts
n4kushi Jun 14, 2026
2774cd1
Update metadata.json
n4kushi Jun 14, 2026
3c55c35
Refactor presence data handling for improved clarity
n4kushi Jun 14, 2026
9d922c4
Update metadata.json
n4kushi Jun 14, 2026
4a4a125
Update presence.ts
n4kushi Jun 14, 2026
277b5be
Update metadata.json
n4kushi Jun 14, 2026
190501b
Update presence.ts
n4kushi Jun 14, 2026
2ef9335
Update metadata.json
n4kushi Jun 14, 2026
cd069f1
Update metadata.json
n4kushi Jun 14, 2026
3bed5aa
Update presence.ts
n4kushi Jun 14, 2026
cb26c12
Update metadata.json
n4kushi Jun 14, 2026
9322980
Update metadata.json
n4kushi Jun 14, 2026
ee47959
Update metadata.json
n4kushi Jun 14, 2026
480aad6
Update presence.ts
n4kushi Jun 14, 2026
901b31d
Update metadata.json
n4kushi Jun 14, 2026
f70dc1e
Update metadata.json
n4kushi Jun 14, 2026
de54b80
Update presence.ts
n4kushi Jun 14, 2026
5a8abbb
Update metadata.json
n4kushi Jun 14, 2026
2d11fba
Update presence.ts
n4kushi Jun 14, 2026
27cb815
Update presence.ts
n4kushi Jun 14, 2026
e883f2d
Update metadata.json
n4kushi Jun 14, 2026
801ffa9
Update metadata.json
n4kushi Jun 14, 2026
56e4b14
Update presence.ts
n4kushi Jun 14, 2026
c574861
Update presence.ts
n4kushi Jun 14, 2026
16e471f
Update presence.ts
n4kushi Jun 14, 2026
b94cf71
Update presence.ts
n4kushi Jun 14, 2026
3c7da61
Update metadata.json
n4kushi Jun 14, 2026
60e90f6
Update metadata.json
n4kushi Jun 14, 2026
8ab65fe
Update presence.ts
n4kushi Jun 14, 2026
be9e570
Update metadata.json
n4kushi Jun 14, 2026
3964dfe
Update metadata.json
n4kushi Jun 14, 2026
77bd561
Create test.yml
n4kushi Jun 14, 2026
6d2a1b9
Update pmd.yml
n4kushi Jun 14, 2026
b7b6bcf
Delete .github/workflows/test.yml
n4kushi Jun 14, 2026
ad2f8e3
Update metadata.json
n4kushi Jun 14, 2026
850c6f9
Update websites/H/hangar/metadata.json
n4kushi Jun 16, 2026
62181a6
Update pmd.yml
n4kushi Jun 16, 2026
8833a93
Merge branch 'main' into main
n4kushi Jun 16, 2026
b0f9fab
Delete websites/H/hangar/logo.png
n4kushi Jun 16, 2026
b250105
Update metadata.json
n4kushi Jun 16, 2026
d3b883c
Update metadata.json
n4kushi Jun 16, 2026
f613f2e
Update metadata.json
n4kushi Jun 16, 2026
8bae70e
Merge branch 'main' into main
n4kushi Jun 17, 2026
51f6b78
Update presence.ts
n4kushi Jun 17, 2026
c15bb53
Update presence.ts
n4kushi Jun 17, 2026
ef56e55
Change import source for ActivityType in presence.ts
n4kushi Jun 17, 2026
8cf4ac8
Update presence.ts
n4kushi Jun 17, 2026
15092e2
Update presence.ts
n4kushi Jun 17, 2026
f53630d
Update presence.ts
n4kushi Jun 17, 2026
f3ced89
Update presence.ts
n4kushi Jun 17, 2026
1033fd4
Update presence.ts
n4kushi Jun 17, 2026
fccc864
Update presence.ts
n4kushi Jun 17, 2026
28f2719
Update presence.ts
n4kushi Jun 17, 2026
727eef1
Merge branch 'main' into main
n4kushi Jun 19, 2026
2ff2a6b
Update metadata.json
n4kushi Jun 19, 2026
49138a5
Merge branch 'main' into main
n4kushi Jun 24, 2026
874ff61
Apply suggestion from @skullysmods
n4kushi Jun 26, 2026
5f6e309
Update presence.ts
n4kushi Jun 26, 2026
f3ff3fc
Merge branch 'main' into main
n4kushi Jun 26, 2026
f5ee898
Update metadata.json
n4kushi Jun 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions websites/H/hangar/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
"$schema": "https://schemas.premid.app/metadata/1.8",
Comment thread
n4kushi marked this conversation as resolved.
"author": {
"id": "1004301145348526090",
"name": "RuaLia"
},
"service": "hangar",
"description": {
"en": "Shows your current activity on the Hangar platform.",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be the description of the website, not the activity.

"tr": "Hangar platformundaki güncel aktivitenizi Discord'da gösterir."
Comment on lines +9 to +10

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be the description of the website, not the activity.

Comment on lines +9 to +10

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be the description of the website, not the activity.

},
"url": "usehangar.gg",
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
"regExp": "^https?[:][/][/](www[.])?usehangar[.]gg[/]",
"version": "1.0.0",
"logo": "https://i.imgur.com/w5FbdFC.png",
"thumbnail": "https://i.imgur.com/w5FbdFC.png",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thumbnail should be a landscape promotional image or screenshot not the logo

"color": "#111111",
"category": "socials",
"tags": [
"community",
"forum",
"socials"
]
}
47 changes: 47 additions & 0 deletions websites/H/hangar/presence.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import { ActivityType } from 'premid'
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed

const presence = new Presence({
clientId: '1004301145348526090',
})

const startTimestamp = Math.floor(Date.now() / 1000)

presence.on('UpdateData', async () => {
const title = document.title || 'Hangar'
const path = window.location.pathname

const data: PresenceData = {
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
type: ActivityType.Playing,

Check failure

Code scanning / ESLint

Disallow trailing whitespace at the end of lines Error

Trailing spaces not allowed.
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
largeImageKey: 'logo',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use image URL instead of asset name

startTimestamp,
details: 'Browsing Hangar',
state: 'Viewing pages',
}

if (path === '/' || path === '/feed') {
data.details = 'Browsing the homepage'
data.state = 'Viewing the feed'
}
else if (path.startsWith('/hub/')) {
const hubName = title.split(' | ')[0] || 'A Hub'

data.details = 'Viewing a Hub'
data.state = hubName
data.smallImageKey = 'logo'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use image URL instead of asset name

data.smallImageText = 'Hangar'
}
else if (path.startsWith('/profile/')) {
const user = title.split(' | ')[0] || 'A profile'

data.details = 'Viewing a profile'
data.state = user
}
else if (path.startsWith('/post/')) {
const postTitle = title.split(' | ')[0] || 'A post'

data.details = 'Reading a post'
data.state = postTitle
}

presence.setActivity(data)
})
Loading