diff --git a/plugins/CoreHome/CoreHome.php b/plugins/CoreHome/CoreHome.php index 1d91185fa29d5673009cb8b1623cd9a7403c4533..d0361c571a9c1ca7c9fa7d98d4f9f3358b034928 100644 --- a/plugins/CoreHome/CoreHome.php +++ b/plugins/CoreHome/CoreHome.php @@ -78,8 +78,6 @@ class Piwik_CoreHome extends Piwik_Plugin $jsFiles[] = "plugins/CoreHome/templates/jqplot.js"; $jsFiles[] = "libs/jqplot/jqplot-custom.min.js"; - - $jsFiles[] = "plugins/CoreHome/templates/workarounds.js"; } } diff --git a/plugins/CoreHome/templates/workarounds.js b/plugins/CoreHome/templates/workarounds.js deleted file mode 100755 index 68f93aa28c24dedd3c3125ee65d6186a34cafaad..0000000000000000000000000000000000000000 --- a/plugins/CoreHome/templates/workarounds.js +++ /dev/null @@ -1,20 +0,0 @@ -/*! - * Piwik - Web Analytics - * - * @link http://piwik.org - * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -(function($){ - -// monkey patch that works around bug in some arc function of some browsers where -// nothing gets drawn if angles are exactly 2 * PI apart. -// affects some versions of chrome & IE 8 -var oldArc = CanvasRenderingContext2D.prototype.arc; -CanvasRenderingContext2D.prototype.arc = function(x, y, r, sAngle, eAngle, clockwise) { - if (Math.abs(sAngle - eAngle) === Math.PI * 2) - eAngle -= 0.000001; - oldArc.call(this, x, y, r, sAngle, eAngle, clockwise); -}; - -}(jQuery)); diff --git a/themes/default/common.js b/themes/default/common.js index 3f908e3ba7b00ef68d0d11a44dd29e3c384d07cb..bae4d708a6f43db470dc657c36c2e640613a0d93 100644 --- a/themes/default/common.js +++ b/themes/default/common.js @@ -337,3 +337,20 @@ function isEnterKey(e) { return (window.event?window.event.keyCode:e.which)==13; } + +// workarounds +(function($){ +try { // this code is not vital, so we make sure any errors are ignored + +// monkey patch that works around bug in arc function of some browsers where +// nothing gets drawn if angles are exactly 2 * PI apart. +// affects some versions of chrome & IE 8 +var oldArc = CanvasRenderingContext2D.prototype.arc; +CanvasRenderingContext2D.prototype.arc = function(x, y, r, sAngle, eAngle, clockwise) { + if (Math.abs(sAngle - eAngle) === Math.PI * 2) + eAngle -= 0.000001; + oldArc.call(this, x, y, r, sAngle, eAngle, clockwise); +}; + +} catch (e) {} +}(jQuery));