Textpattern | PHP Cross Reference | Content Management Systems |
1 /*! 2 Autosize 3.0.17 3 license: MIT 4 http://www.jacklmoore.com/autosize 5 */ 6 !function(a,b){if("function"==typeof define&&define.amd)define(["exports","module"],b);else if("undefined"!=typeof exports&&"undefined"!=typeof module)b(exports,module);else{var c={exports:{}};b(c.exports,c),a.autosize=c.exports}}(this,function(a,b){"use strict";function c(a){function b(){var b=window.getComputedStyle(a,null);"vertical"===b.resize?a.style.resize="none":"both"===b.resize&&(a.style.resize="horizontal"),i="content-box"===b.boxSizing?-(parseFloat(b.paddingTop)+parseFloat(b.paddingBottom)):parseFloat(b.borderTopWidth)+parseFloat(b.borderBottomWidth),isNaN(i)&&(i=0),h()}function c(b){var c=a.style.width;a.style.width="0px",a.offsetWidth,a.style.width=c,a.style.overflowY=b,e()}function d(a){for(var b=[];a&&a.parentNode&&a.parentNode instanceof Element;)a.parentNode.scrollTop&&b.push({node:a.parentNode,scrollTop:a.parentNode.scrollTop}),a=a.parentNode;return b}function e(){var b=a.style.height,c=d(a),e=document.documentElement&&document.documentElement.scrollTop;a.style.height="auto";var f=a.scrollHeight+i;return 0===a.scrollHeight?void(a.style.height=b):(a.style.height=f+"px",j=a.clientWidth,c.forEach(function(a){a.node.scrollTop=a.scrollTop}),void(e&&(document.documentElement.scrollTop=e)))}function h(){e();var b=window.getComputedStyle(a,null),d=Math.round(parseFloat(b.height)),f=Math.round(parseFloat(a.style.height));if(d!==f?"visible"!==b.overflowY&&c("visible"):"hidden"!==b.overflowY&&c("hidden"),k!==d){k=d;var h=g("autosize:resized");a.dispatchEvent(h)}}if(a&&a.nodeName&&"TEXTAREA"===a.nodeName&&!f.has(a)){var i=null,j=a.clientWidth,k=null,l=function(){a.clientWidth!==j&&h()},m=function(b){window.removeEventListener("resize",l,!1),a.removeEventListener("input",h,!1),a.removeEventListener("keyup",h,!1),a.removeEventListener("autosize:destroy",m,!1),a.removeEventListener("autosize:update",h,!1),f.delete(a),Object.keys(b).forEach(function(c){a.style[c]=b[c]})}.bind(a,{height:a.style.height,resize:a.style.resize,overflowY:a.style.overflowY,overflowX:a.style.overflowX,wordWrap:a.style.wordWrap});a.addEventListener("autosize:destroy",m,!1),"onpropertychange"in a&&"oninput"in a&&a.addEventListener("keyup",h,!1),window.addEventListener("resize",l,!1),a.addEventListener("input",h,!1),a.addEventListener("autosize:update",h,!1),f.add(a),a.style.overflowX="hidden",a.style.wordWrap="break-word",b()}}function d(a){if(a&&a.nodeName&&"TEXTAREA"===a.nodeName){var b=g("autosize:destroy");a.dispatchEvent(b)}}function e(a){if(a&&a.nodeName&&"TEXTAREA"===a.nodeName){var b=g("autosize:update");a.dispatchEvent(b)}}var f="function"==typeof Set?new Set:function(){var a=[];return{has:function(b){return Boolean(a.indexOf(b)>-1)},add:function(b){a.push(b)},delete:function(b){a.splice(a.indexOf(b),1)}}}(),g=function(a){return new Event(a)};try{new Event("test")}catch(a){g=function(a){var b=document.createEvent("Event");return b.initEvent(a,!0,!1),b}}var h=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?(h=function(a){return a},h.destroy=function(a){return a},h.update=function(a){return a}):(h=function(a,b){return a&&Array.prototype.forEach.call(a.length?a:[a],function(a){return c(a,b)}),a},h.destroy=function(a){return a&&Array.prototype.forEach.call(a.length?a:[a],d),a},h.update=function(a){return a&&Array.prototype.forEach.call(a.length?a:[a],e),a}),b.exports=h}),/*! ======================================================================== 7 * Appended after third-party JavaScript. */ 8 $(function(){"use strict";autosize($("textarea:not(.code)"))});
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
title