diff mercurial/templates/static/mercurial.js @ 17694:fa714f3ed298

hgweb: change IE canvas test (issue3639) suggested by Peter Hull
author Matt Mackall <mpm@selenic.com>
date Mon, 01 Oct 2012 23:05:02 -0500
parents 6e4de55a41a4
children c3cdba6e5d7f
line wrap: on
line diff
--- 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)';