Skip to content

Commit

Permalink
Adding module to link to player profiles from leaderboards
Browse files Browse the repository at this point in the history
  • Loading branch information
Numbers committed Jan 21, 2023
1 parent 02a75a2 commit 1a79762
Show file tree
Hide file tree
Showing 13 changed files with 142 additions and 86 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
1.30.0: Adding module to link to player profiles from leaderboards
1.29.0: Adding modules to show clubmates and script Patreon supporters on leaderboards (league, contests, season, pantheon, pov, pog)
1.28.24: Annotating Season, Pantheon and Po* leaderboards with player IDs (enabler for future modules)
1.28.23: Enabling pantheon script features on CxH
Expand Down
25 changes: 18 additions & 7 deletions dist/hh-plus-plus.dev.user.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/hh-plus-plus.meta.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name Hentai Heroes++ BDSM version
// @description Adding things here and there in the Hentai Heroes game. Also supports HHCore-based games such as GH and CxH.
// @version 1.29.0
// @version 1.23.0
// @match https://*.hentaiheroes.com/*
// @match https://nutaku.haremheroes.com/*
// @match https://*.gayharem.com/*
Expand Down
152 changes: 76 additions & 76 deletions dist/hh-plus-plus.user.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hh-plus-plus",
"version": "1.29.0",
"version": "1.23.0",
"description": "Adding things here and there in the Hentai Heroes game. Also supports HHCore-based games such as GH and CxH.",
"private": "true",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions src/i18n/labels/De.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export const config = {
haremTeamsFilter: 'Teamfilter für Harem',
upgradeQuickNav: 'Schnellnavigation auf der Upgrade-Seite',
leaderboardClubmateIndicators: 'Club-Mitglieder auf Ranglisten hervorheben',
leaderboardProfilePopups: 'Links zu Spielerprofilen in den Ranglisten',
}
export const stConfig = {
missionsBackground: 'Missionshintergrund ändern',
Expand Down
1 change: 1 addition & 0 deletions src/i18n/labels/En.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export const config = {
haremTeamsFilter: 'Harem teams filter',
upgradeQuickNav: 'Upgrade page quick navigation',
leaderboardClubmateIndicators: 'Highlight clubmates on leaderboards',
leaderboardProfilePopups: 'Links to player profiles from leaderboards',
}
export const stConfig = {
missionsBackground: 'Change missions background',
Expand Down
1 change: 1 addition & 0 deletions src/i18n/labels/Es.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export const config = {
haremTeamsFilter: 'Filtro de equipos de harén',
upgradeQuickNav: 'Navegación rápida en la página de actualización',
leaderboardClubmateIndicators: 'Destacar a los compañeros de club en las tablas de clasificación',
leaderboardProfilePopups: 'Enlaces a perfiles de jugadores desde tablas de clasificación',
}
export const stConfig = {
missionsBackground: 'Cambiar el fondo de las misiones',
Expand Down
1 change: 1 addition & 0 deletions src/i18n/labels/Fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export const config = {
haremTeamsFilter: 'Filtre d\'équipes dans le harem',
upgradeQuickNav: 'Navigation rapide sur la page d\'amélioration',
leaderboardClubmateIndicators: 'Surligner les coéquipiers dans les classements',
leaderboardProfilePopups: 'Liens vers les profils de joueurs dans les classements',
}
export const stConfig = {
missionsBackground: 'Change l\'arrière-plan des missions',
Expand Down
6 changes: 6 additions & 0 deletions src/i18n/labels/Ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ export const config = {
eventEndIndicators: 'Индикаторы окончания событий на главном экране',
haremTeamsFilter: 'Фильтр команд в гареме',
upgradeQuickNav: 'Быстрая навигация на экране апгрейдов',
leaderboardClubmateIndicators: 'Выделять членов клуба в списках игроков',
leaderboardProfilePopups: 'Ссылки на профили в списках игроков',
}
export const stConfig = {
missionsBackground: 'Изменить фон миссий',
Expand Down Expand Up @@ -313,3 +315,7 @@ export const haremTeamsFilter = {
team: 'Команда',
visitTeams: 'Сначала посетите <a href="../teams.html">Команды</a>.',
}

export const leaderboardClubmateIndicators = {
clubmate: 'Член Клуба',
}
33 changes: 33 additions & 0 deletions src/modules/LeaderboardProfilePopupsModule/index.js
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
1 change: 1 addition & 0 deletions src/modules/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export {default as EventEndIndicatorsModule} from './EventEndIndicatorsModule'
export {default as HaremTeamsFilterModule} from './HaremTeamsFilterModule'
export {default as UpgradeQuickNavModule} from './UpgradeQuickNavModule'
export {default as LeaderboardClubmateIndicatorsModule} from './LeaderboardClubmateIndicatorsModule'
export {default as LeaderboardProfilePopupsModule} from './LeaderboardProfilePopupsModule'

export {default as HomeScreenRightSideRearrangeStyleTweak} from './HomeScreenRightSideRearrangeStyleTweak'
export {default as ContestNotifsStyleTweak} from './ContestNotifsStyleTweak'
Expand Down

0 comments on commit 1a79762

Please sign in to comment.