-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat(PsychonautWiki): add activity #10349
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
Changes from 9 commits
da0d372
5c775e8
7ac34b8
420cfc6
3dab617
c4071aa
cb8fa1a
2e276cf
18d41e5
3ae0964
f708327
51c7ec1
b9547e3
cdc9ec9
8f48264
879003f
dcf3a43
f540062
ad4c52a
7c3088a
f12dce8
a35775e
a5209fb
7a2ff25
286a04d
0186397
56569cc
e53cd2b
d175b45
6cfa92e
0d994f7
06bc1ca
8a5016b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| { | ||
| "$schema": "https://schemas.premid.app/metadata/1.9", | ||
Zinibow marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "author": { | ||
| "id": "538604507064696832", | ||
| "name": "talon2" | ||
| }, | ||
| "service": "PsychonautWiki", | ||
| "altnames": [ | ||
| "Psychonaut Wiki" | ||
| ], | ||
| "description": { | ||
| "en": "PsychonautWiki is an encyclopedia that documents all aspects of psychonautic theory from an evidence-based perspective. It provides education, encourages safe practices, and emphasizes that substances should not be abused. Do not do drugs." | ||
| }, | ||
| "url": "psychonautwiki.org", | ||
| "regExp": "https?://(www\\.)?psychonautwiki\\.org/.*", | ||
| "version": "1.0.0", | ||
| "logo": "https://i.imgur.com/GPxHYOV.png", | ||
| "thumbnail": "https://i.imgur.com/GPxHYOV.png", | ||
Zinibow marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "color": "#808080", | ||
| "category": "other", | ||
| "tags": [ | ||
| "drugs", | ||
| "harm-reduction", | ||
| "psychonaut" | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| const browsingTimestamp = Math.floor(Date.now() / 1000); | ||
Check failureCode scanning / ESLint Require or disallow semicolons instead of ASI Error
Extra semicolon.
|
||
|
|
||
| const presence = new Presence({ | ||
| clientId: "1432152324163502130", | ||
Check failureCode scanning / ESLint Enforce the consistent use of either backticks, double, or single quotes Error
Strings must use singlequote.
|
||
| }); | ||
Check failureCode scanning / ESLint Require or disallow semicolons instead of ASI Error
Extra semicolon.
|
||
|
|
||
| presence.on("UpdateData", async () => { | ||
Check failureCode scanning / ESLint Enforce the consistent use of either backticks, double, or single quotes Error
Strings must use singlequote.
|
||
| if (document.location.hostname !== "psychonautwiki.org") return; | ||
Check failureCode scanning / ESLint Enforce the consistent use of either backticks, double, or single quotes Error
Strings must use singlequote.
Check failureCode scanning / ESLint Newline after if Error
Expect newline after if
Check failureCode scanning / ESLint Require or disallow semicolons instead of ASI Error
Extra semicolon.
|
||
|
|
||
| const pathname = document.location.pathname; | ||
Check failureCode scanning / ESLint Require or disallow semicolons instead of ASI Error
Extra semicolon.
|
||
|
|
||
| const presenceData: PresenceData = { | ||
| largeImageKey: "https://i.imgur.com/GPxHYOV.png", | ||
Check failureCode scanning / ESLint Enforce the consistent use of either backticks, double, or single quotes Error
Strings must use singlequote.
|
||
| startTimestamp: browsingTimestamp, | ||
| details: | ||
| pathname === "/wiki/Main_Page" | ||
Check failureCode scanning / ESLint Enforce the consistent use of either backticks, double, or single quotes Error
Strings must use singlequote.
|
||
| ? "Browsing the Main Page" | ||
Check failureCode scanning / ESLint Enforce the consistent use of either backticks, double, or single quotes Error
Strings must use singlequote.
|
||
| : pathname.startsWith("/wiki/") | ||
Check failureCode scanning / ESLint Enforce the consistent use of either backticks, double, or single quotes Error
Strings must use singlequote.
|
||
| ? `Browsing the article "${decodeURIComponent( | ||
| pathname.replace("/wiki/", "").replace(/_/g, " "), | ||
Check failureCode scanning / ESLint Enforce consistent indentation Error
Expected indentation of 12 spaces but found 14.
Check failureCode scanning / ESLint Enforce the consistent use of either backticks, double, or single quotes Error
Strings must use singlequote.
Check failureCode scanning / ESLint Enforce the consistent use of either backticks, double, or single quotes Error
Strings must use singlequote.
Check failureCode scanning / ESLint Enforce the consistent use of either backticks, double, or single quotes Error
Strings must use singlequote.
|
||
| )}"` | ||
Check failureCode scanning / ESLint Enforce consistent indentation Error
Expected indentation of 10 spaces but found 12.
|
||
| : "Browsing the Wiki", | ||
Check failureCode scanning / ESLint Enforce the consistent use of either backticks, double, or single quotes Error
Strings must use singlequote.
|
||
| }; | ||
Check failureCode scanning / ESLint Require or disallow semicolons instead of ASI Error
Extra semicolon.
|
||
|
|
||
| presence.setActivity(presenceData); | ||
Check failureCode scanning / ESLint Require or disallow semicolons instead of ASI Error
Extra semicolon.
|
||
| }); | ||
Check failureCode scanning / ESLint Require or disallow semicolons instead of ASI Error
Extra semicolon.
|
||
Uh oh!
There was an error while loading. Please reload this page.