Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DieterReinert committed Apr 14, 2024
1 parent d9bf016 commit 694b43b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
18 changes: 14 additions & 4 deletions play.pokemonshowdown.com/js/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,14 +291,24 @@ function toId() {
encodeURIComponent(toUserid(name)) +
//'&challengekeyid=' + encodeURIComponent(this.challstr.charAt(0)) +
'&challenge=' + encodeURIComponent(this.challstr);
$.post('https://play.pokemonshowdown.com/~~dawn/action.php', {
// $.post('https://play.pokemonshowdown.com/~~dawn/action.php', {
// act: 'getassertion',
// userid: userid,
// challstr: this.challstr,
// sid: 'hi',
// }, function (data) {
// self.finishRename(name, data);
// });
var messageData = 'S' + JSON.stringify({
act: 'getassertion',
userid: userid,
challstr: this.challstr,
sid: 'hi',
}, function (data) {
self.finishRename(name, data);
});
});

Check failure on line 308 in play.pokemonshowdown.com/js/client.js

View workflow job for this annotation

GitHub Actions / build (14.x)

Trailing spaces not allowed
// Send the message to the iframe's contentWindow
var pokemonIframe = document.getElementById('pokemon-iframe').contentWindow;
pokemonIframe.postMessage(messageData, 'https:\/\/dawn.psim.us');

Check failure on line 311 in play.pokemonshowdown.com/js/client.js

View workflow job for this annotation

GitHub Actions / build (14.x)

Trailing spaces not allowed
} else {
app.send('/trn ' + name);
}
Expand Down
2 changes: 1 addition & 1 deletion play.pokemonshowdown.com/js/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ Storage.initPrefs = function () {
if (document.location.hostname !== Config.routes.client) {
$(
'<iframe src="https://' + Config.routes.client + '/crossdomain.php?host=' +
encodeURIComponent('dawn.psim.us') +
encodeURIComponent(document.location.hostname) +
'&path=' + encodeURIComponent(document.location.pathname.substr(1)) +
'&protocol=' + encodeURIComponent(document.location.protocol) +
'" style="display: none;"></iframe>'
Expand Down

0 comments on commit 694b43b

Please sign in to comment.