From e25e3ecc5f7583c7ddcddedbf71884e0a0159283 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 17 Jul 2020 18:09:30 +0000 Subject: [PATCH] Bug 26011: Remove unused jQuery plugin jquery.metadata.min.js from the OPAC The jQuery plugin jquery.metadata.min.js hasn't been used in Koha in long time. This patch removes it from the OPAC. To test, apply the patch and search for instances of "jquery.metadata." There should be none. Signed-off-by: Lucas Gass --- .../opac-tmpl/bootstrap/lib/jquery/plugins/jquery.metadata.min.js | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 koha-tmpl/opac-tmpl/bootstrap/lib/jquery/plugins/jquery.metadata.min.js diff --git a/koha-tmpl/opac-tmpl/bootstrap/lib/jquery/plugins/jquery.metadata.min.js b/koha-tmpl/opac-tmpl/bootstrap/lib/jquery/plugins/jquery.metadata.min.js deleted file mode 100644 index d9370d5d24..0000000000 --- a/koha-tmpl/opac-tmpl/bootstrap/lib/jquery/plugins/jquery.metadata.min.js +++ /dev/null @@ -1,8 +0,0 @@ -(function($){$.extend({metadata:{defaults:{type:'class',name:'metadata',cre:/({.*})/,single:'metadata'},setType:function(type,name){this.defaults.type=type;this.defaults.name=name;},get:function(elem,opts){var settings=$.extend({},this.defaults,opts);if(!settings.single.length)settings.single='metadata';var data=$.data(elem,settings.single);if(data)return data;data="{}";var getData=function(data){if(typeof data!="string")return data;if(data.indexOf('{')<0){data=eval("("+data+")");}} -var getObject=function(data){if(typeof data!="string")return data;data=eval("("+data+")");return data;} -if(settings.type=="html5"){var object={};$(elem.attributes).each(function(){var name=this.nodeName;if(name.match(/^data-/))name=name.replace(/^data-/,'');else return true;object[name]=getObject(this.nodeValue);});}else{if(settings.type=="class"){var m=settings.cre.exec(elem.className);if(m) -data=m[1];}else if(settings.type=="elem"){if(!elem.getElementsByTagName)returnvar;e=elem.getElementsByTagName(settings.name);if(e.length) -data=$.trim(e[0].innerHTML);}else if(elem.getAttribute!=undefined){var attr=elem.getAttribute(settings.name);if(attr) -data=attr;} -object=getObject(data.indexOf("{")<0?"{"+data+"}":data);} -$.data(elem,settings.single,object);return object;}}});$.fn.metadata=function(opts){return $.metadata.get(this[0],opts);};})(jQuery); \ No newline at end of file -- 2.11.0