-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat(bartu civaş): add activity #10604
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
Open
BartuAbiHD
wants to merge
30
commits into
PreMiD:main
Choose a base branch
from
BartuAbiHD:add-bartu-civas
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
467c614
Add draw.web.tr activity
BartuAbiHD bd1bef6
Fix linting errors
BartuAbiHD 761f8b5
Fix linting errors
BartuAbiHD 84c797d
Fix linting errors
BartuAbiHD ff711e2
Fix linting errors
BartuAbiHD 8f53653
Fix linting errors
BartuAbiHD cfac29c
Fix linting errors and add trailing commas
BartuAbiHD 6707fb7
Revert accidental change in checkDns.ts
BartuAbiHD e60683f
Added 'Visit Website' button.
BartuAbiHD a3bb9b1
Added 'Visit Website' button.
BartuAbiHD 5b8a5f4
The name of the service has been changed from 'draw.web.tr' to 'DrawW…
BartuAbiHD 5e75656
The name of the service has been changed from 'draw.web.tr' to 'DrawW…
BartuAbiHD e08a068
The name of the service has been changed from 'draw.web.tr' to 'DrawW…
BartuAbiHD 077145c
Add files via upload
BartuAbiHD 58c82c1
feat(drawweb): add new activity
BartuAbiHD 0e15843
Merge branch 'add-draw-web-tr' of https://github.com/BartuAbiHD/Activ…
BartuAbiHD dfe2aff
feat(drawweb): add new activity
BartuAbiHD c1217b5
feat(drawweb): add new activity
BartuAbiHD c923f72
style(DrawWEB): fix lint errors
BartuAbiHD 9c0b221
package-lock.json file reverted
BartuAbiHD 591a467
package-lock.json file reverted
BartuAbiHD 4dd4334
feat(bartu civaş): add new activity
BartuAbiHD e827738
feat(bartu civaş): add new activity
BartuAbiHD 456cd80
Merge branch 'main' into add-bartu-civas
theusaf 0fc5a1d
chore: restore from main
theusaf bea0247
chore: revert changed files
theusaf 783e5b7
Update thumbnail URL in metadata.json
BartuAbiHD 38f20e9
Merge branch 'main' into add-bartu-civas
BartuAbiHD cbfc299
Merge branch 'main' into add-bartu-civas
BartuAbiHD b8d3536
Merge branch 'main' into add-bartu-civas
BartuAbiHD File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| { | ||
| "$schema": "https://schemas.premid.app/metadata/1.16", | ||
| "apiVersion": 1, | ||
| "author": { | ||
| "name": "bartu6578", | ||
| "id": "950104832201613412" | ||
| }, | ||
| "service": "Bartu Civaş", | ||
| "description": { | ||
| "en": "Rap artist and software developer Bartu Civas's website.", | ||
| "nl": "Website van rapartiest en softwareontwikkelaar Bartu Civas.", | ||
| "tr": "Rap sanatçısı, yazılımcı Bartu Civaş'ın websitesi." | ||
| }, | ||
| "url": [ | ||
| "www.bartucivas.com.tr", | ||
| "bartucivas.com.tr" | ||
| ], | ||
| "regExp": "^https?[:][/][/](www[.])?bartucivas[.]com[.]tr[/]", | ||
| "version": "1.0.0", | ||
| "logo": "https://bartucivas.com.tr/img/bartu-civas.png", | ||
| "thumbnail": "https://bartucivas.com.tr/img/thumbnail.png", | ||
| "color": "#f01c25", | ||
| "category": "other", | ||
| "tags": [ | ||
| "rap-artist", | ||
| "sowtware-developer", | ||
| "bartucivas" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| const presence = new Presence({ clientId: '1486635213684736061' }) | ||
|
|
||
| presence.on('UpdateData', async () => { | ||
| const path: string = document.location.pathname | ||
| // Sayfanın dilini veya URL'yi kontrol ederek Türkçe olup olmadığını anlıyoruz | ||
| const isTurkish = document.documentElement.lang.toLowerCase().includes('tr') || path.includes('/anasayfa') || path.includes('/tr') | ||
|
|
||
| const presenceData: PresenceData = { | ||
| largeImageKey: 'https://bartucivas.com.tr/img/bartu-civas.png', | ||
| startTimestamp: Date.now(), | ||
| buttons: [ | ||
| { | ||
| label: isTurkish ? 'Websiteyi Ziyaret Et' : 'Visit Website', | ||
| url: document.location.href, | ||
| }, | ||
| ], | ||
| } | ||
| const baslik = document.querySelector('.info h4 a') | ||
| const sayfaBasligi = document.title || 'Ana Sayfa' | ||
|
|
||
| if (path === '/') { | ||
| presenceData.details = isTurkish ? 'Ana Sayfa' : 'Home Page' | ||
| } | ||
| else if (path.startsWith('/anasayfa')) { | ||
| presenceData.details = isTurkish ? 'Ana Sayfa' : 'Home Page' | ||
| } | ||
| else if (path.startsWith('/homepage')) { | ||
| presenceData.details = isTurkish ? 'Ana Sayfa' : 'Home Page' | ||
| } | ||
| else if (path.startsWith('/home')) { | ||
| presenceData.details = isTurkish ? 'Ana Sayfa' : 'Home Page' | ||
| } | ||
| else if (path.startsWith('/konu')) { | ||
| presenceData.details = isTurkish ? 'Bir yazı okuyor:' : 'He/She is reading an article:' | ||
| presenceData.state = baslik?.textContent | ||
| } | ||
| else if ( | ||
| document.location.pathname.split('/')[1] !== '' | ||
| && baslik | ||
| && !path.startsWith('/anasayfa') | ||
| && !path.startsWith('/homepage') | ||
| && !path.startsWith('/home') | ||
| ) { | ||
| presenceData.details = isTurkish ? 'Sitede geziniyor:' : 'Browsing the site:' | ||
| presenceData.state = sayfaBasligi | ||
| } | ||
|
|
||
| presence.setActivity(presenceData) | ||
| }) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This button is too generic. Buttons should be used for specific actions
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.
I don’t think there’s a problem there. When you’re reading a blog or something on the site, it shows up there too, and users can access the blog’s URL using that button.