73 Commits

Author SHA1 Message Date
Jon Atkins
ab3bdcef30 don't treat names resolved from old chat messages as certain - only new ones
this prevents people having a name change from getting inconsistant results as old/new messages are seen
fix #393
2013-06-26 15:15:32 +01:00
Jon Atkins
0b75b49b98 change the callback from resuming from idle, so it starts a short refresh timeout as if the map had just moved
this way, if you switch back to IITC, then quickly move/zoom (as often is done), unnecessary network requests are avoided
because of the change, there's no need for chat to have it's own resume hook - it already hooks into the refresh code and this is now triggered quickly
2013-06-15 23:29:16 +01:00
Jon Atkins
508c2543f4 only clear and refresh past chat messages if the bounding box has changed by over 10% - reduces network requests for chat data after small map movements 2013-06-07 05:35:18 +01:00
Philipp Schaefer
f7bd510aae fixed debug console on desktop mode 2013-05-29 11:21:13 +02:00
Jon Atkins
5430992d70 improvements to date formatting
- leading zeros on month/day
- milliseconds in chat tooltips
2013-05-26 19:29:48 +01:00
Jon Benson
4906b57f15 Hopefully fix whitespace issues. 2013-05-07 19:05:50 +10:00
Jon Benson
935e9ab688 Fixed style overriding css to hide chat control tabs. 2013-05-07 18:15:41 +10:00
Jon Benson
b110ff0261 Fix status div showing above chat. 2013-05-07 17:33:26 +10:00
Jon Benson
1a701e5a32 Further bugfixes related to chat/debug. 2013-05-07 15:21:05 +10:00
Jon Benson
0108d1b49c Added debug menu option and started tidying up 'window' handling 2013-05-07 14:09:30 +10:00
Jon Benson
7e2087da63 Redesigned IITC Mobile to use ActionBar menu instead of web based tabs. 2013-05-06 22:31:50 +10:00
Kevin
79af80d0c3 More updates to url links to be compatible with stock intel map 2013-04-30 22:33:07 -07:00
Kevin
6b04ee4939 Don't modify nicknameClicked function, pull name in event calling function 2013-04-16 15:04:26 -07:00
Kevin
eb7d021449 Double space issue when clicking a nickname with a space already present in chat 2013-04-14 19:35:30 -07:00
Kevin
aa6581fb85 Make any nickname class element clickible to fill @ nick in chat 2013-04-14 19:35:27 -07:00
Jon Atkins
9b4eaaf4e8 Merge branch 'master' of https://github.com/vbfox/ingress-intel-total-conversion 2013-04-11 16:19:35 +01:00
Julien Roncaglia
f13985b1f9 Fix clicking on cited player name inserting the nickname without '@' in the chat 2013-04-10 07:14:09 +02:00
Jon Atkins
0d51e045a0 disable input "keydown" on smartphones - it's redundant there (no tab key), breaks input editing, and has some impact on performance
fix #138
2013-04-10 04:07:20 +01:00
Julien Roncaglia
1a8d15d1c5 Add 2 new hooks: geoSearch and nicknameClicked
For both of them returning false will interupt the default action

'geoSearch' is called when something is entered in the search box.
The argument is the string entered in the search box

'nicknameClicked' is called when a nickname is cliked.
The argument is an object with 2 properties:
 - 'event' contain the standard event object
 - 'nickname' contain the nick of the user
