-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding module to link to player profiles from leaderboards
- Loading branch information
Numbers
committed
Jan 21, 2023
1 parent
02a75a2
commit 1a79762
Showing
13 changed files
with
142 additions
and
86 deletions.
There are no files selected for viewing
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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,33 @@ | ||
import CoreModule from '../CoreModule' | ||
import Helpers from '../../common/Helpers' | ||
import I18n from '../../i18n' | ||
|
||
const MODULE_KEY = 'leaderboardProfilePopups' | ||
|
||
class LeaderboardProfilePopupsModule extends CoreModule { | ||
constructor () { | ||
super({ | ||
baseKey: MODULE_KEY, | ||
label: I18n.getModuleLabel('config', MODULE_KEY), | ||
default: true | ||
}) | ||
this.label = I18n.getModuleLabel.bind(this, MODULE_KEY) | ||
} | ||
|
||
shouldRun () { | ||
return ['pantheon', 'season.html', 'path-of-valor', 'path-of-glory'].some(page => Helpers.isCurrentPage(page)) | ||
} | ||
|
||
run () { | ||
if (this.hasRun || !this.shouldRun()) {return} | ||
|
||
$(document.body).on('click', '[sorting_id]', (e) => { | ||
const id = $(e.currentTarget).attr('sorting_id') | ||
window.hero_page_popup({id}) | ||
}) | ||
|
||
this.hasRun = true | ||
} | ||
} | ||
|
||
export default LeaderboardProfilePopupsModule |
This file contains 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