Skip to content

Instantly share code, notes, and snippets.

@cryptid11
Created October 21, 2019 04:50
Show Gist options
  • Save cryptid11/e55d374ef9df82959e75ecd6a1d9ca3f to your computer and use it in GitHub Desktop.
Save cryptid11/e55d374ef9df82959e75ecd6a1d9ca3f to your computer and use it in GitHub Desktop.
*/var n,i;n=e,i=function(){var e="retain",t=document,n={}.hasOwnProperty;function i(){return r.apply(null,arguments)||a.apply(null,arguments)}function r(e,t,n,r,o){if(t&&!t.nodeType&&arguments.length<=2)return!1;var s,l="function"==typeof n;l&&(s=n,n=function(e,t){return s(e.text,t.startIndex)});var d=a(t,{find:e,wrap:l?null:n,replace:l?n:"$"+(r||"&"),prepMatch:function(e,t){if(!e[0])throw"findAndReplaceDOMText cannot handle zero-length matches";if(r>0){var n=e[r];e.index+=e[0].indexOf(n),e[0]=n}return e.endIndex=e.index+e[0].length,e.startIndex=e.index,e.index=t,e},filterElements:o});return i.revert=function(){return d.revert()},!0}function a(e,t){return new o(e,t)}function o(t,r){var a=r.preset&&i.PRESETS[r.preset];if(r.portionMode=r.portionMode||e,a)for(var o in a)n.call(a,o)&&!n.call(r,o)&&(r[o]=a[o]);this.node=t,this.options=r,this.prepMatch=r.prepMatch||this.prepMatch,this.reverts=[],this.matches=this.search(),this.matches.length&&this.processMatches()}return i.NON_PROSE_ELEMENTS={br:1,hr:1,script:1,style:1,img:1,video:1,audio:1,canvas:1,svg:1,map:1,object:1,input:1,textarea:1,select:1,option:1,optgroup:1,button:1},i.NON_CONTIGUOUS_PROSE_ELEMENTS={address:1,article:1,aside:1,blockquote:1,dd:1,div:1,dl:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,main:1,nav:1,noscript:1,ol:1,output:1,p:1,pre:1,section:1,ul:1,br:1,li:1,summary:1,dt:1,details:1,rp:1,rt:1,rtc:1,script:1,style:1,img:1,video:1,audio:1,canvas:1,svg:1,map:1,object:1,input:1,textarea:1,select:1,option:1,optgroup:1,button:1,table:1,tbody:1,thead:1,th:1,tr:1,td:1,caption:1,col:1,tfoot:1,colgroup:1},i.NON_INLINE_PROSE=function(e){return n.call(i.NON_CONTIGUOUS_PROSE_ELEMENTS,e.nodeName.toLowerCase())},i.PRESETS={prose:{forceContext:i.NON_INLINE_PROSE,filterElements:function(e){return!n.call(i.NON_PROSE_ELEMENTS,e.nodeName.toLowerCase())}}},i.Finder=o,o.prototype={search:function(){var e,t=0,n=0,i=this.options.find,r=this.getAggregateText(),a=[],o=this;return i="string"==typeof i?RegExp(String(i).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1"),"g"):i,function r(s){for(var l=0,d=s.length;l<d;++l){var c=s[l];if("string"==typeof c){if(i.global)for(;e=i.exec(c);)a.push(o.prepMatch(e,t++,n));else(e=c.match(i))&&a.push(o.prepMatch(e,0,n));n+=c.length}else r(c)}}(r),a},prepMatch:function(e,t,n){if(!e[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");return e.endIndex=n+e.index+e[0].length,e.startIndex=n+e.index,e.index=t,e},getAggregateText:function(){var e=this.options.filterElements,t=this.options.forceContext;return function n(i){if(i.nodeType===Node.TEXT_NODE)return[i.data];if(e&&!e(i))return[];var r=[""],a=0;if(i=i.firstChild)do{if(i.nodeType!==Node.TEXT_NODE){var o=n(i);t&&i.nodeType===Node.ELEMENT_NODE&&(!0===t||t(i))?(r[++a]=o,r[++a]=""):("string"==typeof o[0]&&(r[a]+=o.shift()),o.length&&(r[++a]=o,r[++a]=""))}else r[a]+=i.data}while(i=i.nextSibling);return r}(this.node)},processMatches:function(){var e,t,n,i=this.matches,r=this.node,a=this.options.filterElements,o=[],s=r,l=i.shift(),d=0,c=0,p=[r];e:for(;;){if(s.nodeType===Node.TEXT_NODE&&(!t&&s.length+d>=l.endIndex?t={node:s,index:c++,text:s.data.substring(l.startIndex-d,l.endIndex-d),indexInMatch:0===d?0:d-l.startIndex,indexInNode:l.startIndex-d,endIndexInNode:l.endIndex-d,isEnd:!0}:e&&o.push({node:s,index:c++,text:s.data,indexInMatch:d-l.startIndex,indexInNode:0}),!e&&s.length+d>l.startIndex&&(e={node:s,index:c++,indexInMatch:0,indexInNode:l.startIndex-d,endIndexInNode:l.endIndex-d,text:s.data.substring(l.startIndex-d,l.endIndex-d)}),d+=s.data.length),n=s.nodeType===Node.ELEMENT_NODE&&a&&!a(s),e&&t){if(s=this.replaceMatch(l,e,o,t),d-=t.node.data.length-t.endIndexInNode,e=null,t=null,o=[],c=0,!(l=i.shift()))break}else if(!n&&(s.firstChild||s.nextSibling)){s.firstChild?(p.push(s),s=s.firstChild):s=s.nextSibling;continue}for(;;){if(s.nextSibling){s=s.nextSibling;break}if((s=p.pop())===r)break e}}},revert:function(){for(var e=this.reverts.length;e--;)this.reverts[e]();this.reverts=[]},prepareReplacementString:function(e,t,n){var i=this.options.portionMode;return"first"===i&&t.indexInMatch>0?"":(e=e.replace(/\$(\d+|&|`|')/g,(function(e,t){var i;switch(t){case"&":i=n[0];break;case"`":i=n.input.substring(0,n.startIndex);break;case"'":i=n.input.substring(n.endIndex);break;default:i=n[+t]||""}return i})),"first"===i?e:t.isEnd?e.substring(t.indexInMatch):e.substring(t.indexInMatch,t.indexInMatch+t.text.length))},getPortionReplacementNode:function(e,n){var i=this.options.replace||"$&",r=this.options.wrap,a=this.options.wrapClass;if(r&&r.nodeType){var o=t.createElement("div");o.innerHTML=r.outerHTML||(new XMLSerializer).serializeToString(r),r=o.firstChild}if("function"==typeof i)return(i=i(e,n))&&i.nodeType?i:t.createTextNode(String(i));var s="string"==typeof r?t.createElement(r):r;return s&&a&&(s.className=a),(i=t.createTextNode(this.prepareReplacementString(i,e,n))).data&&s?(s.appendChild(i),s):i},replaceMatch:function(e,n,i,r){var a,o,s=n.node,l=r.node;if(s===l){var d=s;n.indexInNode>0&&(a=t.createTextNode(d.data.substring(0,n.indexInNode)),d.parentNode.insertBefore(a,d));var c=this.getPortionReplacementNode(r,e);return d.parentNode.insertBefore(c,d),r.endIndexInNode<d.length&&(o=t.createTextNode(d.data.substring(r.endIndexInNode)),d.parentNode.insertBefore(o,d)),d.parentNode.removeChild(d),this.reverts.push((function(){a===c.previousSibling&&a.parentNode.removeChild(a),o===c.nextSibling&&o.parentNode.removeChild(o),c.parentNode.replaceChild(d,c)})),c}a=t.createTextNode(s.data.substring(0,n.indexInNode)),o=t.createTextNode(l.data.substring(r.endIndexInNode));for(var p=this.getPortionReplacementNode(n,e),u=[],h=0,g=i.length;h<g;++h){var f=i[h],m=this.getPortionReplacementNode(f,e);f.node.parentNode.replaceChild(m,f.node),this.reverts.push(function(e,t){return function(){t.parentNode.replaceChild(e.node,t)}}(f,m)),u.push(m)}var b=this.getPortionReplacementNode(r,e);return s.parentNode.insertBefore(a,s),s.parentNode.insertBefore(p,s),s.parentNode.removeChild(s),l.parentNode.insertBefore(b,l),l.parentNode.insertBefore(o,l),l.parentNode.removeChild(l),this.reverts.push((function(){a.parentNode.removeChild(a),p.parentNode.replaceChild(s,p),o.parentNode.removeChild(o),b.parentNode.replaceChild(l,b)})),b}},i},t.exports?t.exports=i():n.findAndReplaceDOMText=i()}));var n=new RegExp("\\b("+["(business|client|community|culture|customer|data|goal|intelligence|market|process|quality|results|role|sales|subject|service|user).(centric(ity)?|facing|oriented|driven|focused|assessment|service|process)","24/7","ai","agile","artificial intelligence","at (your|their) fingertips","autonomous","a[-/]b testing","acquisition","action items?","advantages?","aggregate","accelerate","all.in.one","analytics?","application service providers?","assets?","authoritative","automated","augmented","extended reality","award.winning","b2(b|c)","back to the drawing board","ball.?park","band.aid","bandwidth","(benefit|gap) analysis","bespoke","best.in.class","best.of.breed","best.practice","big.data","big picture","big thinkers?","block.?chain","blazing(ly)? fast","bottom.line","bottom.up","boost(s|ing)?","brain.?storm(ing)?","brain.?dump","brand(s?|ing|ed)","bright","burn.rates?","business( cases| plans)","buzz","call to action","capacity","capabilit(y|ies)","capitali(s|z)e","centers? of excellence","challenges?","change agents?","circle the wagons","cloud","collaborat(e|ion|ive)s?","communicat(e|ion)s?","company-employee.fit","compelling","competitive( advantage)?","connected systems?","complex","comprehensive","connect the dots","containerizat(e|ion|ing)","content management","contextual(ly)?","contingency plans?","control groups?","convergence","convergent","conversions?","core business","core competenc(y|ies)","core.to.edge","cost-effective","cost/benefit","cost control","craftsmanship","critical path","crypto.currency","crypto(?!graphy).\\w+","crm","cross.sell","crowd.?(fund(s?|ed|ing)|sourc(ed|e|ing))","customer obsession","cutting.edge","cyber","data mining","de-?dupe","deep dive","deep learning","delight","deliverables?","demographic","devops","digital transformation","discovery","distributed ledgers?","disrupt(ive)?","dollar.productive","downsi(s|z)e","drill down","drink the kool-aid","drop.?in","drop the ball","due dilligence","dynamic(s|ally)?","e-?(business|commerce|tailers)","eas(y|ily)","ecosystems?","efficien(t|cy)","elaboration","elephant in the room","elevator pitch","enabl(e|ing)","emerging markets?","empower(ing|ment|s)?","enablement","end of the day","end.to.end","engulf","engag(e|ing)","enhanced?","enterprise","erp","estimate","eta","etched in stone","exceed expectations","exhaustive","expedite","experiences","experts?","expertise","exposure","facilitat(e|or)","fast track","fault.tolerant","first.to.market","flexibility","foot view","four pillars","front lines","functional","futurist","full benefit","future.proof","game changer","game plan","behavioral","global(ly)?","go public","go.to.market","goals?","going forward","granular","ground.?breaking","growth","grow","guidance","guru","hackathon","hacker( mindset)?","happiness manage(ment|rs?)","hardball","heavy.lifting","herding cats","high.level","(high|mass).impact","hive ?mind","hybrid environments?","hyperconverged","holistic","impactful","impeccable","in a nutshell","incent","incentivi(s|z)e","increase the odds","(inflat|redeem)able value","influencers?","innovat(e|ed|ion|ive|ing|or)s?","inspir(e|ing|ation)","insights?","integrat(e|ed|ion)s?","internet of things","intellectual property","intuitive","iot","key results?","knowledge.(base|transfer|sharing)","kpis?","landing pages?","lead the field","leading","leaders?","leadership","learnings","legacy","lessons learned","level (the )? playing field","level set","leverag(e|ing)","low.hanging fruit","look.(&|and).feel","m2m","machine learning","made simple","market (chang(er|ing)|leader|window)","market.ready","marketing collateral","maximi(s|z)e","meaningful( client | )interactions?","measurements?","methodolog(y|ies)","metrics","middleware","milestone","military.grade encryption","mind ?share","mind ?shower","mind-boggling","mindset","(mission|time).critical","ml","moneti(s|z)e","mov(e|ing) (fast|forward)","multitask(ing?)","multifaceted","negotiated","networking","new.economy","new.breed","(new|next|second).(level|gen|generation)","niches?","ninja","no-brainer","non-traditional management","objectives","occupy the field","off.site","off.the.(radar|shelf)","on board","on.premises?","on the (back end|radar screen|same page)","one to one","opportunit(y|ies)","outperform","optimal","outstanding","out(side)?.of.the.(box|loop)","outsourc(e|ed|ing)","(total cost of )?ownership","paradigms?( shift)?","partner(ships?)?","patents?","performance indicators","personaliz(e|ed|ation)","perspective","phases?","phased approach","pipeline","pioneers","planning horizon","platforms?","plug.?in","potentials?","powerful","prioriti(s|z)ed?","proactive","problem space","processes","profit(ability)?","promotion","promotional collateral","prominent","proprietary","proof.of.concept","push the envelope","push.back","productivity","pushing on open doors","quick wins?","rais(e|ing) the bar","ramp.up","relationship management","responsive","engage(ments?)?","reach out","reactivation","real.time","real.world","reconfigure","redefin(e|ed|ing)","red flags?","reengineering","reinvent(ing)? the(.square)? wheel","reinvigorate","relevance","repurpose","resilien(ce|cy|t)","resource allocation","restructuring","retention","return on investment","reus(e|ability)","revenue","reverse.engineer","revisit","rich","road ?map","robust","rock.?star","roi","run the numbers","(s|p)aas","scal(e|es|ing|ability)","high availability","scenarios?","scope","scrum( master)?","seamless","secret sauce","search engine optimization","segments?","self-managed team","seo","(serial )?entrepreneurs?","serverless","shareholder value","significant(ly)?","single-source responsibility","skill ?sets?","smart(er)?","smoke (&|and) mirrors","social(.media|.gaming|.networks?)","solutions?","sophisticated","soup to nuts","sow","stakeholders?","start.up?","statement of work","state.of.the.art","sticky-?ness","strateg(y|ic|ize|ise)","streamlin(ed|e|ing)","story points?","success(ful)?","super(critical|star)","sustainab(le|ility)","synerg(y|ies|ized|i)","tailwinds?","talented","take offline","talking points","target (audience|group)","targeted","tasked","tco","team.building","team.player","teamwork","technolog(y|ies)","that being said","time.to.market","timelines?","top.down","top.of.the.game","total quality","touch.base","touchpoints?","traction","transform","trends?","turnkey","ultimate","up.to.speed","up-?sell","upside","user.friendly","user funnels?","user.experience","utili(s|z)(e|ation)","unicorn","unique approach","unlimited.holidays","values?","valueable","value.add(ed)?","venture","venturing","vertical market","viral","virtual(ization|isation)?","visibility","vision","walk the talk","wearable","web.enabled","win-win","wisdom of crowds","with due respect","with ease","workflows?","world.?class","world a better place","wow.factor"].join("|")+")\\b","gi");t(document.body,{find:n,replace:function(e){var t=e.text,n=t.charAt(0),i=t.length-1,r=(n===n.toUpperCase()?"B":"b")+"ullshit";"ing"===t.substr(i-2)?r+="ting":"s"!==t.charAt(i-1)&&"s"===t.charAt(i)?r+="s":"e"!==t.charAt(i-2)&&"ed"===t.substr(i-1)?r+="ted":"o"!==t.charAt(i-2)&&"or"===t.substr(i-1)&&(r+="ter");var a=document.createElement("abbr");return a.style.color="red",a.title=t,a.innerHTML=r,a},preset:"prose"})}();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment