~ubuntu-branches/debian/sid/r-cran-rmarkdown/sid

« back to all changes in this revision

Viewing changes to debian/js/classList.js/classList.min.js

  • Committer: Package Import Robot
  • Author(s): Andreas Tille
  • Date: 2018-01-31 10:33:10 UTC
  • Revision ID: package-import@ubuntu.com-20180131103310-gqj6w22wr9x1rd5z
Tags: 1.8+dfsg-1
Initial release (closes: #884115)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */
 
2
if("document" in self){if(!("classList" in document.createElement("_"))||document.createElementNS&&!("classList" in document.createElementNS("http://www.w3.org/2000/svg","g"))){(function(j){if(!("Element" in j)){return}var a="classList",f="prototype",m=j.Element[f],b=Object,k=String[f].trim||function(){return this.replace(/^\s+|\s+$/g,"")},c=Array[f].indexOf||function(q){var p=0,o=this.length;for(;p<o;p++){if(p in this&&this[p]===q){return p}}return -1},n=function(o,p){this.name=o;this.code=DOMException[o];this.message=p},g=function(p,o){if(o===""){throw new n("SYNTAX_ERR","The token must not be empty.")}if(/\s/.test(o)){throw new n("INVALID_CHARACTER_ERR","The token must not contain space characters.")}return c.call(p,o)},d=function(s){var r=k.call(s.getAttribute("class")||""),q=r?r.split(/\s+/):[],p=0,o=q.length;for(;p<o;p++){this.push(q[p])}this._updateClassName=function(){s.setAttribute("class",this.toString())}},e=d[f]=[],i=function(){return new d(this)};n[f]=Error[f];e.item=function(o){return this[o]||null};e.contains=function(o){return ~g(this,o+"")};e.add=function(){var s=arguments,r=0,p=s.length,q,o=false;do{q=s[r]+"";if(!~g(this,q)){this.push(q);o=true}}while(++r<p);if(o){this._updateClassName()}};e.remove=function(){var t=arguments,s=0,p=t.length,r,o=false,q;do{r=t[s]+"";q=g(this,r);while(~q){this.splice(q,1);o=true;q=g(this,r)}}while(++s<p);if(o){this._updateClassName()}};e.toggle=function(p,q){var o=this.contains(p),r=o?q!==true&&"remove":q!==false&&"add";if(r){this[r](p)}if(q===true||q===false){return q}else{return !o}};e.replace=function(p,q){var o=g(p+"");if(~o){this.splice(o,1,q);this._updateClassName()}};e.toString=function(){return this.join(" ")};if(b.defineProperty){var l={get:i,enumerable:true,configurable:true};try{b.defineProperty(m,a,l)}catch(h){if(h.number===undefined||h.number===-2146823252){l.enumerable=false;b.defineProperty(m,a,l)}}}else{if(b[f].__defineGetter__){m.__defineGetter__(a,i)}}}(self))}(function(){var b=document.createElement("_");b.classList.add("c1","c2");if(!b.classList.contains("c2")){var c=function(e){var d=DOMTokenList.prototype[e];DOMTokenList.prototype[e]=function(h){var g,f=arguments.length;for(g=0;g<f;g++){h=arguments[g];d.call(this,h)}}};c("add");c("remove")}b.classList.toggle("c3",false);if(b.classList.contains("c3")){var a=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(d,e){if(1 in arguments&&!this.contains(d)===!e){return e}else{return a.call(this,d)}}}if(!("replace" in document.createElement("_").classList)){DOMTokenList.prototype.replace=function(e,g){var f=this.toString().split(" "),d=f.indexOf(e+"");if(~d){f=f.slice(d);this.remove.apply(this,f);this.add(g);this.add.apply(this,f.slice(1))}}}b=null}())};
 
 
b'\\ No newline at end of file'