Commit Graph

78 Commits

Author SHA1 Message Date
Guangcong Luo
72ff236cef Hardcode logo img dimensions
Very minor optimization to layout performance, but I'll take it.
2015-12-12 23:04:29 -05:00
Guangcong Luo
211da6e8b1 Major update to background storage and menu colors
When loading a background, we use Color Thief to get a six-color
palette from the image, for use on the main menu buttons.

Only hue and lightness are extracted.

https://github.com/lokesh/color-thief/

Backgrounds are now stored in localStorage in the current origin,
rather than the prefs origin. This allows faster loading, as well
as different backgrounds for different origins, which other
servers should like since it means their backgrounds get seen
at least once before possibly being replaced.

Special thanks to Joim for the base code.
2015-12-12 04:01:00 -06:00
Guangcong Luo
b718a335a2 News tracking 2015-11-30 02:11:27 -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
f90f650372 Remove a workaround for some old malware
This malware is probably no longer around, and even if it is, the
rest of the file has been changed enough that the previous
workaround probably doesn't work anymore, anyway.
2015-10-22 04:35:20 -04:00
Guangcong Luo
28f7956d8c Various micro-optimizations to index.template.html
In particular, the header comment was cut down from 2KB to 1KB.
Sadly still not within the spec requirement of 512bytes to the
meta charset, but closer!
2015-10-22 03:08:13 -04:00
Guangcong Luo
bdcbded0bb Update Font Awesome to 4.4.0
Font Awesome 3 -> 4 was a backwards-incompatible change, so this
update is pretty invasive. I tested everything we use it for and it
still works, though. Including supporting both Font Awesome versions
in battle.js.
2015-09-25 02:46:34 -05:00
urkerab
a1c674851a Make it possible to minimise the Latest News box 2015-09-09 12:33:09 +01:00
Guangcong Luo
51476ce695 Remove scrollbar from News 2015-08-01 00:54:54 -04:00
Guangcong Luo
d6173c2485 We don't use IRC anymore 2015-07-25 16:53:55 -04:00
Guangcong Luo
a78d233785 Add link for 128x128 app icon 2015-07-15 00:42:29 -04:00
Guangcong Luo
e2a8627b11 Native resolution for mobile
We now support resolutions down to 320px width, down from the
previous 640px.
2015-07-15 00:42:07 -04:00
Guangcong Luo
5abc202006 Don't cache old tournament JS files 2015-07-02 12:47:51 -04:00
Guangcong Luo
a6e56e969a Update jQuery to 2.1.4 2015-06-28 00:50:16 -04:00
Guangcong Luo
d2b5a0bad3 Support some CSS in sanitized HTML 2015-06-27 02:46:00 -04:00
Guangcong Luo
f5b3d7c0c3 Add 'Forum' link to bottom left linkbar 2015-06-12 14:29:34 -04:00
Guangcong Luo
6c42d72548 Update jQuery 2015-06-07 23:42:03 -04:00
Guangcong Luo
3aa8b47ae5 Merge pull request #380 from xfix/disable-chrome-frame
Disable Chrome Frame
2015-05-20 05:24:14 +00:00
Konrad Borowski
22502eb07e Disable Chrome Frame
Chrome Frame is not supported for two years, which means removing
support for it on Pokémon Showdown should be safe.
2015-05-19 20:08:45 +02:00
Konrad Borowski
d9f3ca74be Remove useless </small> from index.html 2015-05-15 12:23:01 +02:00
Morfent
d2bc6dd260 Update jQuery to version 2.1.3 2015-02-06 05:07:58 -04:00
Guangcong Luo
88a5a2e5e9 Chrome frame is deprecated
We now redirect to the Windows download for old IE versions
2014-07-11 18:35:52 -05:00
Guangcong Luo
46a7cf5970 Add intro comment to top of source 2014-07-11 18:35:52 -05:00
Guangcong Luo
d367d2dc8a Make News box smaller 2014-07-04 15:47:02 -05:00
Guangcong Luo
694f140943 Update to Universal Analytics 2014-06-02 16:20:49 -05:00
Guangcong Luo
96a69a8c74 Update jQuery and SockJS 2014-03-23 20:45:35 -05:00
Guangcong Luo
6cb657bbe5 Remove forum link in footer
We've already deemphasized the forum a lot.
2014-03-15 23:43:10 -05:00
Guangcong Luo
cbe7eef0b2 Make News box bigger 2014-03-06 18:18:40 -06:00
Guangcong Luo
95f2b90d9a Work around teambuilder virus issue
There's a virus floating around that's causing teambuilder not to work
for many users. Further investigation shows that it deletes the tenth
byte before the utilichart.js include, changing a </script> into
</sript> and preventing the utilichart.js include from working.

