Commit Graph

107 Commits

Author SHA1 Message Date
Guangcong Luo
7e7afd3b96 Change up the link separators
The links in the top right are now separated by whitespace.

The previous brackets were visually pretty noisy, and we no longer
have a need to draw attention to them.
2013-04-01 00:23:50 -07:00
Cathy J. Fitzpatrick
107c7efe28 Fix change that broke testclient.html 2013-03-29 17:05:35 -06:00
Guangcong Luo
56c439e5cf Use protocol-relative URLs for resources 2013-03-29 10:29:29 -07:00
Cathy J. Fitzpatrick
92867f22b9 Implement HP bar colours 2013-03-29 02:53:52 -06:00
Cathy J. Fitzpatrick
83dcdb638b Add support for viewing multiple IPs for a single user 2013-03-24 00:57:19 -06:00
Cathy J. Fitzpatrick
ca3f3cd9d0 Fix teams sometimes not displaying properly on *.psim.us 2013-03-24 03:33:31 +03:00
Cathy J. Fitzpatrick
e8ce936454 Fix crossdomain handling for ancient server versions 2013-03-22 23:34:15 -06:00
Cathy J. Fitzpatrick
d2ce3a6f7a Fallback for browsers that don't support window.postMessage
For example, the stock Android browser doesn't support
`window.postMessage`, but is otherwise able to run Pokemon Showdown.
2013-03-22 23:05:52 +03:00
Cathy J. Fitzpatrick
d672ae57b5 Correctly synchronise sid and username across domains 2013-03-22 05:11:11 -06:00
Cathy J. Fitzpatrick
03dd6a2586 Fix bug involving empty sid data 2013-03-22 04:44:59 -06:00
Cathy J. Fitzpatrick
d99ede9def Always load resources from play.pokemonshowdown.com
With the advent of the *.psim.us URI scheme, one problem was that
images and other resources were not cached across different servers
because each server had a different URI for the same resource. This
commit resolves the problem by loading all resources from
play.pokemonshowdown.com.
2013-03-22 04:07:30 -06:00
Cathy J. Fitzpatrick
2ff0176b0e Add link to main website at top of client UI 2013-03-22 03:45:00 -06:00
Cathy J. Fitzpatrick
0579f6d409 Fix a bug in crossdomain resource sharing 2013-03-22 01:34:14 -06:00
Cathy J. Fitzpatrick
15e797f0d5 Sharing of resources between psim.us and pokemonshowdown.com
This commit allows the new psim.us domain to use the cookies and
`localStorage` of play.pokemonshowdown.com. Teams and prefs are
initially loaded from the play.pokemonshowdown.com `localStorage` and
changes to teams and prefs are written back to the
play.pokemonshowdown.com `localStorage`.

This commit also implements a few other things for the new psim.us
domain (implemented by Zarel):

- URIs of the form serverid.psim.us load the server `serverid`
- the naked domain now loads the lobby
2013-03-22 00:19:23 -06:00
Cathy J. Fitzpatrick
1a2e5a13fa Fix potential race condition in initialising the client 2013-03-21 06:00:47 -06:00
Cathy J. Fitzpatrick
f8ad3b0700 Fix another potential exception 2013-03-21 05:52:56 -06:00
Cathy J. Fitzpatrick
d8bce4e577 Fix potential exception in sim.js 2013-03-21 05:50:08 -06:00
Cathy J. Fitzpatrick
a2c7a8850f Changes to alt port functionality
- don't store alt port preference in `localStorage` anymore
- don't show information about what port the client is connecting to,
  because this information isn't useful to users
2013-02-28 19:27:15 -07:00
Guangcong Luo
b92a21e564 Show HP for active pokemon on mouseover 2013-02-26 10:37:19 -08:00
Cathy J. Fitzpatrick
36836fc5b2 Fix the debouncing logic 2013-02-22 15:33:34 -07:00
Cathy J. Fitzpatrick
7fdc3438bb Further decrease frequency of debounced updates 2013-02-22 15:26:52 -07:00
Cathy J. Fitzpatrick
d15f08c1a8 Tab complete: fix alphabetical sorting 2013-02-22 00:38:28 -07:00
Cathy J. Fitzpatrick
163c3f679b Remove some unused code 2013-02-21 22:20:16 -07:00
Cathy J. Fitzpatrick
036acb2505 Store sound preference in prefs instead of special cookie 2013-02-21 21:58:06 -07:00
Cathy J. Fitzpatrick
23f1b56b67 Add support for server alternative ports
If connecting to the server's main port fails, the client will
automatically attempt to connect on the alternative port. If connecting
on the alternative port is successful, this is recorded in localStorage
so that next time, the alternative port is used first.

