Commit Graph

86 Commits

Author SHA1 Message Date
Guangcong Luo
094b9effa1 Implement Retina logo 2016-04-02 03:13:09 -04:00
Guangcong Luo
78334b7a15 Split off client-topbar.js from client.js
client.js is still kind of huge, but oh well. Progress!
2016-01-18 01:42:30 -08:00
Harshvardhan
9109de7925 Added support for all power-boosting items
Removed redundancy from code

Moved to tooltips file

Reduced code

Reduced code

Reduced code

Reduced globals to 1

Minor error corrections

Added filename to index.template.html
2015-12-29 12:16:41 +05:30
Guangcong Luo
2768569b5a Add Credits to main menu footer 2015-12-26 10:22:44 -05:00
Guangcong Luo
04a27253e3 Teambuilder: Properly support gen 1-2 learnsets
This also adds a cached learnset format to teambuilder-tables.js,
which replaces and is slightly smaller than learnsets.js and also
has slightly better performance.
2015-12-24 11:33:25 -05:00
Guangcong Luo
4981a223b0 Teambuilder: Improve past gen support
This is a large collection of changes that greatly improve past gen
support in the teambuilder.

- Tier lists are now compiled separately from each gen (build-indexes
  is really slow about this, which isn't particularly surprising),
  as well as for Doubles.

- Learnsets are now compiled separately from each gen. TODO: make an
  optimized learnsets.js with gen 1-2 support for client.

- Types in the pokemon list now account for old gens.

- Abilities no longer display in the pokemon list in gen 1-2

- SpA/SpD are replaced by Spc in the pokemon list in gen 1

Also included: A small optimization to the number of DOM nodes for the
teambuilder display, which should improve performance.
2015-12-24 11:33:25 -05:00
Guangcong Luo
a76b0b95ef Build: Minify pokedex.js + formats-data.js, moves.js
The client-relevant parts of formats-data.js have been combined into
pokedex.js. pokedex.js and moves.js are now minified on the client.
2015-12-22 12:11:40 -05:00
Guangcong Luo
7fa72c1d20 Convert teambuilder from utilichart.js to search.js
The teambuilder is now running on search.js! Not all new features I'd
like to be in are in, but we've now reached feature parity, and most
of the bugs I found during testing have been fixed.

New in search.js is on-demand DOM loading, which basically means
much faster performance because instead of trying to load every single
row of e.g. the pokemon list at once, we just load the part that's
visible, and load the rest only when you scroll it into view.

Also new in search.js is a dexsearch-like feature, replacing the old
details-search system. The new filter system is simpler and more powerful
and has the same API as /dexsearch, although not all the more advanced
dexsearch features are supported.

On-demand DOM loading makes teambuilder loading pretty much completely
instantaneous. There are other small differences in how selection of
pokemon/items/abilities/moves works, but it should overall make more
sense.
2015-12-22 00:06:27 -06:00
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