WRITING LESS DAMNED CODE

@heydonworks

How to write code

How to write code

How to not write code

How to write code

How to not write code

How to avoid writing code

approx 1000 words

  • Simplicity
  • Performance

+ fringe benefits...

  • You can leave out comments
  • There's nothing to maintain
  • Can use a combination of tabs and spaces

DON'T CODE SOMETHING AT ALL

You're welcome, Twitter.

— Carousels —

How do I support touch here?

What should be the accessible name for this?

What are these things even called?

ALL THE WRONG
QUESTIONS

×

"How do I get out of coding this thing everybody hates?"

“Almost all of the testing I’ve managed has proven content delivered via carousels to be missed by users. Few interact with them.” — Adam Fellowes

“Carousels pose accessibility issues for keyboard and screen reader users that simply cannot be adequately addressed by markup or hacks. Carousels are this decade's <blink> tag.” — Jared Smith

“We have tested rotating offers many times and have found it to be a poor way of presenting home page content.” — Wider Funnel

Unprogressive
Non-enhancement

"Carousel"

— Social media buttons —

You're welcome, Redditers.

<iframe id="twitter-widget-0" scrolling="no" frameborder="0" allowtransparency="true" class="twitter-share-button twitter-share-button-rendered twitter-tweet-button" title="Twitter Tweet Button" src="http://platform.twitter.com/widgets/tweet_button.751ed42d9510c4d9c29f599d8da83b0e.en-gb.html#dnt=false&amp;id=twitter-widget-0&amp;lang=en-gb&amp;original_referer=http%3A%2F%2Fwww.heydonworks.com%2Farticle%2Flook-at-this-shitty-tweet-button&amp;size=l&amp;text=Look%20At%20This%20Shitty%20Tweet%20Button%20%7C%20HeydonWorks&amp;time=1474358328167&amp;type=share&amp;url=http%3A%2F%2Fwww.heydonworks.com%2Farticle%2Flook-at-this-shitty-tweet-button&amp;via=heydonworks" style="position: static; visibility: visible; width: 76px; height: 28px;">
<html data-scribe="page:button" lang="en-gb"><head><meta charset="utf-8"><link rel="dns-prefetch" href="//twitter.com"><title>Tweet Button</title><base target="_blank"><style type="text/css">html{padding:0;margin:0;font:normal normal normal 11px/18px 'Helvetica Neue',Arial,sans-serif;color:#333;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body{padding:0;margin:0;background:transparent}a{text-decoration:none;outline:0}body.rtl{direction:rtl}#widget{display:inline-block;overflow:hidden;text-align:left;white-space:nowrap}.btn-o,.count-o,.btn,.btn .label,#count{display:inline-block;vertical-align:top;zoom:1}.btn-o{max-width:100%}.btn{position:relative;height:20px;padding:1px 8px 1px 6px;font-weight:500;color:#fff;cursor:pointer;background-color:#1b95e0;border-radius:3px;box-sizing:border-box}.rtl .btn{padding:1px 6px 1px 8px}.btn:focus,.btn:hover,.btn:active{background-color:#0c7abf}.btn:active{box-shadow:inset 0 3px 5px rgba(0,0,0,0.1)}.xl .btn:active{box-shadow:inset 0 3px 7px rgba(0,0,0,0.1)}.btn i{position:relative;top:2px;display:inline-block;width:14px;height:14px;background:transparent 0 0 no-repeat;background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2072%2072%22%3E%3Cpath%20fill%3D%22none%22%20d%3D%22M0%200h72v72H0z%22%2F%3E%3Cpath%20class%3D%22icon%22%20fill%3D%22%23fff%22%20d%3D%22M68.812%2015.14c-2.348%201.04-4.87%201.744-7.52%202.06%202.704-1.62%204.78-4.186%205.757-7.243-2.53%201.5-5.33%202.592-8.314%203.176C56.35%2010.59%2052.948%209%2049.182%209c-7.23%200-13.092%205.86-13.092%2013.093%200%201.026.118%202.02.338%202.98C25.543%2024.527%2015.9%2019.318%209.44%2011.396c-1.125%201.936-1.77%204.184-1.77%206.58%200%204.543%202.312%208.552%205.824%2010.9-2.146-.07-4.165-.658-5.93-1.64-.002.056-.002.11-.002.163%200%206.345%204.513%2011.638%2010.504%2012.84-1.1.298-2.256.457-3.45.457-.845%200-1.666-.078-2.464-.23%201.667%205.2%206.5%208.985%2012.23%209.09-4.482%203.51-10.13%205.605-16.26%205.605-1.055%200-2.096-.06-3.122-.184%205.794%203.717%2012.676%205.882%2020.067%205.882%2024.083%200%2037.25-19.95%2037.25-37.25%200-.565-.013-1.133-.038-1.693%202.558-1.847%204.778-4.15%206.532-6.774z%22%2F%3E%3C%2Fsvg%3E")}.btn .label{margin-left:3px;white-space:nowrap}.btn .label b{font-weight:500;white-space:nowrap}.rtl .btn .label{margin-right:3px}.rtl .btn .label b{display:inline-block;direction:ltr}.xl{line-height:26px}.xl .btn{height:28px;padding:1px 10px 1px 9px;border-radius:4px}.rtl.xl .btn{padding:1px 9px 1px 10px}.xl .btn i{top:4px;width:18px;height:18px}.xl .btn .label{margin-left:4px}.rtl.xl .btn .label{margin-right:4px}.aria{position:absolute;left:-999em}.rtl .aria{right:-999em;left:auto}.count-o{position:relative;min-width:15px;min-height:18px;text-align:center;background:#fff;border:#8799a6 solid 1px;border-radius:3px;visibility:hidden}#count{color:#292f33;white-space:nowrap}#count:hover,#count:focus{color:#333;text-decoration:underline}.ncount .count-o{display:none}.count-ready .count-o{visibility:visible}.count-o i,.count-o u{position:absolute;top:50%;left:0;width:0;height:0;margin:-4px 0 0 -4px;border:4px transparent solid;border-left:0;border-right-color:#66757f;zoom:1}.count-o u{margin-left:-3px;border-right-color:#fff}.rtl .count-o i,.rtl .count-o u{right:0;left:auto;margin:-4px -4px 0 0;border:4px transparent solid;border-right:0;border-left-color:#66757f}.rtl .count-o u{margin-right:-3px;border-left-color:#fff}.hcount .count-o{margin:0 0 0 5px}.hcount.rtl .count-o{margin:0 5px 0 0}.hcount #count{padding:0 5px}.xl .count-o{border-radius:4px}.xl.hcount .count-o{margin:0 0 0 6px}.xl.rtl.hcount .count-o{margin:0 6px 0 0}.xl.hcount .count-o i,.xl.hcount .count-o u{margin:-5px 0 0 -5px;border-width:5px 5px 5px 0}.xl.hcount .count-o u{margin-left:-4px}.xl.rtl.hcount .count-o i,.xl.rtl.hcount .count-o u{margin:-5px -5px 0 0;border-width:5px 0 5px 5px}.xl.rtl.hcount .count-o u{margin-right:-4px}.xl #count{padding:0 7px}</style></head><body data-scribe="section:share" class=" xl ltr ready"><div id="widget"><div class="btn-o" data-scribe="component:button" style="width: 76px;"><a href="https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fwww.heydonworks.com%2Farticle%2Flook-at-this-shitty-tweet-button&amp;ref_src=twsrc%5Etfw&amp;text=Look%20At%20This%20Shitty%20Tweet%20Button%20%7C%20HeydonWorks&amp;tw_p=tweetbutton&amp;url=http%3A%2F%2Fwww.heydonworks.com%2Farticle%2Flook-at-this-shitty-tweet-button&amp;via=heydonworks" class="btn" id="b"><i></i><span class="label" id="l">Tweet</span></a></div></div><script type="text/javascript">window.__twttr=window.__twttr||{};var i18n = {"en-gb":{}};window._=function(s,reps){s=__twttr.lang&&i18n[__twttr.lang]&&i18n[__twttr.lang][s]||s;if(!reps)return s;return s.replace(/\%\{([a-z0-9_]+)\}/gi,function(m,k){return reps[k]||m})};</script><script>!function(){Function&&Function.prototype&&Function.prototype.bind&&(/MSIE [678]/.test(navigator.userAgent)||!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="https://platform.twitter.com/",e(0)}([function(t,e,n){function r(t){return t=t||h.event,t&&t.preventDefault?t.preventDefault():t.returnValue=!1,t&&t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,!1}function i(t){return t.replace(/(<)|(>)/g,function(t){var e;return e="<"===t[0]?"&lt;":"&gt;"})}function o(t){for(var e=0,n=t.length;n>e;e++)t[e]=i(t[e]);return t}function s(t,e){t.className+=" "+e}function a(){var t=L.parentNode;t.style.width=L.offsetWidth+"px"}function u(){var t=S.getElementById("l");S.title=_("Tweet Button"),t.innerHTML=c(),a(),N.triggerResize(C)}function c(){switch(M.type){case"hashtag":return _("Tweet %{hashtag}",{hashtag:"<b>#"+M.button_hashtag+"</b>"});case"mention":return _("Tweet to %{name}",{name:"<b>@"+M.screen_name+"</b>"});default:return _("Tweet")}}function f(t){var e="scrollbars=yes,resizable=yes,toolbar=no,location=yes",n=550,r=420,i=h.screen.height,o=h.screen.width,s=Math.round(o/2-n/2),a=0;return i>r&&(a=Math.round(i/2-r/2)),h.open(t,null,e+",width="+n+",height="+r+",left="+s+",top="+a)}var l=n(1),p=n(2),h=n(3),d=n(4),g=n(7),v=n(9),m=n(10),y=n(14),w=n(8),b=n(20),E=n(11),T=n(6),x=n(21),N=n(23),O=n(34);x.aug("config",{intentURL:"https://twitter.com/intent/tweet"});var P,R,j,A,I,S=l,L=S.getElementById("b"),C=S.getElementById("widget"),M=o(v.combined(p)),U={l:"xl",m:"regular"},D=["share","mention","hashtag"],F=[],k=O(w.asNumber(M.time));w.asBoolean(M.dnt)&&E.setOn(),M.lang=M.lang&&M.lang.toLowerCase(),S.body.parentNode.lang=M.lang=T.contains(b,M.lang)?M.lang:"en",x.set("lang",M.lang),I=_("ltr"),M.type=T.contains(D,M.type)?M.type:"share",M.size=U[M.size]?M.size:"m",s(S.body,U[M.size]||""),("mention"==M.type||M.screen_name)&&((A=y.screenName(M.screen_name))?M.screen_name=A:(delete M.screen_name,"mention"==M.type&&(M.type="share"))),"hashtag"==M.type||M.button_hashtag?(j=y.hashTag(M.button_hashtag,!1))?(M.button_hashtag=j,M.hashtags=M.button_hashtag+","+(M.hashtags||"")):(delete M.button_hashtag,M.type="share"):"share"==M.type&&(M.url=M.url||S.referrer),F.push(I),s(S.body,F.join(" ")),S.body.setAttribute("data-scribe","section:"+M.type),u(),s(S.body,"ready"),P={text:M.text,screen_name:M.screen_name,hashtags:M.hashtags,url:M.url,via:M.via,related:M.related,share_with_retweet:M.share_with_retweet,placeid:M.placeid,original_referer:S.referrer,partner:M.partner,tw_p:"tweetbutton",ref_src:"twsrc^tfw"},R=x.get("config.intentURL")+"?"+g.encode(P),k||m.clientEvent({page:"button",section:M.type,action:"impression"},{language:M.lang,message:M.size+":",widget_origin:S.referrer,widget_frame:S.location},!1),L.href=R,L.onclick=function(t){return t=t||h.event,m.interaction(t,{},!1),N.trigger("click","tweet"),N.trigger("tweet","tweet"),t.altKey||t.shiftKey||t.metaKey||d.ios()||d.android()?void 0:(f(R,M.id),r(t))}},function(t,e){t.exports=document},function(t,e){t.exports=location},function(t,e){t.exports=window},function(t,e,n){function r(t){return t=t||d,t.devicePixelRatio?t.devicePixelRatio>=1.5:t.matchMedia?t.matchMedia("only screen and (min-resolution: 144dpi)").matches:!1}function i(t){return t=t||v,/(Trident|MSIE|Edge[\/ ]?\d)/.test(t)}function o(t){return t=t||v,/MSIE 9/.test(t)}function s(t){return t=t||v,/(iPad|iPhone|iPod)/.test(t)}function a(t){return t=t||v,/^Mozilla\/5\.0 \(Linux; (U; )?Android/.test(t)}function u(t,e){return t=t||d,e=e||v,t.postMessage&&!(i(e)&&t.opener)}function c(t,e,n){return t=t||d,e=e||h,n=n||v,"ontouchstart"in t||/Opera Mini/.test(n)||e.msMaxTouchPoints>0}function f(){var t=p.body.style;return void 0!==t.transition||void 0!==t.webkitTransition||void 0!==t.mozTransition||void 0!==t.oTransition||void 0!==t.msTransition}function l(){return!!(d.Promise&&d.Promise.resolve&&d.Promise.reject&&d.Promise.all&&d.Promise.race&&function(){var t;return new d.Promise(function(e){t=e}),g.isType("function",t)}())}var p=n(1),h=n(5),d=n(3),g=n(6),v=h.userAgent;t.exports={retina:r,anyIE:i,ie9:o,ios:s,android:a,canPostMessage:u,touch:c,cssTransitions:f,hasPromiseSupport:l}},function(t,e){t.exports=navigator},function(t,e,n){function r(t){return l(arguments).slice(1).forEach(function(e){o(e,function(e,n){t[e]=n})}),t}function i(t){return o(t,function(e,n){u(n)&&(i(n),c(n)&&delete t[e]),void 0!==n&&null!==n&&""!==n||delete t[e]}),t}function o(t,e){for(var n in t)t.hasOwnProperty&&!t.hasOwnProperty(n)||e(n,t[n]);return t}function s(t){return{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function a(t,e){return t==s(e)}function u(t){return t===Object(t)}function c(t){if(!u(t))return!1;if(Object.keys)return!Object.keys(t).length;for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}function f(t,e){h.setTimeout(function(){t.call(e||null)},0)}function l(t){return t?Array.prototype.slice.call(t):[]}function p(t,e){return t&&t.indexOf?t.indexOf(e)>-1:!1}var h=n(3);t.exports={aug:r,async:f,compact:i,contains:p,forIn:o,isObject:u,isEmptyObject:c,toType:s,isType:a,toRealArray:l}},function(t,e,n){function r(t){return encodeURIComponent(t).replace(/\+/g,"%2B").replace(/'/g,"%27")}function i(t){return decodeURIComponent(t)}function o(t){var e=[];return f.forIn(t,function(t,n){var i=r(t);f.isType("array",n)||(n=[n]),n.forEach(function(t){c.hasValue(t)&&e.push(i+"="+r(t))})}),e.sort().join("&")}function s(t){var e,n={};return t?(e=t.split("&"),e.forEach(function(t){var e=t.split("="),r=i(e[0]),o=i(e[1]);return 2==e.length?f.isType("array",n[r])?void n[r].push(o):r in n?(n[r]=[n[r]],void n[r].push(o)):void(n[r]=o):void 0}),n):{}}function a(t,e){var n=o(e);return n.length>0?f.contains(t,"?")?t+"&"+o(e):t+"?"+o(e):t}function u(t){var e=t&&t.split("?");return 2==e.length?s(e[1]):{}}var c=n(8),f=n(6);t.exports={url:a,decodeURL:u,decode:s,encode:o,encodePart:r,decodePart:i}},function(t,e,n){function r(t){return void 0!==t&&null!==t&&""!==t}function i(t){return a(t)&&t%1===0}function o(t){return"string"===g.toType(t)}function s(t){return a(t)&&!i(t)}function a(t){return r(t)&&!isNaN(t)}function u(t){return r(t)&&"array"==g.toType(t)}function c(t){return g.contains(m,t)}function f(t){return g.contains(v,t)}function l(t){return r(t)?f(t)?!0:c(t)?!1:!!t:!1}function p(t){return a(t)?t:void 0}function h(t){return s(t)?t:void 0}function d(t){return i(t)?parseInt(t,10):void 0}var g=n(6),v=[!0,1,"1","on","ON","true","TRUE","yes","YES"],m=[!1,0,"0","off","OFF","false","FALSE","no","NO"];t.exports={hasValue:r,isInt:i,isFloat:s,isNumber:a,isString:o,isArray:u,isTruthValue:f,isFalseValue:c,asInt:d,asFloat:h,asNumber:p,asBoolean:l}},function(t,e,n){var r,i,o,s=n(7);r=function(t){var e=t.search.substr(1);return s.decode(e)},i=function(t){var e=t.href,n=e.indexOf("#"),r=0>n?"":e.substring(n+1);return s.decode(r)},o=function(t){var e,n={},o=r(t),s=i(t);for(e in o)o.hasOwnProperty(e)&&(n[e]=o[e]);for(e in s)s.hasOwnProperty(e)&&(n[e]=s[e]);return n},t.exports={combined:o,fromQuery:r,fromFragment:i}},function(t,e,n){function r(t,e,n){return i(t,e,n,2)}function i(t,e,n,r){var i=!v.isObject(t),o=e?!v.isObject(e):!1;i||o||s(g.formatClientEventNamespace(t),g.formatClientEventData(e,n,r),g.CLIENT_EVENT_ENDPOINT)}function o(t,e,n,r){var o=g.extractTermsFromDOM(t.target||t.srcElement);o.action=r||"click",i(o,e,n)}function s(t,e,n){var r,i;n&&v.isObject(t)&&v.isObject(e)&&(r=g.flattenClientEventPayload(t,e),i={l:g.stringify(r)},r.dnt&&(i.dnt=1),p(d.url(n,i)))}function a(t,e,n,r){var i,o=!v.isObject(t),s=e?!v.isObject(e):!1;if(!o&&!s)return i=g.flattenClientEventPayload(g.formatClientEventNamespace(t),g.formatClientEventData(e,n,r)),u(i)}function u(t){return y.push(t),y}function c(){var t,e;return y.length>1&&a({page:"widgets_js",component:"scribe_pixel",action:"batch_log"},{}),t=y,y=[],e=t.reduce(function(e,n,r){var i=e.length,o=i&&e[i-1],s=r+1==t.length;return s&&n.event_namespace&&"batch_log"==n.event_namespace.action&&(n.message=["entries:"+r,"requests:"+i].join("/")),f(n).forEach(function(t){var n=l(t);(!o||o.urlLength+n>m)&&(o={urlLength:_,items:[]},e.push(o)),o.urlLength+=n,o.items.push(t)}),e},[]),e.map(function(t){var e={l:t.items};return h.enabled()&&(e.dnt=1),p(d.url(g.CLIENT_EVENT_ENDPOINT,e))})}function f(t){return Array.isArray(t)||(t=[t]),t.reduce(function(t,e){var n,r=g.stringify(e),i=l(r);return m>_+i?t=t.concat(r):(n=g.splitLogEntry(e),n.length>1&&(t=t.concat(f(n)))),t},[])}function l(t){return encodeURIComponent(t).length+3}function p(t){var e=new Image;return e.src=t}var h=n(11),d=n(7),g=n(17),v=n(6),m=2083,y=[],w=d.url(g.CLIENT_EVENT_ENDPOINT,{dnt:0,l:""}),_=encodeURIComponent(w).length;t.exports={_enqueueRawObject:u,scribe:s,clientEvent:i,clientEvent2:r,enqueueClientEvent:a,flushClientEvents:c,interaction:o}},function(t,e,n){function r(){p=!0}function i(t,e){return p?!0:f.asBoolean(l.val("dnt"))?!0:!a||1!=a.doNotTrack&&1!=a.msDoNotTrack?c.isUrlSensitive(e||s.host)?!0:u.isFramed()&&c.isUrlSensitive(u.rootDocumentLocation())?!0:(t=h.test(t||o.referrer)&&RegExp.$1,!(!t||!c.isUrlSensitive(t))):!0}var o=n(1),s=n(2),a=n(5),u=n(12),c=n(15),f=n(8),l=n(16),p=!1,h=/https?:\/\/([^\/]+).*/i;t.exports={setOn:r,enabled:i}},function(t,e,n){function r(t){return t&&u.isType("string",t)&&(c=t),c}function i(){return f}function o(){return c!==f}var s=n(2),a=n(13),u=n(6),c=a.getCanonicalURL()||s.href,f=c;t.exports={isFramed:o,rootDocumentLocation:r,currentDocumentLocation:i}},function(t,e,n){function r(t,e){var n,r;return e=e||a,/^https?:\/\//.test(t)?t:/^\/\//.test(t)?e.protocol+t:(n=e.host+(e.port.length?":"+e.port:""),0!==t.indexOf("/")&&(r=e.pathname.split("/"),r.pop(),r.push(t),t="/"+r.join("/")),[e.protocol,"//",n,t].join(""))}function i(){for(var t,e=s.getElementsByTagName("link"),n=0;t=e[n];n++)if("canonical"==t.rel)return r(t.href)}function o(){for(var t,e,n,r=s.getElementsByTagName("a"),i=s.getElementsByTagName("link"),o=[r,i],a=0,c=0,f=/\bme\b/;t=o[a];a++)for(c=0;e=t[c];c++)if(f.test(e.rel)&&(n=u.screenName(e.href)))return n}var s=n(1),a=n(2),u=n(14);t.exports={absolutize:r,getCanonicalURL:i,getScreenNameFromPage:o}},function(t,e,n){function r(t){return"string"==typeof t&&b.test(t)&&RegExp.$1.length<=20}function i(t){return r(t)?RegExp.$1:void 0}function o(t,e){var n=_.decodeURL(t);return e=e||!1,n.screen_name=i(t),n.screen_name?_.url("https://twitter.com/intent/"+(e?"follow":"user"),n):void 0}function s(t){return o(t,!0)}function a(t){return"string"==typeof t&&N.test(t)}function u(t,e){return e=void 0===e?!0:e,a(t)?(e?"#":"")+RegExp.$1:void 0}function c(t){return"string"==typeof t&&E.test(t)}function f(t){return c(t)&&RegExp.$1}function l(t){return T.test(t)}function p(t){return x.test(t)}function h(t){return O.test(t)}function d(t){return R.test(t)&&RegExp.$1}function g(t){return P.test(t)&&RegExp.$1}function v(t){return O.test(t)&&RegExp.$1}function m(t){return j.test(t)&&RegExp.$1}function y(t){return A.test(t)?{ownerScreenName:RegExp.$1,slug:RegExp.$2}:!1}function w(t){return I.test(t)&&RegExp.$1}var _=n(7),b=/(?:^|(?:https?\:)?\/\/(?:www\.)?twitter\.com(?:\:\d+)?(?:\/intent\/(?:follow|user)\/?\?screen_name=|(?:\/#!)?\/))@?([\w]+)(?:\?|&|$)/i,E=/(?:^|(?:https?\:)?\/\/(?:www\.)?twitter\.com(?:\:\d+)?\/(?:#!\/)?[\w_]+\/status(?:es)?\/)(\d+)/i,T=/^http(s?):\/\/(\w+\.)*twitter\.com([\:\/]|$)/i,x=/^http(s?):\/\/pbs\.twimg\.com\//,N=/^#?([^.,<>!\s\/#\-\(\)\'\"]+)$/,O=/twitter\.com(?:\:\d{2,4})?\/intent\/(\w+)/,P=/^https?:\/\/(?:www\.)?twitter\.com\/\w+\/timelines\/(\d+)/i,R=/^https?:\/\/(?:www\.)?twitter\.com\/i\/moments\/(\d+)/i,j=/^https?:\/\/(?:www\.)?twitter\.com\/(\w+)\/(?:likes|favorites)/i,A=/^https?:\/\/(?:www\.)?twitter\.com\/(\w+)\/lists\/([\w-]+)/i,I=/^https?:\/\/(?:www\.)?twitter\.com\/i\/live\/(\d+)/i;t.exports={isHashTag:a,hashTag:u,isScreenName:r,screenName:i,isStatus:c,status:f,intentForProfileURL:o,intentForFollowURL:s,isTwitterURL:l,isTwimgURL:p,isIntentURL:h,regexen:{profile:b},momentId:d,collectionId:g,intentType:v,likesScreenName:m,listScreenNameAndSlug:y,eventId:w}},function(t,e,n){function r(t){return t in a?a[t]:a[t]=s.test(t)}function i(){return r(o.host)}var o=n(2),s=/^[^#?]*\.(gov|mil)(:\d+)?([#?].*)?$/i,a={};t.exports={isUrlSensitive:r,isHostPageSensitive:i}},function(t,e,n){function r(t){var e,n,r,i=0;for(o={},t=t||s,e=t.getElementsByTagName("meta");n=e[i];i++)/^twitter:/.test(n.name)&&(r=n.name.replace(/^twitter:/,""),o[r]=n.content)}function i(t){return o[t]}var o,s=n(1);r(),t.exports={init:r,val:i}},function(t,e,n){function r(t,e){var n;return e=e||{},t&&t.nodeType===Node.ELEMENT_NODE?((n=t.getAttribute("data-scribe"))&&n.split(" ").forEach(function(t){var n=t.trim().split(":"),r=n[0],i=n[1];r&&i&&!e[r]&&(e[r]=i)}),r(t.parentNode,e)):e}function i(t){return d.aug({client:"tfw"},t||{})}function o(t,e,n){var r=t&&t.widget_origin||l.referrer;return t=s("tfw_client_event",t,r),t.client_version=v,t.format_version=void 0!==n?n:1,e||(t.widget_origin=r),t}function s(t,e,n){return e=e||{},d.aug({},e,{_category_:t,triggered_on:e.triggered_on||+new Date,dnt:h.enabled(n)})}function a(t,e){var n={};return e=e||{},e.association_namespace=i(t),n[_]=e,n}function u(t,e){return d.aug({},e,{event_namespace:t})}function c(t){var e,n=Array.prototype.toJSON;return delete Array.prototype.toJSON,e=p.stringify(t),n&&(Array.prototype.toJSON=n),e}function f(t){if(t.item_ids&&t.item_ids.length>1){var e=Math.floor(t.item_ids.length/2),n=t.item_ids.slice(0,e),r={},i=t.item_ids.slice(e),o={};n.forEach(function(e){r[e]=t.item_details[e]}),i.forEach(function(e){o[e]=t.item_details[e]});var s=[d.aug({},t,{item_ids:n,item_details:r}),d.aug({},t,{item_ids:i,item_details:o})];return s}return[t]}var l=n(1),p=n(18),h=n(11),d=n(6),g=n(19),v=g.version,m="https://syndication.twitter.com/i/jot",y="https://syndication.twitter.com/i/jot/syndication",w="https://platform.twitter.com/jot.html",_=1;t.exports={extractTermsFromDOM:r,flattenClientEventPayload:u,formatGenericEventData:s,formatClientEventData:o,formatClientEventNamespace:i,formatTweetAssociation:a,splitLogEntry:f,stringify:c,AUDIENCE_ENDPOINT:y,CLIENT_EVENT_ENDPOINT:m,RUFOUS_REDIRECT:w}},function(t,e,n){var r=n(3),i=r.JSON;t.exports={stringify:i.stringify||i.encode,parse:i.parse||i.decode}},function(t,e){t.exports={version:"456f3e2:1473280368619"}},function(t,e){t.exports=["hi","zh-cn","fr","zh-tw","msa","fil","fi","sv","pl","ja","ko","de","it","pt","es","ru","id","tr","da","no","nl","hu","fa","ar","ur","he","th","cs","uk","vi","ro","bn","el","en-gb","gu","kn","mr","ta","bg","ca","hr","sr","sk"]},function(t,e,n){var r=n(22);t.exports=new r("__twttr")},function(t,e,n){function r(t){return a.isType("string",t)?t.split("."):a.isType("array",t)?t:[]}function i(t,e){var n=r(e),i=n.slice(0,-1);return i.reduce(function(t,e,n){if(t[e]=t[e]||{},!a.isObject(t[e]))throw new Error(i.slice(0,n+1).join(".")+" is already defined with a value.");return t[e]},t)}function o(t,e){e=e||s,e[t]=e[t]||{},Object.defineProperty(this,"base",{value:e[t]}),Object.defineProperty(this,"name",{value:t})}var s=n(3),a=n(6);a.aug(o.prototype,{get:function(t){var e=r(t);return e.reduce(function(t,e){return a.isObject(t)?t[e]:void 0},this.base)},set:function(t,e,n){var o=r(t),s=i(this.base,t),a=o.slice(-1);return n&&a in s?s[a]:s[a]=e},init:function(t,e){return this.set(t,e,!0)},unset:function(t){var e=r(t),n=this.get(e.slice(0,-1));n&&delete n[e.slice(-1)]},aug:function(t){var e=this.get(t),n=a.toRealArray(arguments).slice(1);if(e="undefined"!=typeof e?e:{},n.unshift(e),!n.every(a.isObject))throw new Error("Cannot augment non-object.");return this.set(t,a.aug.apply(null,n))},call:function(t){var e=this.get(t),n=a.toRealArray(arguments).slice(1);if(!a.isType("function",e))throw new Error("Function "+t+"does not exist.");return e.apply(null,n)},fullPath:function(t){var e=r(t);return e.unshift(this.name),e.join(".")}}),t.exports=o},function(t,e,n){function r(t){var e=u(t),n=Math.ceil(e.width),r=Math.ceil(e.height);c.notify("twttr.private.resizeButton",{width:n,height:r})}function i(t,e){c.notify("twttr.private.trigger",t,e)}var o=n(3),s=n(24),a=n(30),u=n(33),c=new s(new a.Dispatcher(o.parent,"twttr.button"));t.exports={triggerResize:r,trigger:i}},function(t,e,n){function r(t){if(!t)throw new Error("JsonRpcClient requires a dispatcher");this.idIterator=0,this.dispatcher=t,this.idPrefix=String(+new Date)+a++}function i(t){var e={jsonrpc:s,method:t};return arguments.length>1&&(e.params=[].slice.call(arguments,1)),e}var o=n(25),s="2.0",a=0;r.prototype._generateId=function(){return this.idPrefix+this.idIterator++},r.prototype.notify=function(){this.dispatcher.send(i.apply(null,arguments))},r.prototype.request=function(){var t=i.apply(null,arguments);return t.id=this._generateId(),this.dispatcher.send(t).then(function(t){return"result"in t?t.result:o.reject(t.error)})},t.exports=r},function(t,e,n){var r=n(26).Promise,i=n(3),o=n(4);t.exports=o.hasPromiseSupport()?i.Promise:r},function(t,e,n){var r;(function(t){/*! * @overview es6-promise - a tiny implementation of Promises/A+. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) * @licenseLicensed under MIT license *See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE * @version2.3.0 */(function(){"use strict";function i(t){return"function"==typeof t||"object"==typeof t&&null!==t}function o(t){return"function"==typeof t}function s(t){return"object"==typeof t&&null!==t}function a(t){q=t}function u(t){W=t}function c(){var t=process.nextTick,e=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(e)&&"0"===e[1]&&"10"===e[2]&&(t=setImmediate),function(){t(d)}}function f(){return function(){J(d)}}function l(){var t=0,e=new Z(d),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function p(){var t=new MessageChannel;return t.port1.onmessage=d,function(){t.port2.postMessage(0)}}function h(){return function(){setTimeout(d,1)}}function d(){for(var t=0;Y>t;t+=2){var e=et[t],n=et[t+1];e(n),et[t]=void 0,et[t+1]=void 0}Y=0}function g(){try{var t=n(28);return J=t.runOnLoop||t.runOnContext,f()}catch(e){return h()}}function v(){}function m(){return new TypeError("You cannot resolve a promise with itself")}function y(){return new TypeError("A promises callback cannot return that same promise.")}function w(t){try{return t.then}catch(e){return ot.error=e,ot}}function _(t,e,n,r){try{t.call(e,n,r)}catch(i){return i}}function b(t,e,n){W(function(t){var r=!1,i=_(n,e,function(n){r||(r=!0,e!==n?x(t,n):O(t,n))},function(e){r||(r=!0,P(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&i&&(r=!0,P(t,i))},t)}function E(t,e){e._state===rt?O(t,e._result):e._state===it?P(t,e._result):R(e,void 0,function(e){x(t,e)},function(e){P(t,e)})}function T(t,e){if(e.constructor===t.constructor)E(t,e);else{var n=w(e);n===ot?P(t,ot.error):void 0===n?O(t,e):o(n)?b(t,e,n):O(t,e)}}function x(t,e){t===e?P(t,m()):i(e)?T(t,e):O(t,e)}function N(t){t._onerror&&t._onerror(t._result),j(t)}function O(t,e){t._state===nt&&(t._result=e,t._state=rt,0!==t._subscribers.length&&W(j,t))}function P(t,e){t._state===nt&&(t._state=it,t._result=e,W(N,t))}function R(t,e,n,r){var i=t._subscribers,o=i.length;t._onerror=null,i[o]=e,i[o+rt]=n,i[o+it]=r,0===o&&t._state&&W(j,t)}function j(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r,i,o=t._result,s=0;s<e.length;s+=3)r=e[s],i=e[s+n],r?S(n,r,i,o):i(o);t._subscribers.length=0}}function A(){this.error=null}function I(t,e){try{return t(e)}catch(n){return st.error=n,st}}function S(t,e,n,r){var i,s,a,u,c=o(n);if(c){if(i=I(n,r),i===st?(u=!0,s=i.error,i=null):a=!0,e===i)return void P(e,y())}else i=r,a=!0;e._state!==nt||(c&&a?x(e,i):u?P(e,s):t===rt?O(e,i):t===it&&P(e,i))}function L(t,e){try{e(function(e){x(t,e)},function(e){P(t,e)})}catch(n){P(t,n)}}function C(t,e){var n=this;n._instanceConstructor=t,n.promise=new t(v),n._validateInput(e)?(n._input=e,n.length=e.length,n._remaining=e.length,n._init(),0===n.length?O(n.promise,n._result):(n.length=n.length||0,n._enumerate(),0===n._remaining&&O(n.promise,n._result))):P(n.promise,n._validationError())}function M(t){return new at(this,t).promise}function U(t){function e(t){x(i,t)}function n(t){P(i,t)}var r=this,i=new r(v);if(!K(t))return P(i,new TypeError("You must pass an array to race.")),i;for(var o=t.length,s=0;i._state===nt&&o>s;s++)R(r.resolve(t[s]),void 0,e,n);return i}function D(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(v);return x(n,t),n}function F(t){var e=this,n=new e(v);return P(n,t),n}function k(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function $(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function z(t){this._id=pt++,this._state=void 0,this._result=void 0,this._subscribers=[],v!==t&&(o(t)||k(),this instanceof z||$(),L(this,t))}function B(){var t;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;n&&"[object Promise]"===Object.prototype.toString.call(n.resolve())&&!n.cast||(t.Promise=ht)}var V;V=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var J,q,H,K=V,Y=0,W=({}.toString,function(t,e){et[Y]=t,et[Y+1]=e,Y+=2,2===Y&&(q?q(d):H())}),G="undefined"!=typeof window?window:void 0,Q=G||{},Z=Q.MutationObserver||Q.WebKitMutationObserver,X="undefined"!=typeof process&&"[object process]"==={}.toString.call(process),tt="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,et=new Array(1e3);H=X?c():Z?l():tt?p():void 0===G?g():h();var nt=void 0,rt=1,it=2,ot=new A,st=new A;C.prototype._validateInput=function(t){return K(t)},C.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},C.prototype._init=function(){this._result=new Array(this.length)};var at=C;C.prototype._enumerate=function(){for(var t=this,e=t.length,n=t.promise,r=t._input,i=0;n._state===nt&&e>i;i++)t._eachEntry(r[i],i)},C.prototype._eachEntry=function(t,e){var n=this,r=n._instanceConstructor;s(t)?t.constructor===r&&t._state!==nt?(t._onerror=null,n._settledAt(t._state,e,t._result)):n._willSettleAt(r.resolve(t),e):(n._remaining--,n._result[e]=t)},C.prototype._settledAt=function(t,e,n){var r=this,i=r.promise;i._state===nt&&(r._remaining--,t===it?P(i,n):r._result[e]=n),0===r._remaining&&O(i,r._result)},C.prototype._willSettleAt=function(t,e){var n=this;R(t,void 0,function(t){n._settledAt(rt,e,t)},function(t){n._settledAt(it,e,t)})};var ut=M,ct=U,ft=D,lt=F,pt=0,ht=z;z.all=ut,z.race=ct,z.resolve=ft,z.reject=lt,z._setScheduler=a,z._setAsap=u,z._asap=W,z.prototype={constructor:z,then:function(t,e){var n=this,r=n._state;if(r===rt&&!t||r===it&&!e)return this;var i=new this.constructor(v),o=n._result;if(r){var s=arguments[r-1];W(function(){S(r,i,s,o)})}else R(n,i,t,e);return i},"catch":function(t){return this.then(null,t)}};var dt=B,gt={Promise:ht,polyfill:dt};n(29).amd?(r=function(){return gt}.call(e,n,e,t),!(void 0!==r&&(t.exports=r))):"undefined"!=typeof t&&t.exports&&(t.exports=gt)}).call(this)}).call(e,n(27)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){},function(t,e){t.exports=function(){throw new Error("define cannot be used indirect")}},function(t,e,n){function r(t,e,n){var r;t&&t.postMessage&&(m?r=(n||"")+l.stringify(e):n?(r={},r[n]=e):r=e,t.postMessage(r,"*"))}function i(t){return d.isType("string",t)?t:"JSONRPC"}function o(t,e){return e?d.isType("string",t)&&0===t.indexOf(e)?t.substring(e.length):t[e]?t[e]:void 0:t}function s(t,e){var n=t.document;this.filter=i(e),this.server=null,this.isTwitterFrame=g.isTwitterURL(n.location.href),t.addEventListener("message",v(this._onMessage,this),!1)}function a(t,e){this.pending={},this.target=t,this.isTwitterHost=g.isTwitterURL(c.href),this.filter=i(e),f.addEventListener("message",v(this._onMessage,this),!1)}function u(t){return arguments.length>0&&(m=!!t),m}var c=n(2),f=n(3),l=n(18),p=n(31),h=n(4),d=n(6),g=n(14),v=n(32),m=h.ie9();d.aug(s.prototype,{_onMessage:function(t){var e,n=this;this.server&&(this.isTwitterFrame&&!g.isTwitterURL(t.origin)||(e=o(t.data,this.filter),e&&this.server.receive(e,t.source).then(function(e){e&&r(t.source,e,n.filter)})))},attachTo:function(t){this.server=t},detach:function(){this.server=null}}),d.aug(a.prototype,{_processResponse:function(t){var e=this.pending[t.id];e&&(e.resolve(t),delete this.pending[t.id])},_onMessage:function(t){var e;if((!this.isTwitterHost||g.isTwitterURL(t.origin))&&(e=o(t.data,this.filter))){if(d.isType("string",e))try{e=l.parse(e)}catch(n){return}e=d.isType("array",e)?e:[e],e.forEach(v(this._processResponse,this))}},send:function(t){var e=new p;return t.id?this.pending[t.id]=e:e.resolve(),r(this.target,t,this.filter),e.promise}}),t.exports={Receiver:s,Dispatcher:a,_stringifyPayload:u}},function(t,e,n){function r(){var t=this;this.promise=new i(function(e,n){t.resolve=e,t.reject=n})}var i=n(25);t.exports=r},function(t,e,n){var r=n(6);t.exports=function(t,e){var n=Array.prototype.slice.call(arguments,2);return function(){var i=r.toRealArray(arguments);return t.apply(e,n.concat(i))}}},function(t,e){function n(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height}}t.exports=n},function(t,e){var n=3e4;t.exports=function(t,e){var r=+new Date;return e=e||n,t>r-e}}]))}();;</script></body></html>
</iframe>

<iframe id="twitter-widget-0" scrolling="no" frameborder="0" allowtransparency="true" class="twitter-share-button twitter-share-button-rendered twitter-tweet-button" title="Twitter Tweet Button" src="http://platform.twitter.com/widgets/tweet_button.751ed42d9510c4d9c29f599d8da83b0e.en-gb.html#dnt=false&amp;id=twitter-widget-0&amp;lang=en-gb&amp;original_referer=http%3A%2F%2Fwww.heydonworks.com%2Farticle%2Flook-at-this-shitty-tweet-button&amp;size=l&amp;text=Look%20At%20This%20Shitty%20Tweet%20Button%20%7C%20HeydonWorks&amp;time=1474358328167&amp;type=share&amp;url=http%3A%2F%2Fwww.heydonworks.com%2Farticle%2Flook-at-this-shitty-tweet-button&amp;via=heydonworks" style="position: static; visibility: visible; width: 76px; height: 28px;">
<html data-scribe="page:button" lang="en-gb"><head><meta charset="utf-8"><link rel="dns-prefetch" href="//twitter.com"><title>Tweet Button</title><base target="_blank"><style type="text/css">html{padding:0;margin:0;font:normal normal normal 11px/18px 'Helvetica Neue',Arial,sans-serif;color:#333;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body{padding:0;margin:0;background:transparent}a{text-decoration:none;outline:0}body.rtl{direction:rtl}#widget{display:inline-block;overflow:hidden;text-align:left;white-space:nowrap}.btn-o,.count-o,.btn,.btn .label,#count{display:inline-block;vertical-align:top;zoom:1}.btn-o{max-width:100%}.btn{position:relative;height:20px;padding:1px 8px 1px 6px;font-weight:500;color:#fff;cursor:pointer;background-color:#1b95e0;border-radius:3px;box-sizing:border-box}.rtl .btn{padding:1px 6px 1px 8px}.btn:focus,.btn:hover,.btn:active{background-color:#0c7abf}.btn:active{box-shadow:inset 0 3px 5px rgba(0,0,0,0.1)}.xl .btn:active{box-shadow:inset 0 3px 7px rgba(0,0,0,0.1)}.btn i{position:relative;top:2px;display:inline-block;width:14px;height:14px;background:transparent 0 0 no-repeat;background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2072%2072%22%3E%3Cpath%20fill%3D%22none%22%20d%3D%22M0%200h72v72H0z%22%2F%3E%3Cpath%20class%3D%22icon%22%20fill%3D%22%23fff%22%20d%3D%22M68.812%2015.14c-2.348%201.04-4.87%201.744-7.52%202.06%202.704-1.62%204.78-4.186%205.757-7.243-2.53%201.5-5.33%202.592-8.314%203.176C56.35%2010.59%2052.948%209%2049.182%209c-7.23%200-13.092%205.86-13.092%2013.093%200%201.026.118%202.02.338%202.98C25.543%2024.527%2015.9%2019.318%209.44%2011.396c-1.125%201.936-1.77%204.184-1.77%206.58%200%204.543%202.312%208.552%205.824%2010.9-2.146-.07-4.165-.658-5.93-1.64-.002.056-.002.11-.002.163%200%206.345%204.513%2011.638%2010.504%2012.84-1.1.298-2.256.457-3.45.457-.845%200-1.666-.078-2.464-.23%201.667%205.2%206.5%208.985%2012.23%209.09-4.482%203.51-10.13%205.605-16.26%205.605-1.055%200-2.096-.06-3.122-.184%205.794%203.717%2012.676%205.882%2020.067%205.882%2024.083%200%2037.25-19.95%2037.25-37.25%200-.565-.013-1.133-.038-1.693%202.558-1.847%204.778-4.15%206.532-6.774z%22%2F%3E%3C%2Fsvg%3E")}.btn .label{margin-left:3px;white-space:nowrap}.btn .label b{font-weight:500;white-space:nowrap}.rtl .btn .label{margin-right:3px}.rtl .btn .label b{display:inline-block;direction:ltr}.xl{line-height:26px}.xl .btn{height:28px;padding:1px 10px 1px 9px;border-radius:4px}.rtl.xl .btn{padding:1px 9px 1px 10px}.xl .btn i{top:4px;width:18px;height:18px}.xl .btn .label{margin-left:4px}.rtl.xl .btn .label{margin-right:4px}.aria{position:absolute;left:-999em}.rtl .aria{right:-999em;left:auto}.count-o{position:relative;min-width:15px;min-height:18px;text-align:center;background:#fff;border:#8799a6 solid 1px;border-radius:3px;visibility:hidden}#count{color:#292f33;white-space:nowrap}#count:hover,#count:focus{color:#333;text-decoration:underline}.ncount .count-o{display:none}.count-ready .count-o{visibility:visible}.count-o i,.count-o u{position:absolute;top:50%;left:0;width:0;height:0;margin:-4px 0 0 -4px;border:4px transparent solid;border-left:0;border-right-color:#66757f;zoom:1}.count-o u{margin-left:-3px;border-right-color:#fff}.rtl .count-o i,.rtl .count-o u{right:0;left:auto;margin:-4px -4px 0 0;border:4px transparent solid;border-right:0;border-left-color:#66757f}.rtl .count-o u{margin-right:-3px;border-left-color:#fff}.hcount .count-o{margin:0 0 0 5px}.hcount.rtl .count-o{margin:0 5px 0 0}.hcount #count{padding:0 5px}.xl .count-o{border-radius:4px}.xl.hcount .count-o{margin:0 0 0 6px}.xl.rtl.hcount .count-o{margin:0 6px 0 0}.xl.hcount .count-o i,.xl.hcount .count-o u{margin:-5px 0 0 -5px;border-width:5px 5px 5px 0}.xl.hcount .count-o u{margin-left:-4px}.xl.rtl.hcount .count-o i,.xl.rtl.hcount .count-o u{margin:-5px -5px 0 0;border-width:5px 0 5px 5px}.xl.rtl.hcount .count-o u{margin-right:-4px}.xl #count{padding:0 7px}</style></head><body data-scribe="section:share" class=" xl ltr ready"><div id="widget"><div class="btn-o" data-scribe="component:button" style="width: 76px;"><a href="https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fwww.heydonworks.com%2Farticle%2Flook-at-this-shitty-tweet-button&amp;ref_src=twsrc%5Etfw&amp;text=Look%20At%20This%20Shitty%20Tweet%20Button%20%7C%20HeydonWorks&amp;tw_p=tweetbutton&amp;url=http%3A%2F%2Fwww.heydonworks.com%2Farticle%2Flook-at-this-shitty-tweet-button&amp;via=heydonworks" class="btn" id="b"><i></i><span class="label" id="l">Tweet</span></a></div></div><script type="text/javascript">window.__twttr=window.__twttr||{};var i18n = {"en-gb":{}};window._=function(s,reps){s=__twttr.lang&&i18n[__twttr.lang]&&i18n[__twttr.lang][s]||s;if(!reps)return s;return s.replace(/\%\{([a-z0-9_]+)\}/gi,function(m,k){return reps[k]||m})};</script><script>!function(){Function&&Function.prototype&&Function.prototype.bind&&(/MSIE [678]/.test(navigator.userAgent)||!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="https://platform.twitter.com/",e(0)}([function(t,e,n){function r(t){return t=t||h.event,t&&t.preventDefault?t.preventDefault():t.returnValue=!1,t&&t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,!1}function i(t){return t.replace(/(<)|(>)/g,function(t){var e;return e="<"===t[0]?"&lt;":"&gt;"})}function o(t){for(var e=0,n=t.length;n>e;e++)t[e]=i(t[e]);return t}function s(t,e){t.className+=" "+e}function a(){var t=L.parentNode;t.style.width=L.offsetWidth+"px"}function u(){var t=S.getElementById("l");S.title=_("Tweet Button"),t.innerHTML=c(),a(),N.triggerResize(C)}function c(){switch(M.type){case"hashtag":return _("Tweet %{hashtag}",{hashtag:"<b>#"+M.button_hashtag+"</b>"});case"mention":return _("Tweet to %{name}",{name:"<b>@"+M.screen_name+"</b>"});default:return _("Tweet")}}function f(t){var e="scrollbars=yes,resizable=yes,toolbar=no,location=yes",n=550,r=420,i=h.screen.height,o=h.screen.width,s=Math.round(o/2-n/2),a=0;return i>r&&(a=Math.round(i/2-r/2)),h.open(t,null,e+",width="+n+",height="+r+",left="+s+",top="+a)}var l=n(1),p=n(2),h=n(3),d=n(4),g=n(7),v=n(9),m=n(10),y=n(14),w=n(8),b=n(20),E=n(11),T=n(6),x=n(21),N=n(23),O=n(34);x.aug("config",{intentURL:"https://twitter.com/intent/tweet"});var P,R,j,A,I,S=l,L=S.getElementById("b"),C=S.getElementById("widget"),M=o(v.combined(p)),U={l:"xl",m:"regular"},D=["share","mention","hashtag"],F=[],k=O(w.asNumber(M.time));w.asBoolean(M.dnt)&&E.setOn(),M.lang=M.lang&&M.lang.toLowerCase(),S.body.parentNode.lang=M.lang=T.contains(b,M.lang)?M.lang:"en",x.set("lang",M.lang),I=_("ltr"),M.type=T.contains(D,M.type)?M.type:"share",M.size=U[M.size]?M.size:"m",s(S.body,U[M.size]||""),("mention"==M.type||M.screen_name)&&((A=y.screenName(M.screen_name))?M.screen_name=A:(delete M.screen_name,"mention"==M.type&&(M.type="share"))),"hashtag"==M.type||M.button_hashtag?(j=y.hashTag(M.button_hashtag,!1))?(M.button_hashtag=j,M.hashtags=M.button_hashtag+","+(M.hashtags||"")):(delete M.button_hashtag,M.type="share"):"share"==M.type&&(M.url=M.url||S.referrer),F.push(I),s(S.body,F.join(" ")),S.body.setAttribute("data-scribe","section:"+M.type),u(),s(S.body,"ready"),P={text:M.text,screen_name:M.screen_name,hashtags:M.hashtags,url:M.url,via:M.via,related:M.related,share_with_retweet:M.share_with_retweet,placeid:M.placeid,original_referer:S.referrer,partner:M.partner,tw_p:"tweetbutton",ref_src:"twsrc^tfw"},R=x.get("config.intentURL")+"?"+g.encode(P),k||m.clientEvent({page:"button",section:M.type,action:"impression"},{language:M.lang,message:M.size+":",widget_origin:S.referrer,widget_frame:S.location},!1),L.href=R,L.onclick=function(t){return t=t||h.event,m.interaction(t,{},!1),N.trigger("click","tweet"),N.trigger("tweet","tweet"),t.altKey||t.shiftKey||t.metaKey||d.ios()||d.android()?void 0:(f(R,M.id),r(t))}},function(t,e){t.exports=document},function(t,e){t.exports=location},function(t,e){t.exports=window},function(t,e,n){function r(t){return t=t||d,t.devicePixelRatio?t.devicePixelRatio>=1.5:t.matchMedia?t.matchMedia("only screen and (min-resolution: 144dpi)").matches:!1}function i(t){return t=t||v,/(Trident|MSIE|Edge[\/ ]?\d)/.test(t)}function o(t){return t=t||v,/MSIE 9/.test(t)}function s(t){return t=t||v,/(iPad|iPhone|iPod)/.test(t)}function a(t){return t=t||v,/^Mozilla\/5\.0 \(Linux; (U; )?Android/.test(t)}function u(t,e){return t=t||d,e=e||v,t.postMessage&&!(i(e)&&t.opener)}function c(t,e,n){return t=t||d,e=e||h,n=n||v,"ontouchstart"in t||/Opera Mini/.test(n)||e.msMaxTouchPoints>0}function f(){var t=p.body.style;return void 0!==t.transition||void 0!==t.webkitTransition||void 0!==t.mozTransition||void 0!==t.oTransition||void 0!==t.msTransition}function l(){return!!(d.Promise&&d.Promise.resolve&&d.Promise.reject&&d.Promise.all&&d.Promise.race&&function(){var t;return new d.Promise(function(e){t=e}),g.isType("function",t)}())}var p=n(1),h=n(5),d=n(3),g=n(6),v=h.userAgent;t.exports={retina:r,anyIE:i,ie9:o,ios:s,android:a,canPostMessage:u,touch:c,cssTransitions:f,hasPromiseSupport:l}},function(t,e){t.exports=navigator},function(t,e,n){function r(t){return l(arguments).slice(1).forEach(function(e){o(e,function(e,n){t[e]=n})}),t}function i(t){return o(t,function(e,n){u(n)&&(i(n),c(n)&&delete t[e]),void 0!==n&&null!==n&&""!==n||delete t[e]}),t}function o(t,e){for(var n in t)t.hasOwnProperty&&!t.hasOwnProperty(n)||e(n,t[n]);return t}function s(t){return{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function a(t,e){return t==s(e)}function u(t){return t===Object(t)}function c(t){if(!u(t))return!1;if(Object.keys)return!Object.keys(t).length;for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}function f(t,e){h.setTimeout(function(){t.call(e||null)},0)}function l(t){return t?Array.prototype.slice.call(t):[]}function p(t,e){return t&&t.indexOf?t.indexOf(e)>-1:!1}var h=n(3);t.exports={aug:r,async:f,compact:i,contains:p,forIn:o,isObject:u,isEmptyObject:c,toType:s,isType:a,toRealArray:l}},function(t,e,n){function r(t){return encodeURIComponent(t).replace(/\+/g,"%2B").replace(/'/g,"%27")}function i(t){return decodeURIComponent(t)}function o(t){var e=[];return f.forIn(t,function(t,n){var i=r(t);f.isType("array",n)||(n=[n]),n.forEach(function(t){c.hasValue(t)&&e.push(i+"="+r(t))})}),e.sort().join("&")}function s(t){var e,n={};return t?(e=t.split("&"),e.forEach(function(t){var e=t.split("="),r=i(e[0]),o=i(e[1]);return 2==e.length?f.isType("array",n[r])?void n[r].push(o):r in n?(n[r]=[n[r]],void n[r].push(o)):void(n[r]=o):void 0}),n):{}}function a(t,e){var n=o(e);return n.length>0?f.contains(t,"?")?t+"&"+o(e):t+"?"+o(e):t}function u(t){var e=t&&t.split("?");return 2==e.length?s(e[1]):{}}var c=n(8),f=n(6);t.exports={url:a,decodeURL:u,decode:s,encode:o,encodePart:r,decodePart:i}},function(t,e,n){function r(t){return void 0!==t&&null!==t&&""!==t}function i(t){return a(t)&&t%1===0}function o(t){return"string"===g.toType(t)}function s(t){return a(t)&&!i(t)}function a(t){return r(t)&&!isNaN(t)}function u(t){return r(t)&&"array"==g.toType(t)}function c(t){return g.contains(m,t)}function f(t){return g.contains(v,t)}function l(t){return r(t)?f(t)?!0:c(t)?!1:!!t:!1}function p(t){return a(t)?t:void 0}function h(t){return s(t)?t:void 0}function d(t){return i(t)?parseInt(t,10):void 0}var g=n(6),v=[!0,1,"1","on","ON","true","TRUE","yes","YES"],m=[!1,0,"0","off","OFF","false","FALSE","no","NO"];t.exports={hasValue:r,isInt:i,isFloat:s,isNumber:a,isString:o,isArray:u,isTruthValue:f,isFalseValue:c,asInt:d,asFloat:h,asNumber:p,asBoolean:l}},function(t,e,n){var r,i,o,s=n(7);r=function(t){var e=t.search.substr(1);return s.decode(e)},i=function(t){var e=t.href,n=e.indexOf("#"),r=0>n?"":e.substring(n+1);return s.decode(r)},o=function(t){var e,n={},o=r(t),s=i(t);for(e in o)o.hasOwnProperty(e)&&(n[e]=o[e]);for(e in s)s.hasOwnProperty(e)&&(n[e]=s[e]);return n},t.exports={combined:o,fromQuery:r,fromFragment:i}},function(t,e,n){function r(t,e,n){return i(t,e,n,2)}function i(t,e,n,r){var i=!v.isObject(t),o=e?!v.isObject(e):!1;i||o||s(g.formatClientEventNamespace(t),g.formatClientEventData(e,n,r),g.CLIENT_EVENT_ENDPOINT)}function o(t,e,n,r){var o=g.extractTermsFromDOM(t.target||t.srcElement);o.action=r||"click",i(o,e,n)}function s(t,e,n){var r,i;n&&v.isObject(t)&&v.isObject(e)&&(r=g.flattenClientEventPayload(t,e),i={l:g.stringify(r)},r.dnt&&(i.dnt=1),p(d.url(n,i)))}function a(t,e,n,r){var i,o=!v.isObject(t),s=e?!v.isObject(e):!1;if(!o&&!s)return i=g.flattenClientEventPayload(g.formatClientEventNamespace(t),g.formatClientEventData(e,n,r)),u(i)}function u(t){return y.push(t),y}function c(){var t,e;return y.length>1&&a({page:"widgets_js",component:"scribe_pixel",action:"batch_log"},{}),t=y,y=[],e=t.reduce(function(e,n,r){var i=e.length,o=i&&e[i-1],s=r+1==t.length;return s&&n.event_namespace&&"batch_log"==n.event_namespace.action&&(n.message=["entries:"+r,"requests:"+i].join("/")),f(n).forEach(function(t){var n=l(t);(!o||o.urlLength+n>m)&&(o={urlLength:_,items:[]},e.push(o)),o.urlLength+=n,o.items.push(t)}),e},[]),e.map(function(t){var e={l:t.items};return h.enabled()&&(e.dnt=1),p(d.url(g.CLIENT_EVENT_ENDPOINT,e))})}function f(t){return Array.isArray(t)||(t=[t]),t.reduce(function(t,e){var n,r=g.stringify(e),i=l(r);return m>_+i?t=t.concat(r):(n=g.splitLogEntry(e),n.length>1&&(t=t.concat(f(n)))),t},[])}function l(t){return encodeURIComponent(t).length+3}function p(t){var e=new Image;return e.src=t}var h=n(11),d=n(7),g=n(17),v=n(6),m=2083,y=[],w=d.url(g.CLIENT_EVENT_ENDPOINT,{dnt:0,l:""}),_=encodeURIComponent(w).length;t.exports={_enqueueRawObject:u,scribe:s,clientEvent:i,clientEvent2:r,enqueueClientEvent:a,flushClientEvents:c,interaction:o}},function(t,e,n){function r(){p=!0}function i(t,e){return p?!0:f.asBoolean(l.val("dnt"))?!0:!a||1!=a.doNotTrack&&1!=a.msDoNotTrack?c.isUrlSensitive(e||s.host)?!0:u.isFramed()&&c.isUrlSensitive(u.rootDocumentLocation())?!0:(t=h.test(t||o.referrer)&&RegExp.$1,!(!t||!c.isUrlSensitive(t))):!0}var o=n(1),s=n(2),a=n(5),u=n(12),c=n(15),f=n(8),l=n(16),p=!1,h=/https?:\/\/([^\/]+).*/i;t.exports={setOn:r,enabled:i}},function(t,e,n){function r(t){return t&&u.isType("string",t)&&(c=t),c}function i(){return f}function o(){return c!==f}var s=n(2),a=n(13),u=n(6),c=a.getCanonicalURL()||s.href,f=c;t.exports={isFramed:o,rootDocumentLocation:r,currentDocumentLocation:i}},function(t,e,n){function r(t,e){var n,r;return e=e||a,/^https?:\/\//.test(t)?t:/^\/\//.test(t)?e.protocol+t:(n=e.host+(e.port.length?":"+e.port:""),0!==t.indexOf("/")&&(r=e.pathname.split("/"),r.pop(),r.push(t),t="/"+r.join("/")),[e.protocol,"//",n,t].join(""))}function i(){for(var t,e=s.getElementsByTagName("link"),n=0;t=e[n];n++)if("canonical"==t.rel)return r(t.href)}function o(){for(var t,e,n,r=s.getElementsByTagName("a"),i=s.getElementsByTagName("link"),o=[r,i],a=0,c=0,f=/\bme\b/;t=o[a];a++)for(c=0;e=t[c];c++)if(f.test(e.rel)&&(n=u.screenName(e.href)))return n}var s=n(1),a=n(2),u=n(14);t.exports={absolutize:r,getCanonicalURL:i,getScreenNameFromPage:o}},function(t,e,n){function r(t){return"string"==typeof t&&b.test(t)&&RegExp.$1.length<=20}function i(t){return r(t)?RegExp.$1:void 0}function o(t,e){var n=_.decodeURL(t);return e=e||!1,n.screen_name=i(t),n.screen_name?_.url("https://twitter.com/intent/"+(e?"follow":"user"),n):void 0}function s(t){return o(t,!0)}function a(t){return"string"==typeof t&&N.test(t)}function u(t,e){return e=void 0===e?!0:e,a(t)?(e?"#":"")+RegExp.$1:void 0}function c(t){return"string"==typeof t&&E.test(t)}function f(t){return c(t)&&RegExp.$1}function l(t){return T.test(t)}function p(t){return x.test(t)}function h(t){return O.test(t)}function d(t){return R.test(t)&&RegExp.$1}function g(t){return P.test(t)&&RegExp.$1}function v(t){return O.test(t)&&RegExp.$1}function m(t){return j.test(t)&&RegExp.$1}function y(t){return A.test(t)?{ownerScreenName:RegExp.$1,slug:RegExp.$2}:!1}function w(t){return I.test(t)&&RegExp.$1}var _=n(7),b=/(?:^|(?:https?\:)?\/\/(?:www\.)?twitter\.com(?:\:\d+)?(?:\/intent\/(?:follow|user)\/?\?screen_name=|(?:\/#!)?\/))@?([\w]+)(?:\?|&|$)/i,E=/(?:^|(?:https?\:)?\/\/(?:www\.)?twitter\.com(?:\:\d+)?\/(?:#!\/)?[\w_]+\/status(?:es)?\/)(\d+)/i,T=/^http(s?):\/\/(\w+\.)*twitter\.com([\:\/]|$)/i,x=/^http(s?):\/\/pbs\.twimg\.com\//,N=/^#?([^.,<>!\s\/#\-\(\)\'\"]+)$/,O=/twitter\.com(?:\:\d{2,4})?\/intent\/(\w+)/,P=/^https?:\/\/(?:www\.)?twitter\.com\/\w+\/timelines\/(\d+)/i,R=/^https?:\/\/(?:www\.)?twitter\.com\/i\/moments\/(\d+)/i,j=/^https?:\/\/(?:www\.)?twitter\.com\/(\w+)\/(?:likes|favorites)/i,A=/^https?:\/\/(?:www\.)?twitter\.com\/(\w+)\/lists\/([\w-]+)/i,I=/^https?:\/\/(?:www\.)?twitter\.com\/i\/live\/(\d+)/i;t.exports={isHashTag:a,hashTag:u,isScreenName:r,screenName:i,isStatus:c,status:f,intentForProfileURL:o,intentForFollowURL:s,isTwitterURL:l,isTwimgURL:p,isIntentURL:h,regexen:{profile:b},momentId:d,collectionId:g,intentType:v,likesScreenName:m,listScreenNameAndSlug:y,eventId:w}},function(t,e,n){function r(t){return t in a?a[t]:a[t]=s.test(t)}function i(){return r(o.host)}var o=n(2),s=/^[^#?]*\.(gov|mil)(:\d+)?([#?].*)?$/i,a={};t.exports={isUrlSensitive:r,isHostPageSensitive:i}},function(t,e,n){function r(t){var e,n,r,i=0;for(o={},t=t||s,e=t.getElementsByTagName("meta");n=e[i];i++)/^twitter:/.test(n.name)&&(r=n.name.replace(/^twitter:/,""),o[r]=n.content)}function i(t){return o[t]}var o,s=n(1);r(),t.exports={init:r,val:i}},function(t,e,n){function r(t,e){var n;return e=e||{},t&&t.nodeType===Node.ELEMENT_NODE?((n=t.getAttribute("data-scribe"))&&n.split(" ").forEach(function(t){var n=t.trim().split(":"),r=n[0],i=n[1];r&&i&&!e[r]&&(e[r]=i)}),r(t.parentNode,e)):e}function i(t){return d.aug({client:"tfw"},t||{})}function o(t,e,n){var r=t&&t.widget_origin||l.referrer;return t=s("tfw_client_event",t,r),t.client_version=v,t.format_version=void 0!==n?n:1,e||(t.widget_origin=r),t}function s(t,e,n){return e=e||{},d.aug({},e,{_category_:t,triggered_on:e.triggered_on||+new Date,dnt:h.enabled(n)})}function a(t,e){var n={};return e=e||{},e.association_namespace=i(t),n[_]=e,n}function u(t,e){return d.aug({},e,{event_namespace:t})}function c(t){var e,n=Array.prototype.toJSON;return delete Array.prototype.toJSON,e=p.stringify(t),n&&(Array.prototype.toJSON=n),e}function f(t){if(t.item_ids&&t.item_ids.length>1){var e=Math.floor(t.item_ids.length/2),n=t.item_ids.slice(0,e),r={},i=t.item_ids.slice(e),o={};n.forEach(function(e){r[e]=t.item_details[e]}),i.forEach(function(e){o[e]=t.item_details[e]});var s=[d.aug({},t,{item_ids:n,item_details:r}),d.aug({},t,{item_ids:i,item_details:o})];return s}return[t]}var l=n(1),p=n(18),h=n(11),d=n(6),g=n(19),v=g.version,m="https://syndication.twitter.com/i/jot",y="https://syndication.twitter.com/i/jot/syndication",w="https://platform.twitter.com/jot.html",_=1;t.exports={extractTermsFromDOM:r,flattenClientEventPayload:u,formatGenericEventData:s,formatClientEventData:o,formatClientEventNamespace:i,formatTweetAssociation:a,splitLogEntry:f,stringify:c,AUDIENCE_ENDPOINT:y,CLIENT_EVENT_ENDPOINT:m,RUFOUS_REDIRECT:w}},function(t,e,n){var r=n(3),i=r.JSON;t.exports={stringify:i.stringify||i.encode,parse:i.parse||i.decode}},function(t,e){t.exports={version:"456f3e2:1473280368619"}},function(t,e){t.exports=["hi","zh-cn","fr","zh-tw","msa","fil","fi","sv","pl","ja","ko","de","it","pt","es","ru","id","tr","da","no","nl","hu","fa","ar","ur","he","th","cs","uk","vi","ro","bn","el","en-gb","gu","kn","mr","ta","bg","ca","hr","sr","sk"]},function(t,e,n){var r=n(22);t.exports=new r("__twttr")},function(t,e,n){function r(t){return a.isType("string",t)?t.split("."):a.isType("array",t)?t:[]}function i(t,e){var n=r(e),i=n.slice(0,-1);return i.reduce(function(t,e,n){if(t[e]=t[e]||{},!a.isObject(t[e]))throw new Error(i.slice(0,n+1).join(".")+" is already defined with a value.");return t[e]},t)}function o(t,e){e=e||s,e[t]=e[t]||{},Object.defineProperty(this,"base",{value:e[t]}),Object.defineProperty(this,"name",{value:t})}var s=n(3),a=n(6);a.aug(o.prototype,{get:function(t){var e=r(t);return e.reduce(function(t,e){return a.isObject(t)?t[e]:void 0},this.base)},set:function(t,e,n){var o=r(t),s=i(this.base,t),a=o.slice(-1);return n&&a in s?s[a]:s[a]=e},init:function(t,e){return this.set(t,e,!0)},unset:function(t){var e=r(t),n=this.get(e.slice(0,-1));n&&delete n[e.slice(-1)]},aug:function(t){var e=this.get(t),n=a.toRealArray(arguments).slice(1);if(e="undefined"!=typeof e?e:{},n.unshift(e),!n.every(a.isObject))throw new Error("Cannot augment non-object.");return this.set(t,a.aug.apply(null,n))},call:function(t){var e=this.get(t),n=a.toRealArray(arguments).slice(1);if(!a.isType("function",e))throw new Error("Function "+t+"does not exist.");return e.apply(null,n)},fullPath:function(t){var e=r(t);return e.unshift(this.name),e.join(".")}}),t.exports=o},function(t,e,n){function r(t){var e=u(t),n=Math.ceil(e.width),r=Math.ceil(e.height);c.notify("twttr.private.resizeButton",{width:n,height:r})}function i(t,e){c.notify("twttr.private.trigger",t,e)}var o=n(3),s=n(24),a=n(30),u=n(33),c=new s(new a.Dispatcher(o.parent,"twttr.button"));t.exports={triggerResize:r,trigger:i}},function(t,e,n){function r(t){if(!t)throw new Error("JsonRpcClient requires a dispatcher");this.idIterator=0,this.dispatcher=t,this.idPrefix=String(+new Date)+a++}function i(t){var e={jsonrpc:s,method:t};return arguments.length>1&&(e.params=[].slice.call(arguments,1)),e}var o=n(25),s="2.0",a=0;r.prototype._generateId=function(){return this.idPrefix+this.idIterator++},r.prototype.notify=function(){this.dispatcher.send(i.apply(null,arguments))},r.prototype.request=function(){var t=i.apply(null,arguments);return t.id=this._generateId(),this.dispatcher.send(t).then(function(t){return"result"in t?t.result:o.reject(t.error)})},t.exports=r},function(t,e,n){var r=n(26).Promise,i=n(3),o=n(4);t.exports=o.hasPromiseSupport()?i.Promise:r},function(t,e,n){var r;(function(t){/*! * @overview es6-promise - a tiny implementation of Promises/A+. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) * @licenseLicensed under MIT license *See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE * @version2.3.0 */(function(){"use strict";function i(t){return"function"==typeof t||"object"==typeof t&&null!==t}function o(t){return"function"==typeof t}function s(t){return"object"==typeof t&&null!==t}function a(t){q=t}function u(t){W=t}function c(){var t=process.nextTick,e=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(e)&&"0"===e[1]&&"10"===e[2]&&(t=setImmediate),function(){t(d)}}function f(){return function(){J(d)}}function l(){var t=0,e=new Z(d),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function p(){var t=new MessageChannel;return t.port1.onmessage=d,function(){t.port2.postMessage(0)}}function h(){return function(){setTimeout(d,1)}}function d(){for(var t=0;Y>t;t+=2){var e=et[t],n=et[t+1];e(n),et[t]=void 0,et[t+1]=void 0}Y=0}function g(){try{var t=n(28);return J=t.runOnLoop||t.runOnContext,f()}catch(e){return h()}}function v(){}function m(){return new TypeError("You cannot resolve a promise with itself")}function y(){return new TypeError("A promises callback cannot return that same promise.")}function w(t){try{return t.then}catch(e){return ot.error=e,ot}}function _(t,e,n,r){try{t.call(e,n,r)}catch(i){return i}}function b(t,e,n){W(function(t){var r=!1,i=_(n,e,function(n){r||(r=!0,e!==n?x(t,n):O(t,n))},function(e){r||(r=!0,P(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&i&&(r=!0,P(t,i))},t)}function E(t,e){e._state===rt?O(t,e._result):e._state===it?P(t,e._result):R(e,void 0,function(e){x(t,e)},function(e){P(t,e)})}function T(t,e){if(e.constructor===t.constructor)E(t,e);else{var n=w(e);n===ot?P(t,ot.error):void 0===n?O(t,e):o(n)?b(t,e,n):O(t,e)}}function x(t,e){t===e?P(t,m()):i(e)?T(t,e):O(t,e)}function N(t){t._onerror&&t._onerror(t._result),j(t)}function O(t,e){t._state===nt&&(t._result=e,t._state=rt,0!==t._subscribers.length&&W(j,t))}function P(t,e){t._state===nt&&(t._state=it,t._result=e,W(N,t))}function R(t,e,n,r){var i=t._subscribers,o=i.length;t._onerror=null,i[o]=e,i[o+rt]=n,i[o+it]=r,0===o&&t._state&&W(j,t)}function j(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r,i,o=t._result,s=0;s<e.length;s+=3)r=e[s],i=e[s+n],r?S(n,r,i,o):i(o);t._subscribers.length=0}}function A(){this.error=null}function I(t,e){try{return t(e)}catch(n){return st.error=n,st}}function S(t,e,n,r){var i,s,a,u,c=o(n);if(c){if(i=I(n,r),i===st?(u=!0,s=i.error,i=null):a=!0,e===i)return void P(e,y())}else i=r,a=!0;e._state!==nt||(c&&a?x(e,i):u?P(e,s):t===rt?O(e,i):t===it&&P(e,i))}function L(t,e){try{e(function(e){x(t,e)},function(e){P(t,e)})}catch(n){P(t,n)}}function C(t,e){var n=this;n._instanceConstructor=t,n.promise=new t(v),n._validateInput(e)?(n._input=e,n.length=e.length,n._remaining=e.length,n._init(),0===n.length?O(n.promise,n._result):(n.length=n.length||0,n._enumerate(),0===n._remaining&&O(n.promise,n._result))):P(n.promise,n._validationError())}function M(t){return new at(this,t).promise}function U(t){function e(t){x(i,t)}function n(t){P(i,t)}var r=this,i=new r(v);if(!K(t))return P(i,new TypeError("You must pass an array to race.")),i;for(var o=t.length,s=0;i._state===nt&&o>s;s++)R(r.resolve(t[s]),void 0,e,n);return i}function D(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(v);return x(n,t),n}function F(t){var e=this,n=new e(v);return P(n,t),n}function k(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function $(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function z(t){this._id=pt++,this._state=void 0,this._result=void 0,this._subscribers=[],v!==t&&(o(t)||k(),this instanceof z||$(),L(this,t))}function B(){var t;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;n&&"[object Promise]"===Object.prototype.toString.call(n.resolve())&&!n.cast||(t.Promise=ht)}var V;V=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var J,q,H,K=V,Y=0,W=({}.toString,function(t,e){et[Y]=t,et[Y+1]=e,Y+=2,2===Y&&(q?q(d):H())}),G="undefined"!=typeof window?window:void 0,Q=G||{},Z=Q.MutationObserver||Q.WebKitMutationObserver,X="undefined"!=typeof process&&"[object process]"==={}.toString.call(process),tt="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,et=new Array(1e3);H=X?c():Z?l():tt?p():void 0===G?g():h();var nt=void 0,rt=1,it=2,ot=new A,st=new A;C.prototype._validateInput=function(t){return K(t)},C.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},C.prototype._init=function(){this._result=new Array(this.length)};var at=C;C.prototype._enumerate=function(){for(var t=this,e=t.length,n=t.promise,r=t._input,i=0;n._state===nt&&e>i;i++)t._eachEntry(r[i],i)},C.prototype._eachEntry=function(t,e){var n=this,r=n._instanceConstructor;s(t)?t.constructor===r&&t._state!==nt?(t._onerror=null,n._settledAt(t._state,e,t._result)):n._willSettleAt(r.resolve(t),e):(n._remaining--,n._result[e]=t)},C.prototype._settledAt=function(t,e,n){var r=this,i=r.promise;i._state===nt&&(r._remaining--,t===it?P(i,n):r._result[e]=n),0===r._remaining&&O(i,r._result)},C.prototype._willSettleAt=function(t,e){var n=this;R(t,void 0,function(t){n._settledAt(rt,e,t)},function(t){n._settledAt(it,e,t)})};var ut=M,ct=U,ft=D,lt=F,pt=0,ht=z;z.all=ut,z.race=ct,z.resolve=ft,z.reject=lt,z._setScheduler=a,z._setAsap=u,z._asap=W,z.prototype={constructor:z,then:function(t,e){var n=this,r=n._state;if(r===rt&&!t||r===it&&!e)return this;var i=new this.constructor(v),o=n._result;if(r){var s=arguments[r-1];W(function(){S(r,i,s,o)})}else R(n,i,t,e);return i},"catch":function(t){return this.then(null,t)}};var dt=B,gt={Promise:ht,polyfill:dt};n(29).amd?(r=function(){return gt}.call(e,n,e,t),!(void 0!==r&&(t.exports=r))):"undefined"!=typeof t&&t.exports&&(t.exports=gt)}).call(this)}).call(e,n(27)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){},function(t,e){t.exports=function(){throw new Error("define cannot be used indirect")}},function(t,e,n){function r(t,e,n){var r;t&&t.postMessage&&(m?r=(n||"")+l.stringify(e):n?(r={},r[n]=e):r=e,t.postMessage(r,"*"))}function i(t){return d.isType("string",t)?t:"JSONRPC"}function o(t,e){return e?d.isType("string",t)&&0===t.indexOf(e)?t.substring(e.length):t[e]?t[e]:void 0:t}function s(t,e){var n=t.document;this.filter=i(e),this.server=null,this.isTwitterFrame=g.isTwitterURL(n.location.href),t.addEventListener("message",v(this._onMessage,this),!1)}function a(t,e){this.pending={},this.target=t,this.isTwitterHost=g.isTwitterURL(c.href),this.filter=i(e),f.addEventListener("message",v(this._onMessage,this),!1)}function u(t){return arguments.length>0&&(m=!!t),m}var c=n(2),f=n(3),l=n(18),p=n(31),h=n(4),d=n(6),g=n(14),v=n(32),m=h.ie9();d.aug(s.prototype,{_onMessage:function(t){var e,n=this;this.server&&(this.isTwitterFrame&&!g.isTwitterURL(t.origin)||(e=o(t.data,this.filter),e&&this.server.receive(e,t.source).then(function(e){e&&r(t.source,e,n.filter)})))},attachTo:function(t){this.server=t},detach:function(){this.server=null}}),d.aug(a.prototype,{_processResponse:function(t){var e=this.pending[t.id];e&&(e.resolve(t),delete this.pending[t.id])},_onMessage:function(t){var e;if((!this.isTwitterHost||g.isTwitterURL(t.origin))&&(e=o(t.data,this.filter))){if(d.isType("string",e))try{e=l.parse(e)}catch(n){return}e=d.isType("array",e)?e:[e],e.forEach(v(this._processResponse,this))}},send:function(t){var e=new p;return t.id?this.pending[t.id]=e:e.resolve(),r(this.target,t,this.filter),e.promise}}),t.exports={Receiver:s,Dispatcher:a,_stringifyPayload:u}},function(t,e,n){function r(){var t=this;this.promise=new i(function(e,n){t.resolve=e,t.reject=n})}var i=n(25);t.exports=r},function(t,e,n){var r=n(6);t.exports=function(t,e){var n=Array.prototype.slice.call(arguments,2);return function(){var i=r.toRealArray(arguments);return t.apply(e,n.concat(i))}}},function(t,e){function n(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height}}t.exports=n},function(t,e){var n=3e4;t.exports=function(t,e){var r=+new Date;return e=e||n,t>r-e}}]))}();;</script></body></html>
</iframe>

<a href="https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fwww.heydonworks.com%2Farticle%2Flook-at-this-shitty-tweet-button&amp;ref_src=twsrc%5Etfw&amp;text=Look%20At%20This%20Shitty%20Tweet%20Button%20%7C%20HeydonWorks&amp;tw_p=tweetbutton&amp;url=http%3A%2F%2Fwww.heydonworks.com%2Farticle%2Flook-at-this-shitty-tweet-button&amp;via=heydonworks" class="btn" id="b"><i></i><span class="label" id="l">Tweet</span></a>

It's just a link.

<a href="https://twitter.com/share?url=http://www.heydonworks.com/article/look-at-this-shitty-tweet-button&amp;text=Look At This Shitty Tweet Button">Tweet</a>

BUT DOES ANYBODY
USE IT?

no

10K  +  tweet button  =  50K

IF YOU HAVE TO POO YOUR PANTS,
AT LEAST USE YOUR OWN POO

— Helpful popups —

— WAI-ARIA —

The First Rule of ARIA
is Don't Use ARIA

Stop hitting yourself, ARIA!

<div role="heading" aria-level="2">Subheading</div>
<h2>Subheading</h2>
<div role="button" tabindex="0">click me</div>
<button>click me</button>
<div class="image" role="img" aria-label="picture of
 cat" style="background-image:url(images/cat.png)"></div>
<img src="images/cat.png" alt="picture of cat">

ARIA isn't for making HTML accessible. It's for making inaccessible HTML accessible.

  • No need for ARIA semantics
  • No need for JavaScript state changes
  • Usable interface without CSS

— Text resizing —

"But what if the user doesn't know about these?"

Want to support the vision impaired?

  • Relative units for everything
  • user-scalable=no
  • Avoid fixed/absolute positioning

"We should have a text resizing widget to help people with low vision!"

— CAPTCHAs —

— CAPTCHAs —

"Completely Awful and Pointless Traps set by Computers that hate Humans, Apparently"

<div class="invisible">
  <label for="test">Test</label>
  <input id="test" tabindex="-1" 
  aria-hidden="true">
</div>

You could just...

— Device break points —

BE FLEXIBLE;
BREAK WHERE
THE CONTENT BREAKS

Adjusting font-size for viewport width automatically

html {
    font-size: calc(1em + 1vw);
}

This really saves on breakpoint code

— Grids —

position: fixed

START MOBILE FIRST
AND STAY THERE.

✘ Grid systems / multi-column layouts

Putting things next to things

.grid {
  display: flex;
  flex-wrap: wrap;
  margin: -.5em;
}

.grid > * {
  margin: .5em;
  flex: 1 0 10em;
}

Pretty much all you need:

Breakpoint free!

/* display: flex; */

93b minified

Dependency management?

Just copy/paste!

OR...

— Single-page apps —

=     1.2MB

:target
:target

https://my-app.io#view1

<div class="view" id="view1">
  <!-- view content -->
</div>
.view { display: none }

.view:target { display: block }

View change events are as simple as

onhashchange

No back button woes!

LESS IS MORE

LET'S INVESTIGATE THIS FURTHER...

LESS IS LESS

LESS WEIGHT

LESS COMPLEXITY

LESS DISTRACTION

LESS BOTHER

LESS BULLSHIT

AND LESS TALKING
Thank you!