Skip to content

Commit

Permalink
Bug 732445: Make the game playable in Opera when WebSockets are enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
glecollinet committed Mar 24, 2012
1 parent bacd714 commit a6234bf
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
10 changes: 10 additions & 0 deletions client/css/main.css
Expand Up @@ -1220,3 +1220,13 @@ footer, header, hgroup, menu, nav, section {
.windows #parchment, .windows #parchment input, .windows #notifications, .windows #instructions, .windows #achievements, .windows #achievement-notification,
.windows #playercount, .windows #credits, .windows #loadcharacter, .windows #confirmation, .windows #death, .windows #error, .windows #about,
.windows #parchment p, .windows #portrait p, .windows .alert, .windows footer, .windows .bubble p, .windows #population {font-family:'AdvoCut';}

/* Workarounds for opera's lack of pointer-events support */

.opera.intro #bubbles, .opera.intro #canvas, .opera.intro #container { z-index: -30000;}
.opera .credits #credits, .opera .createcharacter #createcharacter, .opera .loadcharacter #loadcharacter, .opera .confirmation #confirmation, .opera .death #death,
.opera .error #error, .opera .about #about { z-index: 30000; }
.opera #instructions, .opera #achievements { z-index: -30000;}
.opera #achievements.active, .opera #instructions.active { z-index: 30000;}
.opera #coinsparks {display:none;}
.opera #death, .opera #about, .opera #credits, .opera #error, .opera #confirmation, .opera #loadcharacter { z-index: -30000; }
2 changes: 0 additions & 2 deletions client/index.html
Expand Up @@ -206,8 +206,6 @@ <h1>
<div class="parchment-right"></div>
</section>
</div>
<div id="mask"></div>
<!--<div style="font-family:Ladybug;"></div>-->
<div id="container">
<div id="canvasborder">
<article id="instructions" class="clickable">
Expand Down
4 changes: 4 additions & 0 deletions client/js/detect.js
Expand Up @@ -33,4 +33,8 @@ Detect.canPlayMP3 = function() {

Detect.isSafari = function() {
return Detect.userAgentContains('Safari') && !Detect.userAgentContains('Chrome');
};

Detect.isOpera = function() {
return Detect.userAgentContains('Opera');
};
5 changes: 5 additions & 0 deletions client/js/main.js
Expand Up @@ -11,6 +11,11 @@ define(['jquery', 'app'], function($, App) {
// Workaround for graphical glitches on text
$('body').addClass('windows');
}

if(Detect.isOpera()) {
// Fix for no pointer events
$('body').addClass('opera');
}

$('body').click(function(event) {
if($('#parchment').hasClass('credits')) {
Expand Down

0 comments on commit a6234bf

Please sign in to comment.