diff --git a/README.md b/README.md index bd04183d0..c9ce9a9be 100644 --- a/README.md +++ b/README.md @@ -20,13 +20,12 @@ You can connect to an arbitrary server by navigating to `testclient.html?~~host:port`. For example, to connect to a server running locally on port 8000, you can navigate to `testclient.html?~~localhost:8000`. -Certain things will fail: +The following things will fail in `testclient.html`: + Registering + Changing name to a registered name other than the one you are currently logged in with (however, changing to an unregistered name will work, and you can even change back to your original registered name afterward) -+ The ladder room (however, the `/ladder` command does work) Everything else can be tested, though. diff --git a/js/client.js b/js/client.js index 767058d96..06d0d13be 100644 --- a/js/client.js +++ b/js/client.js @@ -402,7 +402,10 @@ }; $.get = function(uri, callback, type) { if (type === 'html') { - return showUnsupported(); + uri += '&testclient'; + } + if (uri[0] === '/') { // relative URI + uri = Tools.resourcePrefix + uri.substr(1); } self.addPopup(ProxyPopup, {uri: uri, callback: callback}); }; diff --git a/ladder.php b/ladder.php index 6e0403ce7..d7a70c726 100644 --- a/ladder.php +++ b/ladder.php @@ -4,7 +4,6 @@ include 'lib/ntbb-ladder.lib.php'; $serverid = 'showdown'; $formatid = 'OU'; -$output = @$_REQUEST['output']; if (@$_REQUEST['format']) $formatid = $_REQUEST['format']; if (@$_REQUEST['server']) $serverid = $_REQUEST['server']; @@ -13,6 +12,10 @@ if (!ctype_alnum($formatid)) { die('denied'); } +if (isset($_REQUEST['testclient'])) { + header('Content-Type: text/plain; charset=utf-8'); +} + $ladder = new NTBBLadder($serverid, $formatid); ?>