From 58e27ae136227abb76678f9052c7fb3e320f8873 Mon Sep 17 00:00:00 2001 From: Eoghan Murray Date: Wed, 19 Oct 2016 13:26:51 +0100 Subject: [PATCH] Don't need to fix SVGs for Chrome since version 50 --- fixsvgstack.jquery.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fixsvgstack.jquery.js b/fixsvgstack.jquery.js index fa439da..cac5580 100644 --- a/fixsvgstack.jquery.js +++ b/fixsvgstack.jquery.js @@ -6,7 +6,9 @@ // The fix is for webkit browsers only // [https://bugs.webkit.org/show_bug.cgi?id=91790]() - if(!(/WebKit/.test(navigator.userAgent))) { + if(!(/WebKit/.test(navigator.userAgent) && + (!(/Chrome\/[0-9]+\./).test(navigator.userAgent) || parseInt(navigator.userAgent.match(/Chrome\/([0-9]+)\./)[1], 10) < 50) + )) { // return functions that do nothing but support chaining $.fn.fixSVGStack = function() { return this; }; $.fn.fixSVGStackBackground = function() { return this; };