Commit Graph

217 Commits

Author SHA1 Message Date
Guangcong Luo
d0ffc16089 Prevent Opt+Cmd+I from italicizing text 2015-12-12 23:05:10 -05:00
Guangcong Luo
e24775bd7a Merge pull request #564 from urkerab/bold-italic-ignore-alt-key
Don't trigger bold or italic on Alt+B or Alt+I
2015-12-07 08:29:40 +00:00
Ivo Julca
1d514bc6ec Miscellaneous style fixes for better alignment to server code style 2015-12-03 02:25:57 -05:00
urkerab
c1f1224008 Don't trigger bold or italic on Alt+B or Alt+I 2015-12-02 12:32:42 +00:00
Guangcong Luo
3cac636298 Drop symbols from end of name when tab completing
Now that the symbols at the end aren't necessary for highlighting,
dropping them from tab completion should make talking to people with
emoticons at the end of their name less annoying.
2015-12-01 15:25:21 -05:00
Guangcong Luo
c8a72d262c Improve tab completion
Usernames with spaces can now be completed.

Special characters in front of the username will now be preserved.
This requires usernames to start with an alphanumeric character,
which fortunately we already enforce.
2015-11-30 18:05:32 -05:00
Guangcong Luo
cf8bb24e71 Refactor data storage
Data (teams and prefs) are now always stored in localStorage in the
`https://play.pokemonshowdown.com` origin. Data storage at a low
level has been mostly rewritten for this, and moved to storage.js.

