0

This page, which implements a JavaScript-based online solver for Freecell, does not work in Microsoft Internet Explorer 8 (and possibly below) on my Windows XP 32-bit virtual machine. It works fine in Firefox on the same virtual machine, as well as on Firefox 17.0.2 ESR, Opera and Google Chromium on my x86-64 Mageia Linux 3 system.

To reproduce:

  • Type "2" in the deal number.

  • Press "Populate".

  • Press "Solve".

MSIE 8 throws a fit and claims that "FC_Solve" is not defined, but it is in http://www.shlomifish.org/fc-solve-temp/js/web-fc-solve.js which is included above it and sourced using a script.

I wish I could have dropped support from old versions of MSIE in that page, but I want it to be as idiot-proof as possible, because that was part of the motivation in me creating an online, JavaScript-based, version of my solver, which is written in C. That's because some people asked me to manually solve deals from them because they lacked the know-how to install and run my solver themselves.

How can I fix it?

ThiefMaster
  • 310,957
  • 84
  • 592
  • 636
Shlomi Fish
  • 4,380
  • 3
  • 23
  • 27
  • 2
    It doesn't even work in IE9. Besides that, there is just no good reason to support oldIE with an application like that. – ThiefMaster Jan 19 '13 at 13:03
  • @ThiefMaster: the problem is that there's http://en.wikipedia.org/wiki/FreeCell_%28Windows%29 which ships as part of Windows and many Windows users with locked-down corporate/military/etc. environments tend to play because they are not allowed to install other games. And such environments may also prevent them from using non-MSIE or newer MSIE browsers. – Shlomi Fish Jan 19 '13 at 13:26

1 Answers1

1

IE<=9 does not support typed arrays (Uint8Array etc.) which libfreecellsolver.js seems to use. That most likely prevents it from running on any IE not supporting typed arrays.

Besides that, you want String instead of string:

if (!string.prototype.repeat) {
string.prototype.repeat = function(count) {
ThiefMaster
  • 310,957
  • 84
  • 592
  • 636
  • Thanks for the note regarding the string.prototype thing. It was caused due to a Vim SNAFU (I keep pressing "u" in selection-mode instead of "y", which makes it lowercase.) It is corrected now, but I'm not sure I used .repeat there. Thanks for the answer regarding typed arrays. I'll investigate and see if emscripten can generate IE-compatible code (or alternatively somehow detect MSIE and tell people to switch to a better browser). – Shlomi Fish Jan 19 '13 at 13:18