Skip to content

Instantly share code, notes, and snippets.

@atishgoswami
Last active December 18, 2015 19:09
Show Gist options
  • Save atishgoswami/5830752 to your computer and use it in GitHub Desktop.
Save atishgoswami/5830752 to your computer and use it in GitHub Desktop.
Fix sahi to work with firefox 21
//Open sahi/htdocs/spr/concat.js
//and look for:
Sahi.prototype._isFF2 = function () {return /Firefox\/2|Iceweasel\/2|Shiretoko\/2/.test(this.navigator.userAgent);};
Sahi.prototype._isFF3 = function () {return /Firefox\/3|Iceweasel\/3|Shiretoko\/3/.test(this.navigator.userAgent);};
Sahi.prototype._isFF4 = function () {return /Firefox\/4|Iceweasel\/4|Shiretoko\/4/.test(this.navigator.userAgent);};
Sahi.prototype._isFF5 = function () {return /Firefox\/5|Iceweasel\/5|Shiretoko\/5/.test(this.navigator.userAgent);};
//and replace it with
Sahi.prototype._isFF2 = function () {return /Firefox\/2[.]|Iceweasel\/2[.]|Shiretoko\/2[.]/.test(this.navigator.userAgent);};
Sahi.prototype._isFF3 = function () {return /Firefox\/3[.]|Iceweasel\/3[.]|Shiretoko\/3[.]/.test(this.navigator.userAgent);};
Sahi.prototype._isFF4 = function () {return /Firefox\/4[.]|Iceweasel\/4[.]|Shiretoko\/4[.]/.test(this.navigator.userAgent);};
Sahi.prototype._isFF5 = function () {return /Firefox\/5[.]|Iceweasel\/5[.]|Shiretoko\/5[.]/.test(this.navigator.userAgent);};
//restart sahi and clear cache of browser....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment