hgweb: change IE canvas test (issue3639)
authorMatt Mackall <mpm@selenic.com>
Mon, 01 Oct 2012 23:05:02 -0500
changeset 17694 fa714f3ed298
parent 17693 0c6de45e1212
child 17699 0696b1793f4b
child 17700 5b1b0e4e6902
child 17710 95d29533e2ee
hgweb: change IE canvas test (issue3639) suggested by Peter Hull
mercurial/templates/static/mercurial.js
--- a/mercurial/templates/static/mercurial.js	Sun Sep 30 23:53:56 2012 +0200
+++ b/mercurial/templates/static/mercurial.js	Mon Oct 01 23:05:02 2012 -0500
@@ -25,7 +25,7 @@
 function Graph() {
 	
 	this.canvas = document.getElementById('graph');
-	if (navigator.userAgent.indexOf('MSIE') >= 0) this.canvas = window.G_vmlCanvasManager.initElement(this.canvas);
+	if (window.G_vmlCanvasManager) this.canvas = window.G_vmlCanvasManager.initElement(this.canvas);
 	this.ctx = this.canvas.getContext('2d');
 	this.ctx.strokeStyle = 'rgb(0, 0, 0)';
 	this.ctx.fillStyle = 'rgb(0, 0, 0)';