Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
23 changes: 23 additions & 0 deletions websites/F/Feeder Series/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "https://schemas.premid.app/metadata/1.16",
"apiVersion": 1,
"author": {
"id": "680080827450785798",
"name": "macekimek1"
},
"service": "Feeder Series",
"description": {
"en": "Feeder Series started in 2019 with one simple mission: to bring you the best possible coverage of feeder series in Europe, the United States and Asia."
},
"url": "feederseries.net",
"regExp": "^https?[:][/][/]([a-z0-9-]+[.])*feederseries[.]net[/]",
"version": "1.0.0",
"logo": "https://i.imgur.com/4dATceI.jpeg",
"thumbnail": "https://i.imgur.com/RyRzzyf.png",
"color": "#FEDC09",
"category": "other",
"tags": [
"racing",
"formulaone"
]
}
86 changes: 86 additions & 0 deletions websites/F/Feeder Series/presence.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
const presence = new Presence({
clientId: '1452251315399819274'
})
Comment on lines +2 to +3

Check failure

Code scanning / ESLint

Require or disallow trailing commas Error

Missing trailing comma.

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

enum ActivityAssets {
Logo = 'https://i.imgur.com/4dATceI.jpeg',
}

presence.on('UpdateData', () => {
const { pathname } = document.location

const presenceData: PresenceData = {
largeImageKey: ActivityAssets.Logo,
details: 'Browsing homepage',
startTimestamp: browsingTimestamp
}
Comment on lines +17 to +18

Check failure

Code scanning / ESLint

Require or disallow trailing commas Error

Missing trailing comma.

// Homepage
if (pathname === '/') {
presenceData.details = 'Browsing homepage'
}
// About page
else if (pathname.includes('/our-team')) {
presenceData.details = 'Reading about the team'
}
// How we work page
else if (pathname.includes('/how-we-work')) {
presenceData.details = 'Reading how the team works'
}
// Join us page
else if (pathname.includes('/join-us')) {
presenceData.details = 'Wanting to join the team'
}
// Support us page
else if (pathname.includes('/support-us')) {
presenceData.details = 'Wanting to support the team'
}
// Contact us page
else if (pathname.includes('/contact')) {
presenceData.details = 'Wanting to contact the team'
}
// Calendar page
else if (pathname.includes('/feeder-series-calendar')) {
presenceData.details = 'Looking at the feeder series calendar'
}
// Article pages
else if (pathname.includes('/2')) {
const articleTitle

Check failure

Code scanning / ESLint

Disallow trailing whitespace at the end of lines Error

Trailing spaces not allowed.
=

Check failure

Code scanning / ESLint

Enforce consistent indentation Error

Expected indentation of 6 spaces but found 4.

Check failure

Code scanning / ESLint

Enforce consistent linebreak style for operators Error

Bad line breaking before and after '='.
document

Check failure

Code scanning / ESLint

Enforce consistent indentation Error

Expected indentation of 8 spaces but found 6.
.querySelector<HTMLHeadingElement>('h1.entry-title')

Check failure

Code scanning / ESLint

Enforce consistent indentation Error

Expected indentation of 10 spaces but found 8.
?.textContent

Check failure

Code scanning / ESLint

Enforce consistent indentation Error

Expected indentation of 10 spaces but found 8.
?.trim()

Check failure

Code scanning / ESLint

Enforce consistent indentation Error

Expected indentation of 10 spaces but found 8.

presenceData.details = 'Reading an article'
presenceData.state = articleTitle ?? 'Article'
}
// Category pages
else if (pathname.includes('/category/')) {
const categoryName

Check failure

Code scanning / ESLint

Disallow trailing whitespace at the end of lines Error

Trailing spaces not allowed.
=

Check failure

Code scanning / ESLint

Enforce consistent indentation Error

Expected indentation of 6 spaces but found 4.

Check failure

Code scanning / ESLint

Enforce consistent linebreak style for operators Error

Bad line breaking before and after '='.
document

Check failure

Code scanning / ESLint

Enforce consistent indentation Error

Expected indentation of 8 spaces but found 6.
.querySelector<HTMLSpanElement>('h1.page-title span')

Check failure

Code scanning / ESLint

Enforce consistent indentation Error

Expected indentation of 10 spaces but found 8.
?.textContent

Check failure

Code scanning / ESLint

Enforce consistent indentation Error

Expected indentation of 10 spaces but found 8.
?.trim()

Check failure

Code scanning / ESLint

Enforce consistent indentation Error

Expected indentation of 10 spaces but found 8.

presenceData.details = 'Browsing a category'
presenceData.state = categoryName ?? 'Category'
}
// Tags pages
else if (pathname.includes('/tag/')) {
const tagName

Check failure

Code scanning / ESLint

Disallow trailing whitespace at the end of lines Error

Trailing spaces not allowed.
=

Check failure

Code scanning / ESLint

Enforce consistent indentation Error

Expected indentation of 6 spaces but found 4.

Check failure

Code scanning / ESLint

Enforce consistent linebreak style for operators Error

Bad line breaking before and after '='.
document

Check failure

Code scanning / ESLint

Enforce consistent indentation Error

Expected indentation of 8 spaces but found 6.
.querySelector<HTMLSpanElement>('h1.page-title span')

Check failure

Code scanning / ESLint

Enforce consistent indentation Error

Expected indentation of 10 spaces but found 8.
?.textContent

Check failure

Code scanning / ESLint

Enforce consistent indentation Error

Expected indentation of 10 spaces but found 8.
?.trim()

Check failure

Code scanning / ESLint

Enforce consistent indentation Error

Expected indentation of 10 spaces but found 8.

presenceData.details = 'Browsing a tag'
presenceData.state = tagName ?? 'Tag'
}

presence.setActivity(presenceData)
})
6 changes: 6 additions & 0 deletions websites/F/Feeder Series/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./dist/"
}
}
Loading