Skip to content

Commit

Permalink
chore: lint T folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Bas950 committed Jan 23, 2025
1 parent a5871bc commit e51812d
Show file tree
Hide file tree
Showing 190 changed files with 16,946 additions and 16,010 deletions.
50 changes: 25 additions & 25 deletions websites/T/TCRF/metadata.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"$schema": "https://schemas.premid.app/metadata/1.12",
"apiVersion": 1,
"author": {
"name": "Nekolen",
"id": "270125856679002113"
},
"service": "TCRF",
"description": {
"en": "The Cutting Room Floor is a site dedicated to unearthing and researching unused and cut content from video games.",
"nl": "The Cutting Room Floor is een site gewijd aan het opgraven en onderzoeken van ongebruikte en geknipte inhoud uit videogames."
},
"url": "tcrf.net",
"version": "1.4.25",
"logo": "https://cdn.rcd.gg/PreMiD/websites/T/TCRF/assets/logo.png",
"thumbnail": "https://cdn.rcd.gg/PreMiD/websites/T/TCRF/assets/thumbnail.png",
"color": "#D3D3D3",
"category": "games",
"tags": [
"games",
"retro",
"wiki",
"research",
"cut-contents"
]
}
"$schema": "https://schemas.premid.app/metadata/1.12",
"apiVersion": 1,
"author": {
"name": "Nekolen",
"id": "270125856679002113"
},
"service": "TCRF",
"description": {
"en": "The Cutting Room Floor is a site dedicated to unearthing and researching unused and cut content from video games.",
"nl": "The Cutting Room Floor is een site gewijd aan het opgraven en onderzoeken van ongebruikte en geknipte inhoud uit videogames."
},
"url": "tcrf.net",
"version": "1.4.25",
"logo": "https://cdn.rcd.gg/PreMiD/websites/T/TCRF/assets/logo.png",
"thumbnail": "https://cdn.rcd.gg/PreMiD/websites/T/TCRF/assets/thumbnail.png",
"color": "#D3D3D3",
"category": "games",
"tags": [
"games",
"retro",
"wiki",
"research",
"cut-contents"
]
}
99 changes: 53 additions & 46 deletions websites/T/TCRF/presence.ts
Original file line number Diff line number Diff line change
@@ -1,51 +1,58 @@
// eslint-disable-next-line no-one-time-vars/no-one-time-vars
const presence = new Presence({
clientId: "631259475038175232",
}),
browsingTimestamp = Math.floor(Date.now() / 1000);
clientId: '631259475038175232',
})
const browsingTimestamp = Math.floor(Date.now() / 1000)

let x: string;
let x: string