2013-04-09 22:40:34 +02:00
Jon Atkins
baaaf3e3f1 remove unnecessary absolute URLs. site-relative are used where possible (e.g. permalinks, rpc calls) - and a couple of protocol-relative one for automatic http/https matching 2013-04-08 05:09:01 +01:00
Jon Atkins
f48aca8864 more chat changes
- remove public @mentions from the faction chat channel
- add default case to chat text handling. if a new message fragment type is added, at least something will be shown in chat instead of being blank (as happened when AT_PLAYER was first introduced)
- highlight your own player name in the chat column in yellow for things you said/actions performed - similar to @mentions from other players
2013-04-05 23:58:55 +01:00
Jon Atkins
a2a9d3458d add highlight to SYSTEM_NARROWCAST (your X on Y was destroyed by Z) messages 2013-04-05 00:36:38 +01:00
Jon Atkins
3a37667a7c chat - oldest/newest timestamp handling rewrite
this fixes an issue that, in theory, could have occured with the public chat fetching and over 200 sequential skipped ([secure]) messages. the recent change to skip SYSTEM_NARROWCAST for faction chat was much more likely to trigger the same issue
also
- lighten the red colour used in public chat - was almost impossible to read before
- set the faction chat message count to 100 (it was 50, then bumpped to 200 briefly to work around chat issues)
2013-04-05 00:07:54 +01:00
Jon Atkins
77cdac87df remove "your X on Y was destroyed by Z" messages from faction chat - #121 2013-04-04 16:56:07 +01:00
Jon Atkins
3a8ea9161b fix chat player highlighting
- clicking on names now inserts them
- fix: if your name was @mentioned, followed by another @player, it didn't mark the line
2013-04-01 19:11:25 +01:00
Jon Atkins
4b3e84ce51 merge #86, with some tweaks in the case AT_PLAYER area so it's cleaner 2013-03-28 23:32:46 +00:00
Jon Atkins
ee4be2503e Merge pull request #30 from teo96/master
#issue 29 : add nickname in the chat textbox when I click on it
2013-03-23 07:41:25 -07:00
Stefan Breunig
5a283759cc I said “FIX #31” 2013-03-22 19:37:35 +01:00
Stefan Breunig
3684e64847 fix #31 2013-03-22 19:00:28 +01:00
Jon Atkins
6f870a2b58 quick fix for #24 - handle AT_PLAYER like TEXT in chat 2013-03-22 14:33:10 +00:00
teo96
a32adf6e6c issue#29 add player name in chat box when click on it 2013-03-22 15:18:25 +01:00
Bruno Barão
a0bc896559 Add a new hook after receiving new faction messages 2013-03-12 12:33:44 +00:00
vita10gy
a189fab9c4 nits 2013-03-09 09:47:22 -06:00
vita10gy
9cd15edc54 USPS Chat Log - Take 5 2013-03-09 01:38:45 -06:00
Stefan Breunig
17c6227412 don’t use reserved keyword in JS as variable 2013-03-08 12:29:36 +01:00
Stefan Breunig
1e2935c018 don’t try to request more chat messages when no chat is active. This only affected smartphones. 2013-03-08 10:46:52 +01:00
Stefan Breunig
94190bd900 color text in red for public chat (see #73) 2013-03-08 09:14:41 +01:00
boombuler
971cbef11f add "nickname" class to all nicknames within the page 2013-03-01 22:11:04 +01:00
Daniel Cheng
07cb3c2f49 Add href link in chat msg 2013-02-27 14:41:39 +08:00
Stefan Breunig
044b5f2147 add hook for chat data 2013-02-18 11:12:26 +01:00
Stefan Breunig
70ff64fd1c fix missing space in divider 2013-02-16 11:06:03 +01:00
Stefan Breunig
5445006d5a make chat copy&paste friendly again 2013-02-16 10:56:58 +01:00
Stefan Breunig
6d41221131 finish changes for #179. Fixes #179, fixes #49.
Please look for regressions.
2013-02-16 10:46:02 +01:00
Stefan Breunig
cf17fef699 maybe fix #152 (haven’t checked) 2013-02-13 16:28:20 +01:00
Stefan Breunig
fbd892e88d also show anonymous messages such as 'field decyed'. Fixes #145 2013-02-13 12:36:06 +01:00
Stefan Breunig
164d067d4a fix scroll back issues for public chats 2013-02-13 12:35:51 +01:00
Stefan Breunig
79b917c8f1 divider bar too short 2013-02-13 03:22:01 +01:00
Stefan Breunig
360f6f8336 rework chat handling completely
The old system was getting too complicated to add new features to.
The new one should be easier to understand and will be explained
below. This patch should fix #140 and fix #16.

There are several places where new data requests may come from:
- chat.needMoreMessages checks if we are scrolled too far up or
  there is no scrollbar. It then requests new messages.
- scrolling up
- switching the chat tab via chat.chooser
- auto refresh
- once on boot
The latter two always request both types of chat.

Faction and public are handled the same way. Public is later split
into categories. I will explain the faction chat here because it’s
easier.

It starts in chat.requestFaction. This will initialize the query to
the server for data. The exact query is determined by chat.
genPostData. There can only be one faction chat request at a time.
Clearing on map move is handled automatically in code/requests.js.

Let’s assume the data query is successful. It is now passed to
chat.handleFaction which runs some basic checks before the data is
processed and stored in chat._factionData. This is done by chat.
writeDataToHash. The hash keys are the message GUIDs to avoid
duplicates. The hash values are an array of timestamp, processed
message and other meta data.

There is only one way to render faction chat, so data is directly
handed to chat.renderFaction which immediately hands it to chat
.renderData. renderData discards the GUIDs and sorts the values
by their timestamp. It then iterates over the data to insert
date break lines and finally renders the data in the DOM. It also
does some magic to keep the correct scrolling position.

Chat data will be cleared on map move or zoom. However, the
display is not refreshed, so the old, invalid chat data is still
displayed. Only once the data query is finished the data is
rendered. The upside is that small map operations within your
local area appear to never lose their chat data. Downside is that
there’s invalid chat for some time when changing cities.
2013-02-13 02:52:27 +01:00
Stefan Breunig
847a3d5fc1 warn when chat message didn’t make it but the server actually send a response 2013-02-12 23:22:45 +01:00
Stefan Breunig
0d0bd4b26a fix indenting 2013-02-12 23:12:28 +01:00