Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Bug 732445: Make the game playable in Opera when WebSockets are enabled

  • Loading branch information...
commit a6234bfde64a56c9e6ead655566e952d7af8ede4 1 parent bacd714
Guillaume Lecollinet authored March 24, 2012
10  client/css/main.css
@@ -1220,3 +1220,13 @@ footer, header, hgroup, menu, nav, section {
1220 1220
     .windows #parchment, .windows #parchment input, .windows #notifications, .windows #instructions, .windows #achievements, .windows #achievement-notification, 
1221 1221
     .windows #playercount, .windows #credits, .windows #loadcharacter, .windows #confirmation, .windows #death, .windows #error, .windows #about, 
1222 1222
     .windows #parchment p, .windows #portrait p, .windows .alert, .windows footer, .windows .bubble p, .windows #population {font-family:'AdvoCut';}
  1223
+
  1224
+/* Workarounds for opera's lack of pointer-events support */
  1225
+
  1226
+    .opera.intro #bubbles, .opera.intro #canvas, .opera.intro #container { z-index: -30000;}
  1227
+    .opera .credits #credits, .opera .createcharacter #createcharacter, .opera .loadcharacter #loadcharacter, .opera .confirmation #confirmation, .opera .death #death, 
  1228
+    .opera .error #error, .opera .about #about { z-index: 30000; }
  1229
+    .opera #instructions, .opera #achievements { z-index: -30000;}
  1230
+    .opera #achievements.active, .opera #instructions.active { z-index: 30000;}
  1231
+    .opera #coinsparks {display:none;}
  1232
+    .opera #death, .opera #about, .opera #credits, .opera #error, .opera #confirmation, .opera #loadcharacter { z-index: -30000; }
2  client/index.html
@@ -206,8 +206,6 @@ <h1 id="logo">
206 206
 	            <div class="parchment-right"></div>
207 207
 	        </section>
208 208
 	    </div>
209  
-	    <div id="mask"></div>
210  
-		<!--<div style="font-family:Ladybug;"></div>-->
211 209
 		<div id="container">
212 210
 		    <div id="canvasborder">
213 211
 		        <article id="instructions" class="clickable">
4  client/js/detect.js
@@ -33,4 +33,8 @@ Detect.canPlayMP3 = function() {
33 33
 
34 34
 Detect.isSafari = function() {
35 35
     return Detect.userAgentContains('Safari') && !Detect.userAgentContains('Chrome');
  36
+};
  37
+
  38
+Detect.isOpera = function() {
  39
+    return Detect.userAgentContains('Opera');
36 40
 };
5  client/js/main.js
@@ -11,6 +11,11 @@ define(['jquery', 'app'], function($, App) {
11 11
                 // Workaround for graphical glitches on text
12 12
                 $('body').addClass('windows');
13 13
             }
  14
+            
  15
+            if(Detect.isOpera()) {
  16
+                // Fix for no pointer events
  17
+                $('body').addClass('opera');
  18
+            }
14 19
         
15 20
             $('body').click(function(event) {
16 21
                 if($('#parchment').hasClass('credits')) {

0 notes on commit a6234bf

Please sign in to comment.
Something went wrong with that request. Please try again.