This change prevents the virus from interfering with utilichart.js,
and also makes it possible to detect the virus. We currently don't
do anything after detecting it, though.
2014-01-03 22:45:43 -06:00
小太
ef69e954c2 Rename client-tournament.js to client-chat-tournament.js 2013-12-09 16:16:11 +11:00
小太
8ec4a07c52 Add tournament includes to index.template.html 2013-12-09 12:00:48 +11:00
Guangcong Luo
550071c0e1 Newest jQuery versions 2013-11-20 17:55:59 -06:00
Guangcong Luo
83626ee935 New gen-6-only learnsets file
The client doesn't actually need a full learnset file, so this is
enough (even for the dex).
2013-10-23 22:41:44 -05:00
Guangcong Luo
1c17af0020 Move back to static index page
Dynamic one had too much server load during restarts
2013-10-03 19:32:17 -05:00
Guangcong Luo
daaa6f3bfd Embed news into HTML for faster loading 2013-09-20 16:48:31 -05:00
Guangcong Luo
264aadc3eb Better loading message 2013-09-20 16:48:31 -05:00
Guangcong Luo
fc845d30d9 Desktop client: Teams saved to files 2013-09-15 18:18:03 -05:00
Guangcong Luo
63ef9ca314 Desktop client: Support loading teams 2013-09-14 22:41:50 -05:00
Guangcong Luo
46de389961 Support client-side chat logging 2013-08-31 17:04:38 -05:00
小太
4503e271fb Fix code not using tabs for indenting 2013-08-18 22:54:42 +10:00
小太
cf699c0494 Obliterate trailing whitespace 2013-08-18 22:48:11 +10:00
Guangcong Luo
60ce7dc72f Support chat room lists
Currently hardcoded for the official server only.
2013-07-03 02:32:27 -05:00
Cathy J. Fitzpatrick
bd5664594f Get rid of another query string 2013-06-13 04:28:06 -05:00
Cathy J. Fitzpatrick
8dfdc3c59b Get rid of some query strings 2013-06-12 05:34:10 -05:00
Guangcong Luo
8ae993ac3b Join rooms optimistically
Rooms are now opened immediately upon request, instead of waiting
for the server to respond with the room's data.
2013-05-30 18:24:29 -05:00
Cathy J. Fitzpatrick
49607ed7b5 Accent the e in Pokémon 2013-05-22 21:30:34 -05:00
Cathy J. Fitzpatrick
41b34ddf5d Log client errors to Analytics 2013-05-21 17:00:53 -05:00
Cathy J. Fitzpatrick
49f643857d Remove soundmanager fallback code
This code was intended to gracefully fallback to HTML5 audio
support if flash is blocked; however, it breaks battles on Firefox.
2013-05-21 01:32:47 -05:00
Cathy J. Fitzpatrick
35aaecf47a index.template.html fixes
- add version query strings to resources
- fix path of some library files
2013-05-20 03:33:03 -06:00
Cathy J. Fitzpatrick
7ee5d266f0 Update references to dev.pokemonshowdown.com 2013-05-20 03:22:51 -06:00