summaryrefslogtreecommitdiffstats
path: root/core/js/js.js
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-07-29 16:52:09 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-07-29 17:51:38 +0200
commit2781fdeed8f1d45ebba23fb2b2e22aa3bbd5f2ff (patch)
tree6a1684774be872cd00e610ae4ef4ab63f18de702 /core/js/js.js
parentdee7fb3b722388c30a5ca3e69fb3cf846bb48edf (diff)
downloadnextcloud-server-2781fdeed8f1d45ebba23fb2b2e22aa3bbd5f2ff.tar.gz
nextcloud-server-2781fdeed8f1d45ebba23fb2b2e22aa3bbd5f2ff.zip
automatically replace svg images with png for browsers that dont support svg
Diffstat (limited to 'core/js/js.js')
-rw-r--r--core/js/js.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 407c5708701..db96a1adb3e 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -103,3 +103,13 @@ if (!Array.prototype.indexOf){
function SVGSupport() {
return document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") || document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Shape", "1.0");
}
+
+$(document).ready(function(){
+ if(!SVGSupport()){//replace all svg images with png images for browser that dont support svg
+ $('img.svg').each(function(index,element){
+ element=$(element);
+ var src=element.attr('src');
+ element.attr('src',src.substr(0,src.length-3)+'png');
+ });
+ };
+});