PageSourceSearch

https://www.friscowomenshealth.com/wp-content/plugins/feedback-manager-off/js/jquery-shorten.min.js?ver=7.1.2

js friscowomenshealth.com collected 2026-09-26 11:47:44 UTC 4,253 bytes, 9 lines download raw bytes

1/**
2* jQuery shorten v0.3.2
3* https://github.com/amazingSurge/jquery-shorten
4*
5* Copyright (c) amazingSurge
6* Released under the LGPL-3.0 license
7*/
8!function(e,t){if("function"==typeof define&&define.amd)define(["jquery"],t);else if("undefined"!=typeof exports)t(require("jquery"));else{var n={exports:{}};t(e.jQuery),e.jqueryShortenEs=n.exports}}(this,function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var n=function(e){return e&&e.__esModule?e:{default:e}}(e),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(t,n,s){return n&&e(t.prototype,n),s&&e(t,s),t}}(),i={namespace:"shorten",chars:100,ellipses:"...",more:"more",less:"less"},a=function(){function e(s,a){t(this,e),this.element=s,this.$element=(0,n.default)(s),this.text=this.$element.text(),this.expanded=!1;var r=[];n.default.each(this.$element.data(),function(e,t){var n=new RegExp("^shorten","i");n.test(e)&&(r[e.toLowerCase().replace(n,"")]=t)}),this.options=n.default.extend(!0,{},i,a,r),this.namespace=this.options.namespace,this.needShorten()&&this._init()}return s(e,[{key:"_init",value:function(){var e=this;this._prepare(),this.$element.on("shorten::expand",function(){e.expanded=!0,e.$element.addClass(e.namespace+"_expand")}),this.$element.on("shorten::collapse",function(){e.expanded=!1,e.$element.removeClass(e.namespace+"_expand")}),this._bindEvents(),this._trigger("ready")}},{key:"_trigger",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];var i=[this].concat(n);this.$element.trigger("shorten::"+e,i);var a="on"+(e=e.replace(/\b\w+\b/g,function(e){return e.substring(0,1).toUpperCase()+e.substring(1)}));"function"==typeof this.options[a]&&this.options[a].apply(this,n)}},{key:"_prepare",value:function(){this.summaryText=this.text.slice(0,this.options.chars),this.detailText=this.text.slice(this.summaryText.length),this.$element.html(this.summaryText+this._ellipsesHtml()+'<span class="'+this.namespace+'-detail">'+this.detailText+"</span>"+this._toggleHtml())}},{key:"_ellipsesHtml",value:function(){return this.options.ellipses?'<span class="'+this.namespace+'-ellipses">'+this.options.ellipses+"</span>":""}},{key:"_toggleHtml",value:function(){var e;return e=this.expanded?this.options.less:this.options.more,'<a class="'+this.namespace+'-toggle" href="#">'+e+"</a>"}},{key:"_bindEvents",value:function(){this.$toggle=this.$element.find("."+this.namespace+"-toggle");var e=this;this.$element.on("click.shorten","."+this.namespace+"-toggle",function(){return e.expanded?(e._trigger("collapse"),(0,n.default)(this).html(e.options.more)):(e._trigger("expand"),(0,n.default)(this).html(e.options.less)),!1})}},{key:"needShorten",value:function(){return this.text.length>this.options.chars}},{key:"text",value:function(){return this.text}},{key:"expand",value:function(){this._trigger("expand")}},{key:"collapse",value:function(){this._trigger("collapse")}},{key:"destroy",value:function(){this.$element.html(this.text),this.$element.data("shorten",null),this.$element.off(".shorten"),this.$element.off("shorten::expand"),this.$element.off("shorten::collapse")}},{key:"update",value:function(e){this.text=e,this.needShorten()?this.prepare():this.$element.html(e),this._trigger("expand",e)}}],[{key:"setDefaults",value:function(e){n.default.extend(i,n.default.isPlainObject(e)&&e)}}]),e}(),r={version:"0.3.2"},o=n.default.fn.shorten,l=function(e){for(var t=arguments.length,s=Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];if("string"==typeof e){var r=e;if(/^_/.test(r))return!1;if(!/^(get)/.test(r))return this.each(function(){var e=n.default.data(this,"shorten");e&&"function"==typeof e[r]&&e[r].apply(e,s)});var o=this.first().data("shorten");if(o&&"function"==typeof o[r])return o[r].apply(o,s)}return this.each(function(){(0,n.default)(this).data("shorten")||(0,n.default)(this).data("shorten",new a(this,e))})};n.default.fn.shorten=l,n.default.shorten=n.default.extend({setDefaults:a.setDefaults,noConflict:function(){return n.default.fn.shorten=o,l}},r)});
9//# sourceMappingURL=jquery-shorten.min.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.