add opera to supported browsers, help user activating web sockets

This commit is contained in:
Thibault Duplessis 2012-09-23 14:41:58 +02:00
parent aa4a29d7ad
commit 5f3be824fa
4 changed files with 24 additions and 11 deletions

View file

@ -6,23 +6,26 @@
<div style='width: 75px; float: left;'> <div style='width: 75px; float: left;'>
<img src='http://www.ie6nomore.com/files/theme/ie6nomore-warning.jpg' alt='Warning!'/> <img src='http://www.ie6nomore.com/files/theme/ie6nomore-warning.jpg' alt='Warning!'/>
</div> </div>
<div style='width: 630px; margin-right: 15px; float: left; font-family: Arial, sans-serif;'> <div style='width: 550px; margin-right: 15px; float: left; font-family: Arial, sans-serif;'>
<div style='font-size: 16px; font-weight: bold; margin-top: 10px;'> <div style='font-size: 16px; font-weight: bold; margin-top: 10px;'>
Your browser cannot run Lichess! Your browser cannot run Lichess!
</div> </div>
<div style='font-size: 13px; margin-top: 6px; line-height: 12px;'> <div style='font-size: 13px; margin-top: 6px; line-height: 12px;'>
We're sorry, but your browser does not support WebSockets.<br /> Sorry, but your browser does not support WebSockets.<br />
In order to play, we recommend using the latest version of Firefox, Chrome or Safari. We recommend using the latest version of Firefox, Chrome, Safari or Opera.
</div> </div>
</div> </div>
<div style='width: 80px; float: left;'> <div style='width: 80px; float: left;'>
<a href='http://www.getfirefox.com' target='_blank'><img src='assets/images/browser-firefox.png' style='border: none;' alt='Get Firefox'/></a> <a href='http://www.mozilla.org/firefox' target='_blank'><img src='/assets/images/browser-firefox.png' style='border: none;' alt='Get Firefox'/></a>
</div> </div>
<div style='width: 80px; float: left;'> <div style='width: 80px; float: left;'>
<a href='http://www.google.com/chrome' target='_blank'><img src='assets/images/browser-chrome.png' style='border: none;' alt='Get Google Chrome'/></a> <a href='http://www.google.com/chrome' target='_blank'><img src='/assets/images/browser-chrome.png' style='border: none;' alt='Get Google Chrome'/></a>
</div> </div>
<div style='width: 80px; float: left;'> <div style='width: 80px; float: left;'>
<a href='http://www.apple.com/safari/download/' target='_blank'><img src='assets/images/browser-safari.png' style='border: none;' alt='Get Safari'/></a> <a href='http://www.apple.com/safari/download/' target='_blank'><img src='/assets/images/browser-safari.png' style='border: none;' alt='Get Safari'/></a>
</div>
<div style='width: 80px; float: left;'>
<a href='http://www.opera.com/download/' target='_blank'><img src='/assets/images/browser-opera.png' style='border: none;' alt='Get Opera'/></a>
</div> </div>
</div> </div>
</div> </div>

View file

@ -46,7 +46,12 @@ lichess.socketDefaults.options.debug = !lichess.onProduction;
$(function() { $(function() {
if (!$.websocket.available) { if (!$.websocket.available) {
$.ajax('/assets/browser.html', { success: function(html) { $('body').prepend(html); } }); if (window.opera) {
var inUrFaceUrl = '/assets/opera-websocket.html';
} else {
var inUrFaceUrl = '/assets/browser.html';
}
$.ajax(inUrFaceUrl, { success: function(html) { $('body').prepend(html); } });
} }
// Start game // Start game

View file

@ -0,0 +1,9 @@
<div style='z-index: 999999; border: 1px solid #F7941D; padding: 5px 0 0 5px; background: #FEEFDA; text-align: center; clear: both; height: 75px; position: absolute;top:0;right:0'>
<div style='width: 970px; margin: 0 auto; text-align: left; padding: 0; overflow: hidden; color: black;'>
<p>Thank you for using Opera! Now you need to enable WebSockets:</p>
<br />
<p>1. Go to <a href="opera:config#Enable%20WebSockets" target="_blank"><i>opera:config#Enable%20WebSockets</i></a>.</p>
<p>2. Tick the checkbox <i>“Enable WebSockets”</i> under User Prefs.</p>
<p>3. Click Save button and restart Opera.</p>
</div>
</div>

4
todo
View file

@ -34,15 +34,11 @@ possible timeout bug http://en.lichess.org/forum/lichess-feedback/possible-timeo
add elo titles (like 2300+ = FM) add elo titles (like 2300+ = FM)
tournament replace game->tour redirect with big link tournament replace game->tour redirect with big link
tournament berserker = half time, double points tournament berserker = half time, double points
add opera to supported browsers
detected opera but no websockets = help message
chat icons (k) (K) chat icons (k) (K)
blind accessible blind accessible
home anon replace chat with mini boards
make hand and finisher actors to avoid racing conditions make hand and finisher actors to avoid racing conditions
tournament monitor tournament monitor
all hub members should use userIds rather than usernames all hub members should use userIds rather than usernames
add opera to list of supported browsers (with websocket trick)
tournament ties tournament ties
tournament detect leavers and withdraw them (started) (also use force resign) tournament detect leavers and withdraw them (started) (also use force resign)
-> or show current tournament on every page, with (join) and (redraw) buttons -> or show current tournament on every page, with (join) and (redraw) buttons