This is mainly intended to be used by the main server, which has a
primary port of 8000 and a relatively little known alternative port
of 80.
2013-02-21 19:33:56 -07:00
Cathy J. Fitzpatrick
5a7abe13a8 Fix a bug in the userlist buttons' onclick handler 2013-02-20 18:50:29 -07:00
Cathy J. Fitzpatrick
7917f89a49 Fix for the battle list not updating 2013-02-20 03:06:13 -07:00
Cathy J. Fitzpatrick
4f17107ba3 Fix issue with empty element in userlist 2013-02-20 00:12:12 -07:00
Cathy J. Fitzpatrick
8d697b7e6d Fix minor display issue when no users are online 2013-02-19 22:46:09 -07:00
Cathy J. Fitzpatrick
6179c75e9e Better method of updating the user list
Instead of constructing the user list from scratch at regular intervals,
we now construct it only when joining the lobby. Each subsequent join,
part, or rename then adds or removes elements from the user list, rather
than constructing it from scratch.

This change should significantly reduce client lag.
2013-02-19 22:22:12 -07:00
Cathy J. Fitzpatrick
35c5be5a85 Fix a bug in tab completion 2013-02-19 20:08:48 -07:00
Cathy J. Fitzpatrick
1e0efb7612 Add some profiling code 2013-02-19 18:39:46 -07:00
Cathy J. Fitzpatrick
5c763e4606 Temporary change to make client less laggy
Unfortunately, this does introduce 1.4 seconds of new lag when clicking
to view a user's profile, but it's an improvement overall, pending the
development of a more robust solution.
2013-02-19 18:23:27 -07:00
Cathy J. Fitzpatrick
dfb58aed59 Don't load the client if teams fail to load
If teams fail to load due to some bug, the user may lose their teams
permanently if they save their teams. In avoid to avoid a catastrophe,
we now decline to load the client if teams fail to load.

This should never happen unless a bug is introduced that breaks team
loading.
2013-02-19 01:07:18 -07:00
Cathy J. Fitzpatrick
278479865e Changes to notifications
- don't show a notification if the client has focus
- page title notifications now alternate every 1.5 seconds rather than
  every 0.5 seconds
2013-02-19 00:27:08 -07:00
Cathy J. Fitzpatrick
369642c72c Fix bug in highlight feature
Because highlight matching was done with a global regular expression,
subsequent calls to `test` started searching after the end of the
previous match, meaning that highlight matches were often misses.
There is no reason for highlight matching to be done with a global
regular expression, so this commit fixes the issue by deleting
option 'g' from the regular expression.

In addition, I have renamed `lobby.regex` to `lobby.highlightRegExp`.
2013-02-18 21:42:33 -07:00
Cathy J. Fitzpatrick
2025ba7955 Implement /refreshpage command 2013-02-18 00:02:48 -07:00
Cathy J. Fitzpatrick
4c2526b562 Revert recent changes for now
These changes introduced some unexpected issues.
2013-02-17 23:05:59 -07:00
Cathy J. Fitzpatrick
e2f3b23c6c Fix for some servers on the testclient server chooser 2013-02-17 22:38:26 -07:00
Cathy J. Fitzpatrick
55581d5a48 Add server chooser to testclient.html 2013-02-17 22:35:04 -07:00
Cathy J. Fitzpatrick
548cd6bc31 Don't show auth buttons to voice users 2013-02-17 21:20:22 -07:00
Cathy J. Fitzpatrick
7aaeedffd6 Changes to mute/ban/kick buttons
- mute/ban/kick buttons are now only shown if the user can use the
  corresponding command. This determination is based on the permissions
  in use on the main server (and hardcoded as such) because the server
  does not currently send the client any information about permissions.
  In particular, regular users will no longer see the buttons when
  viewing their own profile.

- there is now a blank line between a user's IP address and the auth
  buttons.
2013-02-17 21:12:47 -07:00
Cathy J. Fitzpatrick
3b860f6fd5 Better documentation of /highlight and /timestamps 2013-02-17 20:56:13 -07:00
Cathy J. Fitzpatrick
e7acbff12d Fix for notification on first turn of battle for player 1
Previously, the `yourMove` (etc.) notifications on the first turn of
a battle for player 1 did not include the opponent's name, because
the opponent's side of the battle was not yet initialised. This
commit fixes the issue by delaying the notification until the
opponent's side has initialised.
2013-02-14 00:22:43 -07:00
Guangcong Luo
92f9b95f17 Make sure certain keyboard shortcuts don't apply with modifiers 2013-02-12 19:59:19 -08:00
Cathy J. Fitzpatrick
9f49eb973a Fix for target='_blank' being stripped from links 2013-02-12 12:57:04 -07:00
Cathy J. Fitzpatrick
61d08e1df2 Add support for challstr alias of challenge-string 2013-02-12 05:01:36 -07:00
Cathy J. Fitzpatrick
5934de9a35 Fix for registration link issue 2013-02-12 04:57:06 -07:00
Cathy J. Fitzpatrick
4f96f0923b Fix bug occasionally causing userlist not to load 2013-02-12 03:52:59 -07:00
Cathy J. Fitzpatrick
37dc0b423f Temporary measure so /kick continues to work on old servers 2013-02-12 03:04:48 -07:00