Skip to content

Commit

Permalink
change resource prefix back
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivaD173 committed Mar 19, 2024
1 parent 8c131d3 commit 0fc979f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
8 changes: 4 additions & 4 deletions play.pokemonshowdown.com/js/client-topbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
initialize: function () {
// April Fool's 2016 - Digimon Showdown
// this.$el.html('<img class="logo" src="' + Dex.resourcePrefix + 'sprites/afd/digimonshowdown.png" alt="Digimon Showdown! (beta)" width="146" height="44" /><div class="maintabbarbottom"></div><div class="tabbar maintabbar"><div class="inner"></div></div><div class="userbar"></div>');
this.$el.html('<img class="logo" src="' + Dex.resourcePrefix + 'pokemonshowdownbeta.png" srcset="' + Dex.resourcePrefix + 'pokemonshowdownbeta@2x.png 2x" alt="Pok&eacute;mon Showdown! (beta)" width="146" height="44" /><div class="maintabbarbottom"></div><div class="tabbar maintabbar"><div class="inner"></div></div><div class="userbar"></div>');
this.$el.html('<img class="logo" src="' + Dex.localPrefix + 'pokemonshowdownbeta.png" srcset="' + Dex.localPrefix + 'pokemonshowdownbeta@2x.png 2x" alt="Pok&eacute;mon Showdown! (beta)" width="146" height="44" /><div class="maintabbarbottom"></div><div class="tabbar maintabbar"><div class="inner"></div></div><div class="userbar"></div>');
this.$tabbar = this.$('.maintabbar .inner');
// this.$sidetabbar = this.$('.sidetabbar');
this.$userbar = this.$('.userbar');
Expand Down Expand Up @@ -155,10 +155,10 @@
var $favicon = $('#dynamic-favicon');
if (!!$favicon.data('on') !== !!notificationCount) {
if (notificationCount) {
$favicon.attr('href', Dex.resourcePrefix + '/favicon-notify.ico');
$favicon.attr('href', Dex.localPrefix + '/favicon-notify.ico');
$favicon.data('on', '1');
} else {
$favicon.attr('href', Dex.resourcePrefix + '/favicon.ico');
$favicon.attr('href', Dex.localPrefix + '/favicon.ico');
$favicon.data('on', '');
}
}
Expand Down Expand Up @@ -199,7 +199,7 @@
for (var i in app.rooms) {
if (app.rooms[i] !== app.curRoom && app.rooms[i].notificationClass === ' notifying') notificationClass = ' notifying';
}
var buf = '<ul><li><a class="button minilogo' + notificationClass + '" href="' + app.root + '"><img src="' + Dex.resourcePrefix + 'favicon-256.png" width="32" height="32" alt="Pok&eacute;mon Showdown! (beta)" /><i class="fa fa-caret-down" style="display:inline-block"></i></a></li></ul>';
var buf = '<ul><li><a class="button minilogo' + notificationClass + '" href="' + app.root + '"><img src="' + Dex.localPrefix + 'favicon-256.png" width="32" height="32" alt="Pok&eacute;mon Showdown! (beta)" /><i class="fa fa-caret-down" style="display:inline-block"></i></a></li></ul>';

buf += '<ul>' + this.renderRoomTab(app.curRoom) + '</ul>';

Expand Down
11 changes: 7 additions & 4 deletions play.pokemonshowdown.com/src/battle-dex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,13 @@ const Dex = new class implements ModdedDex {
pokeballs: string[] | null = null;

resourcePrefix = (() => {
// let prefix = '';
// if (window.document?.location?.protocol !== 'http:') prefix = 'https:';
// return `${prefix}//${window.Config ? Config.routes.client : 'play.pokemonshowdown.com'}/`;
return "https://staraptorshowdown.com/"
let prefix = '';
if (window.document?.location?.protocol !== 'http:') prefix = 'https:';
return `${prefix}//${window.Config ? Config.routes.client : 'play.pokemonshowdown.com'}/`;
})();

localPrefix = (() => {
return "https://staraptorshowdown.com/";
})();

fxPrefix = (() => {
Expand Down

0 comments on commit 0fc979f

Please sign in to comment.