Tools.prefs has been renamed Storage.prefs, although the API
Tools.prefs(prefName) is still available, and recommended for
battle.js (because storage.js isn't available in replays). All
other pref functionality, such as setting prefs and saving prefs,
should only be used in Storage.prefs.

If the browser blocks third-party cookies in a detectable way,
data is instead stored in the local origin.

As a final safety measure, prefs/teams are mirrored in the local origin
in case third-party cookies are blocked in an undetectable way.

This refactor also replaces the 'init:loadprefs' and 'init:loadteams'
events with a new load tracking system that's basically a simplified
implementation of Promises, documented in the comments for
Tools.makeLoadTracker().
2015-11-28 04:36:41 -05:00
Guangcong Luo
11024a27bf Fix click handling after closing teambuilder
Because of sliders being dumb, the teambuilder frequently has to
clear global handlers, which cleared the global click handler that
handled room link opening, as well as external links on the
desktop client.

Anyway, click handlers are now a lot more standardized and all that.
2015-11-25 23:26:20 -05:00
Guangcong Luo
bc8daf62e4 Ladder refactor 2015-11-25 17:36:28 -05:00
Ivo Julca
33dd5259bb Fix highlights in focused rooms
While they needn`t raise popups, they should still format the chat messages.
2015-11-17 10:51:11 -05:00
The Immortal
cd454a2c40 Add PU suspect COIL 2015-11-15 00:52:37 +04:00
Guangcong Luo
bf15ac6876 Merge pull request #499 from Slayer95/notifications-tone-down
Tone down excessive notifications
2015-11-14 04:47:54 +00:00
The Immortal
5f7671268c Add COIL for Monotype 2015-11-06 22:46:07 +04:00
Guangcong Luo
44526f7863 Move toggleFormatChar from Tools to ConsoleRoom
The name is a bit unfortunate, but Tools is specifically for data
access for game stats/mechanics and other things relevant to
battles, it's not supposed to be a generic place to stick
miscellaneous functions.
2015-11-05 03:29:42 -05:00
MonoHearted
2281cee252 Add a duplicate check for highlights
Removes the possibility of adding duplicate highlights to your list.
2015-11-03 14:36:22 -08:00
urkerab
b4fe927cb4 Update chatbox focus text to reflect reality 2015-10-08 17:31:48 +01:00
sirDonovan
574e1af2de Update |unlink|hide|
- allow messages to be toggled between hidden and revealed
- prevent multiple buttons for the same user
- add usernames to buttons
2015-10-08 02:32:04 -05:00
Guangcong Luo
74d5343d26 Make /logout more DRY 2015-10-06 05:09:25 -04:00
urkerab
a4de2afdfb Allow tabs to be reordered with Shift+Arrow 2015-10-04 21:56:10 +01:00
Ivo Julca
4b6cf16fa9 Do not notify again for the same chat messages on reload 2015-10-03 13:02:39 -05:00
Ivo Julca
df648dd287 System chat messages (|c|~|) no longer arise subtle notifications 2015-10-03 12:56:44 -05:00
Ivo Julca
0e29936864 Refactor timestamps slightly for clarity
ChatRoom.getTimestamp now accepts a numeric date in seconds.
2015-10-03 12:52:26 -05:00
Kevin Lau
74c563b827 Implement |unlink|roomhide| for room-specific message suppression 2015-09-28 17:10:07 -07:00
Bär Halberkamp
8580122cc2 Little fixup to the uhtml code 2015-09-25 04:26:14 +02:00
Bär Halberkamp
2e10fb4c9b Add |uhtml| features for use in the poll command 2015-09-25 00:18:24 +02:00
urkerab
6e861e535e Support chat history in PM chatboxes 2015-09-24 09:46:15 +01:00
Ivo Julca
61bbb769df Remove COIL for PU 2015-09-20 16:08:59 -05:00
Guangcong Luo
0b3b09e987 Support new ladder protocol
We have a new protocol for local (sim server side) ladders.

This involves sending |,LL| in |formatslist| to opt into local ladder
support.

When local ladder is opted-in, /rank etc will be passed to the sim
server, and the ladder tab does `/cmd laddertop FORMATID` expecting
[formatid, toplistHTML] in return.

Everything else works the same as before. This change marks
version 0.10.2.
2015-09-19 16:01:10 -04:00
urkerab
969f77e2e7 Support additional keys in PM chatboxes 2015-09-17 14:09:21 +01:00
Guangcong Luo
59a0fde5b8 Update sorting of custom ranks
They're now on par with Player instead of Driver.
2015-09-11 00:06:18 -04:00
Konrad Borowski
1b593da4e5 Don't require boundaries for non-word characters
This fixes an issue where highlight regular expression like :-?\)
couldn't match a smiley, unless it happened to have a word character
on both of its sides.
2015-09-03 15:46:22 +02:00
urkerab
77e627ce6b Update the window title as the fragment changes 2015-08-26 13:02:02 +01:00
The Immortal
c74c6aa545 Update LC suspect COIL 2015-08-25 02:32:39 +04:00
The Immortal
cc8229584c Add COIL for PU 2015-08-18 21:38:19 +04:00
Ivo Julca
804b6b7b5d Don't hide suppressed spoilers in notifications 2015-08-05 21:13:52 -05:00
Ivo Julca
ada7385bb4 Unify chat message parsing in rooms and PMs
Most notably, this adds support for /announce and /mee in battle rooms, and /html in chat rooms.
A better user group inference is now used for PMs and chat rooms.

This is done by implementing a general Tools.parseChatMessage method.
2015-08-05 21:07:28 -05:00
Ivo Julca
1f76b447eb Make /logout equivalent to the "Log out" button 2015-08-05 20:57:46 -05:00
Guangcong Luo
a6e9e7ee80 Better support username links
`class="username"` links now don't require data-name, so they can
be safely sent from the server through Caja which strips unrecognized
attributes.
2015-08-01 00:54:54 -04:00
The Immortal
5d7676133d Update Doubles OU suspect COIL 2015-07-29 05:04:16 +04:00
Ivo Julca
128a8bc9bf Handle |refresh| message globally
Now the /refreshpage command will no longer have its effects limited to users in Lobby.
2015-07-28 17:49:22 -05:00
Guangcong Luo
a6475dda94 Tap/click spoilers to show them
This now supports spoilers on platforms that don't have a way to hover,
such as mobile.
2015-07-24 17:25:31 -04:00
Guangcong Luo
57946a918a New command /debug extractteams
I'm considering adding more commands like these to debug client
issues.
2015-07-23 00:29:01 -04:00
Guangcong Luo
d50f07c188 Highlight own messages
Your own messages are now sent with a slightly darker background.

PS actually originally had a feature that made your own messages gray,
which stopped working during the redesign two years ago. I only just
realized this and brought it back, but since the redesign, the
background has gotten darker and gray text is harder to read, so
I'm trying out this new approach with the background.

I personally think design-wise, gray text is better, but readability
is more important. Maybe I'll have a better idea later, but for now,
this doesn't look all that bad.
2015-07-15 17:29:38 -04:00
Guangcong Luo
6e0541458e Hide spoiler text from notifications 2015-07-15 06:00:10 -04:00
Guangcong Luo
b96077039f Fix low-res userlist
The userlist in low-res mode now scrolls to top before collapsing,
which fixes the issue where it might not display the user-count
and toggle button.
2015-07-15 00:32:48 -04:00
Guangcong Luo
698b413801 Revert mode changes from recent style fixes 2015-07-14 19:00:58 -04:00
Freigeist
4d242777c1 Miscellaneous style changes 2015-07-14 21:17:22 +02:00
Freigeist
7e9bdaf6fd Fix indentation of switches 2015-07-14 21:15:07 +02:00
Freigeist
19dfae0f61 Remove trailing whitespace 2015-07-14 21:15:05 +02:00
Freigeist
87b94e7284 Fix spaces on string concatenation 2015-07-14 21:15:04 +02:00