presence.on("UpdateData", async () => {
const presenceData: PresenceData = {
largeImageKey: "https://cdn.rcd.gg/PreMiD/websites/T/TCRF/assets/logo.png",
startTimestamp: browsingTimestamp,
};
if (document.location.pathname === "/The_Cutting_Room_Floor") {
presenceData.details = "browsing TCRF";
presenceData.state = "at Homepage";
} else if (
["/Help:Contents", "/Category:To_do", "/Special:RecentChanges"].includes(
document.location.pathname
)
) {
const [d, d1] = document.location.pathname.replace("/", "").split(":");
presenceData.details = `browsing ${d}`;
presenceData.state = `at ${d1}`;
} else if (document.location.pathname.startsWith("/Help:Contents/")) {
const help = document.location.pathname.split("/"),
d = help[1].split(":");
presenceData.details = `getting ${d[0]}`;
presenceData.state = `${d[1]}: ${help[2]
.replace("%26", "&")
.split("_")
.join(" ")}`;
} else {
const name = document
.querySelector("#firstHeading")
.textContent.replace(")", "")
.split("(");
if (name[0].startsWith("Prerelease:")) {
const d = name[0].split(":");
x = `Game: ${d[1]}(${d[0]})`;
} else x = `Game: ${name[0]}`;
presence.on('UpdateData', async () => {
const presenceData: PresenceData = {
largeImageKey: 'https://cdn.rcd.gg/PreMiD/websites/T/TCRF/assets/logo.png',
startTimestamp: browsingTimestamp,
}
if (document.location.pathname === '/The_Cutting_Room_Floor') {
presenceData.details = 'browsing TCRF'
presenceData.state = 'at Homepage'
}
else if (
['/Help:Contents', '/Category:To_do', '/Special:RecentChanges'].includes(
document.location.pathname,
)
) {
const [d, d1] = document.location.pathname.replace('/', '').split(':')
presenceData.details = `browsing ${d}`
presenceData.state = `at ${d1}`
}
else if (document.location.pathname.startsWith('/Help:Contents/')) {
const help = document.location.pathname.split('/')
const d = help[1].split(':')
presenceData.details = `getting ${d[0]}`
presenceData.state = `${d[1]}: ${help[2]
.replace('%26', '&')

Check failure

Code scanning / CodeQL

Incomplete string escaping or encoding High

This replaces only the first occurrence of '%26'.
.split('_')
.join(' ')}`
}
else {
const name = document
.querySelector('#firstHeading')
?.textContent
?.replace(')', '')
.split('(')
if (name?.[0].startsWith('Prerelease:')) {
const d = name[0].split(':')
x = `Game: ${d[1]}(${d[0]})`
}
else {
x = `Game: ${name?.[0]}`
}

let stated;
if (!name[1]) stated = "Platform: Multiple";
else stated = `Platform: ${name[1]} `;
let stated
if (!name?.[1])
stated = 'Platform: Multiple'
else stated = `Platform: ${name[1]} `

//var year = document.getElementsByClassName("mw-headline")[1].textContent
presenceData.details = x;
presenceData.state = stated;
}
});
// var year = document.getElementsByClassName("mw-headline")[1].textContent
presenceData.details = x
presenceData.state = stated
}
})
76 changes: 38 additions & 38 deletions websites/T/TETR.IO/metadata.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
{
"$schema": "https://schemas.premid.app/metadata/1.12",
"apiVersion": 1,
"author": {
"name": "Rare Akuma ☆",
"id": "250044591686811669"
},
"service": "TETR.IO",
"description": {
"en": "TETR.IO is a free-to-play online multiplayer and single player fan game",
"nl": "TETR.IO is een gratis te spelen online multiplayer- en singleplayer-fanspel",
"vi_VN": "TETR.IO là trò chơi nhiều người chơi/một người chơi miễn phí trực tuyến"
},
"url": "tetr.io",
"version": "1.1.23",
"logo": "https://cdn.rcd.gg/PreMiD/websites/T/TETR.IO/assets/logo.jpg",
"thumbnail": "https://cdn.rcd.gg/PreMiD/websites/T/TETR.IO/assets/thumbnail.jpg",
"color": "#142472",
"category": "games",
"tags": [
"puzzle",
"multiplayer",
"online"
],
"settings": [
{
"id": "privateRoom",
"title": "Show Private Room button",
"icon": "fas fa-user-secret",
"value": true
},
{
"id": "showButtons",
"title": "Show Buttons",
"icon": "fas fa-compress-arrows-alt",
"value": true
}
]
}
"$schema": "https://schemas.premid.app/metadata/1.12",
"apiVersion": 1,
"author": {
"name": "Rare Akuma ☆",
"id": "250044591686811669"
},
"service": "TETR.IO",
"description": {
"en": "TETR.IO is a free-to-play online multiplayer and single player fan game",
"nl": "TETR.IO is een gratis te spelen online multiplayer- en singleplayer-fanspel",
"vi_VN": "TETR.IO là trò chơi nhiều người chơi/một người chơi miễn phí trực tuyến"
},
"url": "tetr.io",
"version": "1.1.23",
"logo": "https://cdn.rcd.gg/PreMiD/websites/T/TETR.IO/assets/logo.jpg",
"thumbnail": "https://cdn.rcd.gg/PreMiD/websites/T/TETR.IO/assets/thumbnail.jpg",
"color": "#142472",
"category": "games",
"tags": [
"puzzle",
"multiplayer",
"online"
],
"settings": [
{
"id": "privateRoom",
"title": "Show Private Room button",
"icon": "fas fa-user-secret",
"value": true
},
{
"id": "showButtons",
"title": "Show Buttons",
"icon": "fas fa-compress-arrows-alt",
"value": true
}
]
}
Loading

0 comments on commit e51812d

Please sign in to comment.