(function($) { $.plugin(`text`, function(allContent) { if (allContent === undefined || allContent === false) { return this[0].innerText; } if (allContent === true) { return this[0].textContent; } }); })(collector);