Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added a hack to sort of handle at least some mobile devices

  • Loading branch information...
commit cfad4d5bbee1564b6e5e2a6c834382b967b8b697 1 parent a80e48e
Andreas Lundgren authored
Showing with 5 additions and 29 deletions.
  1. +5 −17 WfAssist/Scripts/wf.js
  2. +0 −12 WfAssist/Views/Home/Index.cshtml
22 WfAssist/Scripts/wf.js
View
@@ -1,21 +1,9 @@
-function debugViewport() {
- $("#window-height").html(document.documentElement.clientHeight);
- $("#window-width").html(document.documentElement.clientWidth);
- $("#window-inner-height").html(window.innerHeight);
- $("#window-inner-width").html(window.innerWidth);
- $("#window-x-offset").html(window.pageXOffset);
- $("#window-y-offset").html(window.pageYOffset);
- $("#screen-width").html(screen.width);
- $("#screen-height").html(screen.height);
- if(screen.width < 500) {
- $("#container").width(screen.width - 5);
+$(document).ready(function () {
+ if (screen.width <= 800) {
+ //HACK:Should really be adaptive but I give up. Damn htc browser is just determined to pretend it
+ //has a huge viewport (reports 800 screen.width, innerWidth, width all report lies)
+ $("#container").width(300);
}
-}
-$(document).ready(function () {
- debugViewport();
- $(window).resize(function () {
- debugViewport();
- });
$("#user-agent").html(navigator.userAgent);
$("#tabs").tabs();
$("#lang-radio-set").buttonset();
12 WfAssist/Views/Home/Index.cshtml
View
@@ -38,7 +38,6 @@
<ul>
<li><a href="#tabs-findwords">Find Words</a></li>
<li><a href="#tabs-help">Help</a></li>
- <li><a href="#tabs-debug">Debug</a></li>
</ul>
<div id="tabs-findwords">
<article>
@@ -108,17 +107,6 @@
</tbody>
</table>
</div>
- <div id="tabs-debug">
- documentElement.width: <span id="window-width"></span><br/>
- documentElement.height: <span id="window-height"></span><br/>
- window.innerWidth: <span id="window-inner-width"></span><br/>
- window.innerHeight: <span id="window-inner-height"></span><br/>
- window.pageXOffset: <span id="window-x-offset"></span><br/>
- window.pageYOffset: <span id="window-y-offset"></span><br/>
- screen.width: <span id="screen-width"></span><br/>
- screen.height: <span id="screen-height"></span><br/>
- User Agent: <span id="user-agent"></span>
- </div>
</div>
<footer>
<ul>
Please sign in to comment.
Something went wrong with that request. Please try again.