Changeset 1556152
- Timestamp:
- 12/16/2016 12:00:23 PM (9 years ago)
- Location:
- simterm
- Files:
-
- 3 edited
- 23 copied
-
tags/0.3.2 (copied) (copied from simterm/trunk)
-
tags/0.3.2/CHANGELOG (copied) (copied from simterm/trunk/CHANGELOG)
-
tags/0.3.2/css (copied) (copied from simterm/trunk/css)
-
tags/0.3.2/css/img (copied) (copied from simterm/trunk/css/img)
-
tags/0.3.2/css/show-your-terms.min.css (copied) (copied from simterm/trunk/css/show-your-terms.min.css)
-
tags/0.3.2/css/simterm.css (copied) (copied from simterm/trunk/css/simterm.css)
-
tags/0.3.2/img (copied) (copied from simterm/trunk/img)
-
tags/0.3.2/js (copied) (copied from simterm/trunk/js)
-
tags/0.3.2/js/show-your-terms.js (copied) (copied from simterm/trunk/js/show-your-terms.js) (2 diffs)
-
tags/0.3.2/js/show-your-terms.min.js (copied) (copied from simterm/trunk/js/show-your-terms.min.js) (1 diff)
-
tags/0.3.2/languages (copied) (copied from simterm/trunk/languages)
-
tags/0.3.2/languages/simterm-es_ES.mo (copied) (copied from simterm/trunk/languages/simterm-es_ES.mo)
-
tags/0.3.2/languages/simterm-es_ES.po (copied) (copied from simterm/trunk/languages/simterm-es_ES.po)
-
tags/0.3.2/mutils.php (copied) (copied from simterm/trunk/mutils.php)
-
tags/0.3.2/readme.txt (copied) (copied from simterm/trunk/readme.txt) (2 diffs)
-
tags/0.3.2/simterm-core.php (copied) (copied from simterm/trunk/simterm-core.php)
-
tags/0.3.2/simterm-line.php (copied) (copied from simterm/trunk/simterm-line.php)
-
tags/0.3.2/simterm-settings.php (copied) (copied from simterm/trunk/simterm-settings.php)
-
tags/0.3.2/simterm.php (copied) (copied from simterm/trunk/simterm.php)
-
tags/0.3.2/views (copied) (copied from simterm/trunk/views)
-
tags/0.3.2/views.php (copied) (copied from simterm/trunk/views.php)
-
tags/0.3.2/views/live/syt.php (copied) (copied from simterm/trunk/views/live/syt.php)
-
tags/0.3.2/views/settings/checkbox.php (copied) (copied from simterm/trunk/views/settings/checkbox.php)
-
trunk/js/show-your-terms.js (modified) (2 diffs)
-
trunk/js/show-your-terms.min.js (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
simterm/tags/0.3.2/js/show-your-terms.js
r1554526 r1556152 254 254 el = ref[j]; 255 255 type = el[0], content = el[1], options = el[2]; 256 if (!content.length) { 257 continue; 258 } 256 259 currentLine = document.createElement("div"); 257 260 currentLine.setAttribute('data-line', count++); … … 343 346 } 344 347 counter = 0; 345 return this.dynamic[outputTerm].timers.command = setInterval(((function(_this) { 346 return function() { 347 if (_this.isPlaying(outputTerm)) { 348 currentLine.appendChild(document.createTextNode(content[counter])); 349 _this.container[outputTerm].appendChild(currentLine); 350 counter++; 351 if (counter === content.length) { 352 currentLine.classList.remove('active'); 353 _this.callNextOutput(options.delay, outputTerm); 354 return clearInterval(_this.dynamic[outputTerm].timers.command); 348 if (content.length > 0) { 349 return this.dynamic[outputTerm].timers.command = setInterval(((function(_this) { 350 return function() { 351 if (_this.isPlaying(outputTerm)) { 352 currentLine.appendChild(document.createTextNode(content[counter])); 353 _this.container[outputTerm].appendChild(currentLine); 354 counter++; 355 if (counter === content.length) { 356 currentLine.classList.remove('active'); 357 _this.callNextOutput(options.delay, outputTerm); 358 return clearInterval(_this.dynamic[outputTerm].timers.command); 359 } 355 360 } 356 } 357 }; 358 })(this)), speed); 361 }; 362 })(this)), speed); 363 } else { 364 return this.callNextOutput(options.delay, outputTerm); 365 } 359 366 } else { 360 367 if (!this.isPlaying(outputTerm)) { -
simterm/tags/0.3.2/js/show-your-terms.min.js
r1554526 r1556152 1 /*! show-your-terms - Kande Bonfim <[email protected]> - 2016-12-1 4*/2 (function(){this.ShowYourTerms=function(){function a(a,b,c){var d,e,f,g,h,i,j,k,l;this.container=a,this.replay=null==b||b,this.termsOptions=null!=c?c:{},e={single:!1,pauseOnClick:!0,copyOnDblClick:!0};for(h in e)l=e[h],h in this.termsOptions||(this.termsOptions[h]=l);if(this.container.nodeType||(this.container=Array.prototype.slice.call(document.querySelectorAll(this.container))),this.content=[],this.dynamic=[],this.outputIndex=[],this.termOptions=[],j='<div class="syt-statusbar"><div class="status"></div><ul class="tools"><li data-action="anim">Re-play</li><li data-action="copy">Copy to Clipboard</li><li data-action="pause">Pause</li><li data-action="full">Full View</li></ul></div>',this.container.length>0)for(k=this.container.length-1,this.termsOptions.single&&(k=0),f=g=0,i=k;0<=i?g<=i:g>=i;f=0<=i?++g:--g)this.content[f]=[],this.dynamic[f]={status:"ready",timers:{}},this.termOptions[f]={animate:!this.container[f].classList.contains("noanimate"),statusbar:!this.container[f].classList.contains("nostatusbar")},this.container[f].innerHTML="<div>"+this.container[f].innerHTML+"</div>",this.termOptions[f].statusbar&&(this.container[f].innerHTML+=j),this.defineEvents(f),d=this.container[f],this.container[f]=this.container[f].childNodes[0],this.container[f].innerText.length>0&&this.declarativeBuilder(f)}return a.prototype.declarativeBuilder=function(a){var b,c,d,e;for(e=this.container[a].children,c=0,d=e.length;c<d;c++)b=e[c],this.content[a].push([b.getAttribute("data-action"),b.innerText,{styles:b.classList,delay:b.getAttribute("data-delay"),speed:b.getAttribute("data-speed")}]);return this.container[a].style.minHeight=window.getComputedStyle(this.container[a],null).getPropertyValue("height"),this.termOptions[a].statusbar&&(this.container[a].style.minHeight=parseInt(this.container[a].style.minHeight)+26+"px"),this.termOptions[a].animate?this.play(a):this.fullview(a)},a.prototype.copyToClipboard=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;null==b&&(b=-1);try{p=document.createElement("textarea"),document.body.append(p),n={top:"-2em",left:"-2em",position:"fixed",background:"transparent",border:"none",outline:"none",boxShadow:"none",padding:"0",overflow:"hidden",width:"2em",height:"2em"};for(m in n)p.style[m]=n[m];if(q="",b===-1)for(j=this.content[a],f=0,h=j.length;f<h;f++)d=j[f],r=d[0],c=d[1],i=d[2],q+=c+"\n";else for(k=this.content[a][b++],r=k[0],c=k[1],i=k[2],g=r,q+=c+"\n";b<this.content[a].length&&(l=this.content[a][b++],r=l[0],c=l[1],i=l[2],r===g&&"line"===r);)g=r,q+=c+"\n";if(p.value=q,p.select(),o=document.execCommand("copy"),!o)return alert("There was a problem copying to clipboard")}catch(a){return e=a,alert("Sorry, your browser does not support it")}},a.prototype.defineEvents=function(a){var b,c,d,e,f;if(this.termsOptions.pauseOnClick&&this.container[a].addEventListener("click",function(b){return function(){return b.togglePause(a)}}(this)),this.termsOptions.copyOnDblClick&&this.container[a].addEventListener("dblclick",function(b){return function(c){var d,e;return d=c.target,e=d.getAttribute("data-line"),b.copyToClipboard(a,e)}}(this),!1),this.container[a].addEventListener("mouseenter",function(b){return function(){if(b.dynamic[a].mouseover=!0,b.dynamic[a].timers.leaveReplay)return clearInterval(b.dynamic[a].timers.leaveReplay)}}(this),!1),this.container[a].addEventListener("mouseleave",function(b){return function(){if(b.dynamic[a].mouseover=!1,b.dynamic[a].leaveReplay)return b.dynamic[a].leaveReplay=!1,b.dynamic[a].timers.leaveReplay=setTimeout(function(){return b.playagain(a)},1e3)}}(this),!1),this.termOptions[a].statusbar){for(f=this.container[a].querySelectorAll(".syt-statusbar .tools li"),d=[],b=0,c=f.length;b<c;b++)e=f[b],d.push(e.addEventListener("click",function(b){return function(c){var d;return c.stopPropagation(),d=c.target.getAttribute("data-action"),"anim"===d?b.playagain(a):"full"===d?b.fullview(a):"pause"===d?b.togglePause(a):"copy"===d?b.copyToClipboard(a):void 0}}(this)));return d}},a.prototype.addCommand=function(a,b,c){if(null==c&&(c=0),c<this.content.length)return this.content[c].push(["command",a,b])},a.prototype.addLine=function(a,b,c){if(null==c&&(c=0),c<this.content.length)return this.content[c].push(["line",a,b])},a.prototype.clearTimers=function(a){var b,c;null==a&&(a=0),b=[];for(c in this.dynamic[a].timers)b.push(clearInterval(this.dynamic[a].timers[c]));return b},a.prototype.play=function(a){if(null==a&&(a=0),"ready"===this.dynamic[a].status)return this.clearTimers(a),this.dynamic[a].status="playing",this.container[a].innerHTML="",this.outputIndex[a]=0,this.outputGenerator(this.content[a][this.outputIndex[a]],a)},a.prototype.fullview=function(a){var b,c,d,e,f,g,h,i,j,k;for(null==a&&(a=0),this.dynamic[a].status="fullview",f=document.createElement("div"),c=0,j=this.content[a],g=0,h=j.length;g<h;g++)e=j[g],k=e[0],b=e[1],i=e[2], d=document.createElement("div"),d.setAttribute("data-line",c++),i.styles&&d.setAttribute("class",i.styles),"command"===k&&(d.classList.contains("type")||d.classList.add("command")),d.append(b),f.append(d);return this.container[a].innerHTML=f.innerHTML,this.clearTimers(a)},a.prototype.playagain=function(a,b){return null==a&&(a=0),null==b&&(b=!1),b&&this.dynamic[a].mouseover?(this.dynamic[a].leaveReplay=!0,void(this.dynamic[a].status="waiting")):(this.dynamic[a].status="ready",this.play(a))},a.prototype.callNextOutput=function(a,b){if(this.isPlaying(b)){if(this.outputIndex[b]+=1,this.termsOptions.overrideDelay&&(a=this.termsOptions.overrideDelay),this.content[b][this.outputIndex[b]])return this.dynamic[b].timers.output=setTimeout(function(a){return function(){return a.outputGenerator(a.content[b][a.outputIndex[b]],b)}}(this),a);if(this.replay)return this.dynamic[b].timers.replay=setTimeout(function(a){return function(){return a.playagain(b,!0)}}(this),a)}},a.prototype.isPlaying=function(a){return"playing"===this.dynamic[a].status},a.prototype.togglePause=function(a){return"playing"===this.dynamic[a].status?this.dynamic[a].status="pause":"pause"===this.dynamic[a].status?this.dynamic[a].status="playing":void 0},a.prototype.outputGenerator=function(a,b){var c,d,e,f,g,h;return h=a[0],c=a[1],f=a[2],e=document.createElement("div"),f.styles&&e.setAttribute("class",f.styles),g=f.speed?f.speed:100,this.termsOptions.overrideSpeed&&(g=this.termsOptions.overrideSpeed),e.classList.add("active"),e.setAttribute("data-line",this.outputIndex[b]),"command"===h?(e.classList.contains("type")||e.classList.add("command"),d=0,this.dynamic[b].timers.command=setInterval(function(a){return function(){if(a.isPlaying(b)&&(e.appendChild(document.createTextNode(c[d])),a.container[b].appendChild(e),d++,d===c.length))return e.classList.remove("active"),a.callNextOutput(f.delay,b),clearInterval(a.dynamic[b].timers.command)}}(this),g)):this.isPlaying(b)?(e.appendChild(document.createTextNode(c)),this.container[b].appendChild(e),e.classList.remove("active"),this.callNextOutput(f.delay,b)):this.dynamic[b].timers.pause=setInterval(function(a){return function(){if(a.isPlaying(b))return clearInterval(a.dynamic[b].timers.pause),a.callNextOutput(f.delay,b)}}(this),g)},a}()}).call(this);1 /*! show-your-terms - Kande Bonfim <[email protected]> - 2016-12-16 */ 2 (function(){this.ShowYourTerms=function(){function a(a,b,c){var d,e,f,g,h,i,j,k,l;this.container=a,this.replay=null==b||b,this.termsOptions=null!=c?c:{},e={single:!1,pauseOnClick:!0,copyOnDblClick:!0};for(h in e)l=e[h],h in this.termsOptions||(this.termsOptions[h]=l);if(this.container.nodeType||(this.container=Array.prototype.slice.call(document.querySelectorAll(this.container))),this.content=[],this.dynamic=[],this.outputIndex=[],this.termOptions=[],j='<div class="syt-statusbar"><div class="status"></div><ul class="tools"><li data-action="anim">Re-play</li><li data-action="copy">Copy to Clipboard</li><li data-action="pause">Pause</li><li data-action="full">Full View</li></ul></div>',this.container.length>0)for(k=this.container.length-1,this.termsOptions.single&&(k=0),f=g=0,i=k;0<=i?g<=i:g>=i;f=0<=i?++g:--g)this.content[f]=[],this.dynamic[f]={status:"ready",timers:{}},this.termOptions[f]={animate:!this.container[f].classList.contains("noanimate"),statusbar:!this.container[f].classList.contains("nostatusbar")},this.container[f].innerHTML="<div>"+this.container[f].innerHTML+"</div>",this.termOptions[f].statusbar&&(this.container[f].innerHTML+=j),this.defineEvents(f),d=this.container[f],this.container[f]=this.container[f].childNodes[0],this.container[f].innerText.length>0&&this.declarativeBuilder(f)}return a.prototype.declarativeBuilder=function(a){var b,c,d,e;for(e=this.container[a].children,c=0,d=e.length;c<d;c++)b=e[c],this.content[a].push([b.getAttribute("data-action"),b.innerText,{styles:b.classList,delay:b.getAttribute("data-delay"),speed:b.getAttribute("data-speed")}]);return this.container[a].style.minHeight=window.getComputedStyle(this.container[a],null).getPropertyValue("height"),this.termOptions[a].statusbar&&(this.container[a].style.minHeight=parseInt(this.container[a].style.minHeight)+26+"px"),this.termOptions[a].animate?this.play(a):this.fullview(a)},a.prototype.copyToClipboard=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;null==b&&(b=-1);try{p=document.createElement("textarea"),document.body.append(p),n={top:"-2em",left:"-2em",position:"fixed",background:"transparent",border:"none",outline:"none",boxShadow:"none",padding:"0",overflow:"hidden",width:"2em",height:"2em"};for(m in n)p.style[m]=n[m];if(q="",b===-1)for(j=this.content[a],f=0,h=j.length;f<h;f++)d=j[f],r=d[0],c=d[1],i=d[2],q+=c+"\n";else for(k=this.content[a][b++],r=k[0],c=k[1],i=k[2],g=r,q+=c+"\n";b<this.content[a].length&&(l=this.content[a][b++],r=l[0],c=l[1],i=l[2],r===g&&"line"===r);)g=r,q+=c+"\n";if(p.value=q,p.select(),o=document.execCommand("copy"),!o)return alert("There was a problem copying to clipboard")}catch(a){return e=a,alert("Sorry, your browser does not support it")}},a.prototype.defineEvents=function(a){var b,c,d,e,f;if(this.termsOptions.pauseOnClick&&this.container[a].addEventListener("click",function(b){return function(){return b.togglePause(a)}}(this)),this.termsOptions.copyOnDblClick&&this.container[a].addEventListener("dblclick",function(b){return function(c){var d,e;return d=c.target,e=d.getAttribute("data-line"),b.copyToClipboard(a,e)}}(this),!1),this.container[a].addEventListener("mouseenter",function(b){return function(){if(b.dynamic[a].mouseover=!0,b.dynamic[a].timers.leaveReplay)return clearInterval(b.dynamic[a].timers.leaveReplay)}}(this),!1),this.container[a].addEventListener("mouseleave",function(b){return function(){if(b.dynamic[a].mouseover=!1,b.dynamic[a].leaveReplay)return b.dynamic[a].leaveReplay=!1,b.dynamic[a].timers.leaveReplay=setTimeout(function(){return b.playagain(a)},1e3)}}(this),!1),this.termOptions[a].statusbar){for(f=this.container[a].querySelectorAll(".syt-statusbar .tools li"),d=[],b=0,c=f.length;b<c;b++)e=f[b],d.push(e.addEventListener("click",function(b){return function(c){var d;return c.stopPropagation(),d=c.target.getAttribute("data-action"),"anim"===d?b.playagain(a):"full"===d?b.fullview(a):"pause"===d?b.togglePause(a):"copy"===d?b.copyToClipboard(a):void 0}}(this)));return d}},a.prototype.addCommand=function(a,b,c){if(null==c&&(c=0),c<this.content.length)return this.content[c].push(["command",a,b])},a.prototype.addLine=function(a,b,c){if(null==c&&(c=0),c<this.content.length)return this.content[c].push(["line",a,b])},a.prototype.clearTimers=function(a){var b,c;null==a&&(a=0),b=[];for(c in this.dynamic[a].timers)b.push(clearInterval(this.dynamic[a].timers[c]));return b},a.prototype.play=function(a){if(null==a&&(a=0),"ready"===this.dynamic[a].status)return this.clearTimers(a),this.dynamic[a].status="playing",this.container[a].innerHTML="",this.outputIndex[a]=0,this.outputGenerator(this.content[a][this.outputIndex[a]],a)},a.prototype.fullview=function(a){var b,c,d,e,f,g,h,i,j,k;for(null==a&&(a=0),this.dynamic[a].status="fullview",f=document.createElement("div"),c=0,j=this.content[a],g=0,h=j.length;g<h;g++)e=j[g],k=e[0],b=e[1],i=e[2],b.length&&(d=document.createElement("div"),d.setAttribute("data-line",c++),i.styles&&d.setAttribute("class",i.styles),"command"===k&&(d.classList.contains("type")||d.classList.add("command")),d.append(b),f.append(d));return this.container[a].innerHTML=f.innerHTML,this.clearTimers(a)},a.prototype.playagain=function(a,b){return null==a&&(a=0),null==b&&(b=!1),b&&this.dynamic[a].mouseover?(this.dynamic[a].leaveReplay=!0,void(this.dynamic[a].status="waiting")):(this.dynamic[a].status="ready",this.play(a))},a.prototype.callNextOutput=function(a,b){if(this.isPlaying(b)){if(this.outputIndex[b]+=1,this.termsOptions.overrideDelay&&(a=this.termsOptions.overrideDelay),this.content[b][this.outputIndex[b]])return this.dynamic[b].timers.output=setTimeout(function(a){return function(){return a.outputGenerator(a.content[b][a.outputIndex[b]],b)}}(this),a);if(this.replay)return this.dynamic[b].timers.replay=setTimeout(function(a){return function(){return a.playagain(b,!0)}}(this),a)}},a.prototype.isPlaying=function(a){return"playing"===this.dynamic[a].status},a.prototype.togglePause=function(a){return"playing"===this.dynamic[a].status?this.dynamic[a].status="pause":"pause"===this.dynamic[a].status?this.dynamic[a].status="playing":void 0},a.prototype.outputGenerator=function(a,b){var c,d,e,f,g,h;return h=a[0],c=a[1],f=a[2],e=document.createElement("div"),f.styles&&e.setAttribute("class",f.styles),g=f.speed?f.speed:100,this.termsOptions.overrideSpeed&&(g=this.termsOptions.overrideSpeed),e.classList.add("active"),e.setAttribute("data-line",this.outputIndex[b]),"command"===h?(e.classList.contains("type")||e.classList.add("command"),d=0,c.length>0?this.dynamic[b].timers.command=setInterval(function(a){return function(){if(a.isPlaying(b)&&(e.appendChild(document.createTextNode(c[d])),a.container[b].appendChild(e),d++,d===c.length))return e.classList.remove("active"),a.callNextOutput(f.delay,b),clearInterval(a.dynamic[b].timers.command)}}(this),g):this.callNextOutput(f.delay,b)):this.isPlaying(b)?(e.appendChild(document.createTextNode(c)),this.container[b].appendChild(e),e.classList.remove("active"),this.callNextOutput(f.delay,b)):this.dynamic[b].timers.pause=setInterval(function(a){return function(){if(a.isPlaying(b))return clearInterval(a.dynamic[b].timers.pause),a.callNextOutput(f.delay,b)}}(this),g)},a}()}).call(this); -
simterm/tags/0.3.2/readme.txt
r1554544 r1556152 5 5 Requires at least: 4.2 6 6 Tested up to: 4.7 7 Stable tag: 0.3. 17 Stable tag: 0.3.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 43 43 44 44 == Changelog == 45 46 = 0.3.2 (2016-12-15) = 47 * Updated show your terms script. Fixed a bug on empty lines 45 48 46 49 = 0.3.1 (2016-12-14) = -
simterm/trunk/js/show-your-terms.js
r1554526 r1556152 254 254 el = ref[j]; 255 255 type = el[0], content = el[1], options = el[2]; 256 if (!content.length) { 257 continue; 258 } 256 259 currentLine = document.createElement("div"); 257 260 currentLine.setAttribute('data-line', count++); … … 343 346 } 344 347 counter = 0; 345 return this.dynamic[outputTerm].timers.command = setInterval(((function(_this) { 346 return function() { 347 if (_this.isPlaying(outputTerm)) { 348 currentLine.appendChild(document.createTextNode(content[counter])); 349 _this.container[outputTerm].appendChild(currentLine); 350 counter++; 351 if (counter === content.length) { 352 currentLine.classList.remove('active'); 353 _this.callNextOutput(options.delay, outputTerm); 354 return clearInterval(_this.dynamic[outputTerm].timers.command); 348 if (content.length > 0) { 349 return this.dynamic[outputTerm].timers.command = setInterval(((function(_this) { 350 return function() { 351 if (_this.isPlaying(outputTerm)) { 352 currentLine.appendChild(document.createTextNode(content[counter])); 353 _this.container[outputTerm].appendChild(currentLine); 354 counter++; 355 if (counter === content.length) { 356 currentLine.classList.remove('active'); 357 _this.callNextOutput(options.delay, outputTerm); 358 return clearInterval(_this.dynamic[outputTerm].timers.command); 359 } 355 360 } 356 } 357 }; 358 })(this)), speed); 361 }; 362 })(this)), speed); 363 } else { 364 return this.callNextOutput(options.delay, outputTerm); 365 } 359 366 } else { 360 367 if (!this.isPlaying(outputTerm)) { -
simterm/trunk/js/show-your-terms.min.js
r1554526 r1556152 1 /*! show-your-terms - Kande Bonfim <[email protected]> - 2016-12-1 4*/2 (function(){this.ShowYourTerms=function(){function a(a,b,c){var d,e,f,g,h,i,j,k,l;this.container=a,this.replay=null==b||b,this.termsOptions=null!=c?c:{},e={single:!1,pauseOnClick:!0,copyOnDblClick:!0};for(h in e)l=e[h],h in this.termsOptions||(this.termsOptions[h]=l);if(this.container.nodeType||(this.container=Array.prototype.slice.call(document.querySelectorAll(this.container))),this.content=[],this.dynamic=[],this.outputIndex=[],this.termOptions=[],j='<div class="syt-statusbar"><div class="status"></div><ul class="tools"><li data-action="anim">Re-play</li><li data-action="copy">Copy to Clipboard</li><li data-action="pause">Pause</li><li data-action="full">Full View</li></ul></div>',this.container.length>0)for(k=this.container.length-1,this.termsOptions.single&&(k=0),f=g=0,i=k;0<=i?g<=i:g>=i;f=0<=i?++g:--g)this.content[f]=[],this.dynamic[f]={status:"ready",timers:{}},this.termOptions[f]={animate:!this.container[f].classList.contains("noanimate"),statusbar:!this.container[f].classList.contains("nostatusbar")},this.container[f].innerHTML="<div>"+this.container[f].innerHTML+"</div>",this.termOptions[f].statusbar&&(this.container[f].innerHTML+=j),this.defineEvents(f),d=this.container[f],this.container[f]=this.container[f].childNodes[0],this.container[f].innerText.length>0&&this.declarativeBuilder(f)}return a.prototype.declarativeBuilder=function(a){var b,c,d,e;for(e=this.container[a].children,c=0,d=e.length;c<d;c++)b=e[c],this.content[a].push([b.getAttribute("data-action"),b.innerText,{styles:b.classList,delay:b.getAttribute("data-delay"),speed:b.getAttribute("data-speed")}]);return this.container[a].style.minHeight=window.getComputedStyle(this.container[a],null).getPropertyValue("height"),this.termOptions[a].statusbar&&(this.container[a].style.minHeight=parseInt(this.container[a].style.minHeight)+26+"px"),this.termOptions[a].animate?this.play(a):this.fullview(a)},a.prototype.copyToClipboard=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;null==b&&(b=-1);try{p=document.createElement("textarea"),document.body.append(p),n={top:"-2em",left:"-2em",position:"fixed",background:"transparent",border:"none",outline:"none",boxShadow:"none",padding:"0",overflow:"hidden",width:"2em",height:"2em"};for(m in n)p.style[m]=n[m];if(q="",b===-1)for(j=this.content[a],f=0,h=j.length;f<h;f++)d=j[f],r=d[0],c=d[1],i=d[2],q+=c+"\n";else for(k=this.content[a][b++],r=k[0],c=k[1],i=k[2],g=r,q+=c+"\n";b<this.content[a].length&&(l=this.content[a][b++],r=l[0],c=l[1],i=l[2],r===g&&"line"===r);)g=r,q+=c+"\n";if(p.value=q,p.select(),o=document.execCommand("copy"),!o)return alert("There was a problem copying to clipboard")}catch(a){return e=a,alert("Sorry, your browser does not support it")}},a.prototype.defineEvents=function(a){var b,c,d,e,f;if(this.termsOptions.pauseOnClick&&this.container[a].addEventListener("click",function(b){return function(){return b.togglePause(a)}}(this)),this.termsOptions.copyOnDblClick&&this.container[a].addEventListener("dblclick",function(b){return function(c){var d,e;return d=c.target,e=d.getAttribute("data-line"),b.copyToClipboard(a,e)}}(this),!1),this.container[a].addEventListener("mouseenter",function(b){return function(){if(b.dynamic[a].mouseover=!0,b.dynamic[a].timers.leaveReplay)return clearInterval(b.dynamic[a].timers.leaveReplay)}}(this),!1),this.container[a].addEventListener("mouseleave",function(b){return function(){if(b.dynamic[a].mouseover=!1,b.dynamic[a].leaveReplay)return b.dynamic[a].leaveReplay=!1,b.dynamic[a].timers.leaveReplay=setTimeout(function(){return b.playagain(a)},1e3)}}(this),!1),this.termOptions[a].statusbar){for(f=this.container[a].querySelectorAll(".syt-statusbar .tools li"),d=[],b=0,c=f.length;b<c;b++)e=f[b],d.push(e.addEventListener("click",function(b){return function(c){var d;return c.stopPropagation(),d=c.target.getAttribute("data-action"),"anim"===d?b.playagain(a):"full"===d?b.fullview(a):"pause"===d?b.togglePause(a):"copy"===d?b.copyToClipboard(a):void 0}}(this)));return d}},a.prototype.addCommand=function(a,b,c){if(null==c&&(c=0),c<this.content.length)return this.content[c].push(["command",a,b])},a.prototype.addLine=function(a,b,c){if(null==c&&(c=0),c<this.content.length)return this.content[c].push(["line",a,b])},a.prototype.clearTimers=function(a){var b,c;null==a&&(a=0),b=[];for(c in this.dynamic[a].timers)b.push(clearInterval(this.dynamic[a].timers[c]));return b},a.prototype.play=function(a){if(null==a&&(a=0),"ready"===this.dynamic[a].status)return this.clearTimers(a),this.dynamic[a].status="playing",this.container[a].innerHTML="",this.outputIndex[a]=0,this.outputGenerator(this.content[a][this.outputIndex[a]],a)},a.prototype.fullview=function(a){var b,c,d,e,f,g,h,i,j,k;for(null==a&&(a=0),this.dynamic[a].status="fullview",f=document.createElement("div"),c=0,j=this.content[a],g=0,h=j.length;g<h;g++)e=j[g],k=e[0],b=e[1],i=e[2], d=document.createElement("div"),d.setAttribute("data-line",c++),i.styles&&d.setAttribute("class",i.styles),"command"===k&&(d.classList.contains("type")||d.classList.add("command")),d.append(b),f.append(d);return this.container[a].innerHTML=f.innerHTML,this.clearTimers(a)},a.prototype.playagain=function(a,b){return null==a&&(a=0),null==b&&(b=!1),b&&this.dynamic[a].mouseover?(this.dynamic[a].leaveReplay=!0,void(this.dynamic[a].status="waiting")):(this.dynamic[a].status="ready",this.play(a))},a.prototype.callNextOutput=function(a,b){if(this.isPlaying(b)){if(this.outputIndex[b]+=1,this.termsOptions.overrideDelay&&(a=this.termsOptions.overrideDelay),this.content[b][this.outputIndex[b]])return this.dynamic[b].timers.output=setTimeout(function(a){return function(){return a.outputGenerator(a.content[b][a.outputIndex[b]],b)}}(this),a);if(this.replay)return this.dynamic[b].timers.replay=setTimeout(function(a){return function(){return a.playagain(b,!0)}}(this),a)}},a.prototype.isPlaying=function(a){return"playing"===this.dynamic[a].status},a.prototype.togglePause=function(a){return"playing"===this.dynamic[a].status?this.dynamic[a].status="pause":"pause"===this.dynamic[a].status?this.dynamic[a].status="playing":void 0},a.prototype.outputGenerator=function(a,b){var c,d,e,f,g,h;return h=a[0],c=a[1],f=a[2],e=document.createElement("div"),f.styles&&e.setAttribute("class",f.styles),g=f.speed?f.speed:100,this.termsOptions.overrideSpeed&&(g=this.termsOptions.overrideSpeed),e.classList.add("active"),e.setAttribute("data-line",this.outputIndex[b]),"command"===h?(e.classList.contains("type")||e.classList.add("command"),d=0,this.dynamic[b].timers.command=setInterval(function(a){return function(){if(a.isPlaying(b)&&(e.appendChild(document.createTextNode(c[d])),a.container[b].appendChild(e),d++,d===c.length))return e.classList.remove("active"),a.callNextOutput(f.delay,b),clearInterval(a.dynamic[b].timers.command)}}(this),g)):this.isPlaying(b)?(e.appendChild(document.createTextNode(c)),this.container[b].appendChild(e),e.classList.remove("active"),this.callNextOutput(f.delay,b)):this.dynamic[b].timers.pause=setInterval(function(a){return function(){if(a.isPlaying(b))return clearInterval(a.dynamic[b].timers.pause),a.callNextOutput(f.delay,b)}}(this),g)},a}()}).call(this);1 /*! show-your-terms - Kande Bonfim <[email protected]> - 2016-12-16 */ 2 (function(){this.ShowYourTerms=function(){function a(a,b,c){var d,e,f,g,h,i,j,k,l;this.container=a,this.replay=null==b||b,this.termsOptions=null!=c?c:{},e={single:!1,pauseOnClick:!0,copyOnDblClick:!0};for(h in e)l=e[h],h in this.termsOptions||(this.termsOptions[h]=l);if(this.container.nodeType||(this.container=Array.prototype.slice.call(document.querySelectorAll(this.container))),this.content=[],this.dynamic=[],this.outputIndex=[],this.termOptions=[],j='<div class="syt-statusbar"><div class="status"></div><ul class="tools"><li data-action="anim">Re-play</li><li data-action="copy">Copy to Clipboard</li><li data-action="pause">Pause</li><li data-action="full">Full View</li></ul></div>',this.container.length>0)for(k=this.container.length-1,this.termsOptions.single&&(k=0),f=g=0,i=k;0<=i?g<=i:g>=i;f=0<=i?++g:--g)this.content[f]=[],this.dynamic[f]={status:"ready",timers:{}},this.termOptions[f]={animate:!this.container[f].classList.contains("noanimate"),statusbar:!this.container[f].classList.contains("nostatusbar")},this.container[f].innerHTML="<div>"+this.container[f].innerHTML+"</div>",this.termOptions[f].statusbar&&(this.container[f].innerHTML+=j),this.defineEvents(f),d=this.container[f],this.container[f]=this.container[f].childNodes[0],this.container[f].innerText.length>0&&this.declarativeBuilder(f)}return a.prototype.declarativeBuilder=function(a){var b,c,d,e;for(e=this.container[a].children,c=0,d=e.length;c<d;c++)b=e[c],this.content[a].push([b.getAttribute("data-action"),b.innerText,{styles:b.classList,delay:b.getAttribute("data-delay"),speed:b.getAttribute("data-speed")}]);return this.container[a].style.minHeight=window.getComputedStyle(this.container[a],null).getPropertyValue("height"),this.termOptions[a].statusbar&&(this.container[a].style.minHeight=parseInt(this.container[a].style.minHeight)+26+"px"),this.termOptions[a].animate?this.play(a):this.fullview(a)},a.prototype.copyToClipboard=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;null==b&&(b=-1);try{p=document.createElement("textarea"),document.body.append(p),n={top:"-2em",left:"-2em",position:"fixed",background:"transparent",border:"none",outline:"none",boxShadow:"none",padding:"0",overflow:"hidden",width:"2em",height:"2em"};for(m in n)p.style[m]=n[m];if(q="",b===-1)for(j=this.content[a],f=0,h=j.length;f<h;f++)d=j[f],r=d[0],c=d[1],i=d[2],q+=c+"\n";else for(k=this.content[a][b++],r=k[0],c=k[1],i=k[2],g=r,q+=c+"\n";b<this.content[a].length&&(l=this.content[a][b++],r=l[0],c=l[1],i=l[2],r===g&&"line"===r);)g=r,q+=c+"\n";if(p.value=q,p.select(),o=document.execCommand("copy"),!o)return alert("There was a problem copying to clipboard")}catch(a){return e=a,alert("Sorry, your browser does not support it")}},a.prototype.defineEvents=function(a){var b,c,d,e,f;if(this.termsOptions.pauseOnClick&&this.container[a].addEventListener("click",function(b){return function(){return b.togglePause(a)}}(this)),this.termsOptions.copyOnDblClick&&this.container[a].addEventListener("dblclick",function(b){return function(c){var d,e;return d=c.target,e=d.getAttribute("data-line"),b.copyToClipboard(a,e)}}(this),!1),this.container[a].addEventListener("mouseenter",function(b){return function(){if(b.dynamic[a].mouseover=!0,b.dynamic[a].timers.leaveReplay)return clearInterval(b.dynamic[a].timers.leaveReplay)}}(this),!1),this.container[a].addEventListener("mouseleave",function(b){return function(){if(b.dynamic[a].mouseover=!1,b.dynamic[a].leaveReplay)return b.dynamic[a].leaveReplay=!1,b.dynamic[a].timers.leaveReplay=setTimeout(function(){return b.playagain(a)},1e3)}}(this),!1),this.termOptions[a].statusbar){for(f=this.container[a].querySelectorAll(".syt-statusbar .tools li"),d=[],b=0,c=f.length;b<c;b++)e=f[b],d.push(e.addEventListener("click",function(b){return function(c){var d;return c.stopPropagation(),d=c.target.getAttribute("data-action"),"anim"===d?b.playagain(a):"full"===d?b.fullview(a):"pause"===d?b.togglePause(a):"copy"===d?b.copyToClipboard(a):void 0}}(this)));return d}},a.prototype.addCommand=function(a,b,c){if(null==c&&(c=0),c<this.content.length)return this.content[c].push(["command",a,b])},a.prototype.addLine=function(a,b,c){if(null==c&&(c=0),c<this.content.length)return this.content[c].push(["line",a,b])},a.prototype.clearTimers=function(a){var b,c;null==a&&(a=0),b=[];for(c in this.dynamic[a].timers)b.push(clearInterval(this.dynamic[a].timers[c]));return b},a.prototype.play=function(a){if(null==a&&(a=0),"ready"===this.dynamic[a].status)return this.clearTimers(a),this.dynamic[a].status="playing",this.container[a].innerHTML="",this.outputIndex[a]=0,this.outputGenerator(this.content[a][this.outputIndex[a]],a)},a.prototype.fullview=function(a){var b,c,d,e,f,g,h,i,j,k;for(null==a&&(a=0),this.dynamic[a].status="fullview",f=document.createElement("div"),c=0,j=this.content[a],g=0,h=j.length;g<h;g++)e=j[g],k=e[0],b=e[1],i=e[2],b.length&&(d=document.createElement("div"),d.setAttribute("data-line",c++),i.styles&&d.setAttribute("class",i.styles),"command"===k&&(d.classList.contains("type")||d.classList.add("command")),d.append(b),f.append(d));return this.container[a].innerHTML=f.innerHTML,this.clearTimers(a)},a.prototype.playagain=function(a,b){return null==a&&(a=0),null==b&&(b=!1),b&&this.dynamic[a].mouseover?(this.dynamic[a].leaveReplay=!0,void(this.dynamic[a].status="waiting")):(this.dynamic[a].status="ready",this.play(a))},a.prototype.callNextOutput=function(a,b){if(this.isPlaying(b)){if(this.outputIndex[b]+=1,this.termsOptions.overrideDelay&&(a=this.termsOptions.overrideDelay),this.content[b][this.outputIndex[b]])return this.dynamic[b].timers.output=setTimeout(function(a){return function(){return a.outputGenerator(a.content[b][a.outputIndex[b]],b)}}(this),a);if(this.replay)return this.dynamic[b].timers.replay=setTimeout(function(a){return function(){return a.playagain(b,!0)}}(this),a)}},a.prototype.isPlaying=function(a){return"playing"===this.dynamic[a].status},a.prototype.togglePause=function(a){return"playing"===this.dynamic[a].status?this.dynamic[a].status="pause":"pause"===this.dynamic[a].status?this.dynamic[a].status="playing":void 0},a.prototype.outputGenerator=function(a,b){var c,d,e,f,g,h;return h=a[0],c=a[1],f=a[2],e=document.createElement("div"),f.styles&&e.setAttribute("class",f.styles),g=f.speed?f.speed:100,this.termsOptions.overrideSpeed&&(g=this.termsOptions.overrideSpeed),e.classList.add("active"),e.setAttribute("data-line",this.outputIndex[b]),"command"===h?(e.classList.contains("type")||e.classList.add("command"),d=0,c.length>0?this.dynamic[b].timers.command=setInterval(function(a){return function(){if(a.isPlaying(b)&&(e.appendChild(document.createTextNode(c[d])),a.container[b].appendChild(e),d++,d===c.length))return e.classList.remove("active"),a.callNextOutput(f.delay,b),clearInterval(a.dynamic[b].timers.command)}}(this),g):this.callNextOutput(f.delay,b)):this.isPlaying(b)?(e.appendChild(document.createTextNode(c)),this.container[b].appendChild(e),e.classList.remove("active"),this.callNextOutput(f.delay,b)):this.dynamic[b].timers.pause=setInterval(function(a){return function(){if(a.isPlaying(b))return clearInterval(a.dynamic[b].timers.pause),a.callNextOutput(f.delay,b)}}(this),g)},a}()}).call(this); -
simterm/trunk/readme.txt
r1554544 r1556152 5 5 Requires at least: 4.2 6 6 Tested up to: 4.7 7 Stable tag: 0.3. 17 Stable tag: 0.3.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 43 43 44 44 == Changelog == 45 46 = 0.3.2 (2016-12-15) = 47 * Updated show your terms script. Fixed a bug on empty lines 45 48 46 49 = 0.3.1 (2016-12-14) =
Note: See TracChangeset
for help on using the changeset viewer.