-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(81Dojo): add activity #9277
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Higitsune Fujiharu <[email protected]>
Signed-off-by: Higitsune Fujiharu <[email protected]>
Signed-off-by: Higitsune Fujiharu <[email protected]>
Signed-off-by: Higitsune Fujiharu <[email protected]>
Signed-off-by: Higitsune Fujiharu <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ESLint found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
Use |
websites/0-9/81Dojo/presence.ts
Outdated
const presence = new Presence({ | ||
clientId: "1338891034310213683" | ||
}) | ||
const enum Assets { // Other default assets can be found at index.d.ts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const enum Assets { // Other default assets can be found at index.d.ts | |
enum Assets { |
Signed-off-by: Higitsune Fujiharu <[email protected]>
Signed-off-by: Higitsune Fujiharu <[email protected]>
Signed-off-by: Higitsune Fujiharu <[email protected]>
Signed-off-by: Higitsune Fujiharu <[email protected]>
Signed-off-by: Higitsune Fujiharu <[email protected]>
Signed-off-by: Higitsune Fujiharu <[email protected]>
Signed-off-by: Higitsune Fujiharu <[email protected]>
Signed-off-by: Higitsune Fujiharu <[email protected]>
Signed-off-by: Higitsune Fujiharu <[email protected]>
Anyone mind telling me what Anthony's curly bracket conventions are (and what's up with the trailing comma requirements)? I've fixed up what I can understand. |
Signed-off-by: Higitsune Fujiharu <[email protected]>
const enum Assets { | ||
Logo = 'https://81dojo.com/images/81DojoLogo_Big.png', | ||
} |
Check failure
Code scanning / ESLint
Disallow specified syntax Error
switch (document.location.hostname) { | ||
case '81dojo.com': | ||
if (document.location.pathname === '/') | ||
presenceData.details = 'Viewing home page' |
Check failure
Code scanning / ESLint
Enforce Anthony's style of curly bracket Error
// todo: statuses for more pages | ||
else if (document.location.pathname.includes('/client/')) { | ||
if (Number.parseFloat(document.getElementById('layerLogin').style.zIndex) === 2) | ||
presenceData.details = 'Logging in to client' |
Check failure
Code scanning / ESLint
Enforce Anthony's style of curly bracket Error
presenceData.details = `In ${server} lobby` | ||
} | ||
else { | ||
const playerElements = document.querySelectorAll( |
Check failure
Code scanning / ESLint
Enforce the consistent use of either backticks, double, or single quotes Error
const playerElements = document.querySelectorAll( | ||
"[id='player-info-name']" |
Check failure
Code scanning / ESLint
Require or disallow trailing commas Error
} | ||
} | ||
else if (document.location.pathname.includes('/documents')) | ||
presenceData.details = `Reading the docs: ${document.getElementById('firstHeading').textContent}` |
Check failure
Code scanning / ESLint
Enforce Anthony's style of curly bracket Error
if (document.location.pathname === '/'){ | ||
presenceData.details = 'Viewing WebSystem' | ||
} |
Check failure
Code scanning / ESLint
Enforce consistent spacing before blocks Error
} | ||
else { | ||
presenceData.details = 'WebSystem: Browsing clubs' | ||
} |
Check failure
Code scanning / ESLint
Enforce Anthony's style of curly bracket Error
else if (document.location.pathname.includes('/players/upload_avatar')){ | ||
presenceData.details = 'WebSystem: Choosing avatar' | ||
} |
Check failure
Code scanning / ESLint
Enforce consistent spacing before blocks Error
else if (document.location.pathname.includes('/players/favorites')){ | ||
presenceData.details = 'WebSystem: Viewing favorited players' | ||
} |
Check failure
Code scanning / ESLint
Enforce consistent spacing before blocks Error
Signed-off-by: Higitsune Fujiharu <[email protected]>
Signed-off-by: Higitsune Fujiharu <[email protected]>
presenceData.details = 'WebSystem: Viewing rankings' | ||
} | ||
else if (document.location.pathname.includes('/tournaments')) { | ||
if (Number.isInteger(Number.parseInt(document.location.pathname.substr(-1)))) { |
Check failure
Code scanning / ESLint
Disallow using code marked as `@deprecated` Error
} | ||
} | ||
else if (document.location.pathname.includes('/titles')) { | ||
if (Number.isInteger(Number.parseInt(document.location.pathname.substr(-1)))) { |
Check failure
Code scanning / ESLint
Disallow using code marked as `@deprecated` Error
} | ||
} | ||
else if (document.location.pathname.includes('/circles')) { | ||
if (Number.isInteger(Number.parseInt(document.location.pathname.substr(-1)))) { |
Check failure
Code scanning / ESLint
Disallow using code marked as `@deprecated` Error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pmd found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
Signed-off-by: Higitsune Fujiharu <[email protected]>
.textContent.slice(3, 7) | ||
) |
Check failure
Code scanning / ESLint
Require or disallow trailing commas Error
presenceData.details = 'WebSystem: Applying for certificate' | ||
} | ||
else if (document.location.pathname.includes('/kifu')) { | ||
presenceData.details = `WebSystem: Viewing kifu: ${document.getElementById("kifu_viewer").children.item(1).getElementsByTagName("b")[0]} vs. ${document.getElementById("kifu_viewer").children.item(1).getElementsByTagName("b")[1]}` |
Check failure
Code scanning / ESLint
Enforce the consistent use of either backticks, double, or single quotes Error
presenceData.details = 'WebSystem: Applying for certificate' | ||
} | ||
else if (document.location.pathname.includes('/kifu')) { | ||
presenceData.details = `WebSystem: Viewing kifu: ${document.getElementById("kifu_viewer").children.item(1).getElementsByTagName("b")[0]} vs. ${document.getElementById("kifu_viewer").children.item(1).getElementsByTagName("b")[1]}` |
Check failure
Code scanning / ESLint
Enforce the consistent use of either backticks, double, or single quotes Error
presenceData.details = 'WebSystem: Applying for certificate' | ||
} | ||
else if (document.location.pathname.includes('/kifu')) { | ||
presenceData.details = `WebSystem: Viewing kifu: ${document.getElementById("kifu_viewer").children.item(1).getElementsByTagName("b")[0]} vs. ${document.getElementById("kifu_viewer").children.item(1).getElementsByTagName("b")[1]}` |
Check failure
Code scanning / ESLint
Enforce the consistent use of either backticks, double, or single quotes Error
presenceData.details = 'WebSystem: Applying for certificate' | ||
} | ||
else if (document.location.pathname.includes('/kifu')) { | ||
presenceData.details = `WebSystem: Viewing kifu: ${document.getElementById("kifu_viewer").children.item(1).getElementsByTagName("b")[0]} vs. ${document.getElementById("kifu_viewer").children.item(1).getElementsByTagName("b")[1]}` |
Check failure
Code scanning / ESLint
Enforce the consistent use of either backticks, double, or single quotes Error
presenceData.details = `WebSystem: Viewing kifu: ${document.getElementById("kifu_viewer").children.item(1).getElementsByTagName("b")[0]} vs. ${document.getElementById("kifu_viewer").children.item(1).getElementsByTagName("b")[1]}` | ||
} | ||
else if (document.location.pathname.includes('/forums')) { | ||
if (document.getElementsByClassName("title") == null) { |
Check failure
Code scanning / ESLint
Enforce the consistent use of either backticks, double, or single quotes Error
presenceData.details = 'WebSystem: Viewing World Shogi Forum' | ||
} | ||
else { | ||
presenceData.details = `WebSystem: Viewing forum topic: ${document.getElementsByClassName("title")[0].textContent}` |
Check failure
Code scanning / ESLint
Enforce the consistent use of either backticks, double, or single quotes Error
Signed-off-by: Higitsune Fujiharu <[email protected]>
Description
Acknowledgements
yarn format
Screenshots
Proof showing the creation/modification is working as expected
  