jquery.mb.ytplayer
Version:
This plugin let you play any public YouTube video as background of your page. It can also be used as a customized player in page.
24 lines (22 loc) • 3.87 kB
JavaScript
/*___________________________________________________________________________________________________________________________________________________
_ jquery.mb.components _
_ _
_ file: jquery.mb.storage.min.js _
_ last modified: 24/05/15 16.08 _
_ _
_ Open Lab s.r.l., Florence - Italy _
_ _
_ email: matteo@open-lab.com _
_ site: http://pupunzi.com _
_ http://open-lab.com _
_ blog: http://pupunzi.open-lab.com _
_ Q&A: http://jquery.pupunzi.com _
_ _
_ Licences: MIT, GPL _
_ http://www.opensource.org/licenses/mit-license.php _
_ http://www.gnu.org/licenses/gpl.html _
_ _
_ Copyright (c) 2001-2015. Matteo Bicocchi (Pupunzi); _
___________________________________________________________________________________________________________________________________________________*/
(function(d){d.mbCookie={set:function(a,c,f,b){"object"==typeof c&&(c=JSON.stringify(c));b=b?"; domain="+b:"";var e=new Date,d="";0<f&&(e.setTime(e.getTime()+864E5*f),d="; expires="+e.toGMTString());document.cookie=a+"="+c+d+"; path=/"+b},get:function(a){a+="=";for(var c=document.cookie.split(";"),d=0;d<c.length;d++){for(var b=c[d];" "==b.charAt(0);)b=b.substring(1,b.length);if(0==b.indexOf(a))try{return JSON.parse(b.substring(a.length,b.length))}catch(e){return b.substring(a.length,b.length)}}return null},
remove:function(a){d.mbCookie.set(a,"",-1)}};d.mbStorage={set:function(a,c){"object"==typeof c&&(c=JSON.stringify(c));localStorage.setItem(a,c)},get:function(a){if(localStorage[a])try{return JSON.parse(localStorage[a])}catch(c){return localStorage[a]}else return null},remove:function(a){a?localStorage.removeItem(a):localStorage.clear()}}})(jQuery);