Refactor: Use Config.origindomain in two more places

This commit is contained in:
Cathy J. Fitzpatrick
2013-05-20 16:27:08 -05:00
parent 1e469693a9
commit ae92fc6f02

View File

@@ -67,7 +67,7 @@
getActionPHP: function() {
var ret = '/~~' + Config.server.id + '/action.php';
if (Config.testclient) {
ret = 'http://play.pokemonshowdown.com' + ret;
ret = 'http://' + Config.origindomain + ret;
}
return (this.getActionPHP = function() {
return ret;
@@ -341,7 +341,7 @@
// over to the HTTPS origin.
$(window).on('message', function($e) {
var e = $e.originalEvent;
var origin = 'https://play.pokemonshowdown.com';
var origin = 'https://' + Config.origindomain;
if (e.origin !== origin) return;
if (e.data === 'init') {
e.source.postMessage($.toJSON({