Expand all Asana comments and threads in a task

Posted by & filed under Programming, web.

You can use the following piece of Javascript as a bookmark in your browser to expand all the comments and threads in an Asana task. This is really helpful when you have long threads with lots of comments and you are unable to see all of them because Asana hides them by default.

Fixing preview or unfurl in Slack

Posted by & filed under Programming, web.

Sometimes you will find that certain links in slack do not preview or unfurl inside of a channel or conversation. When you have ruled out all of the basic reasons set forth in the Slack share links documentation setup here here are a couple more that you can look into.

Drupal: Get the node/bundle when preprocessing a paragraph

Posted by & filed under blabbing.

If you need to preprocess a specific paragraph type for it’s content or fields but you need to know the node/entity type that the request is coming from you can use the following. Make sure that you check to make sure the $node is not NULL before running methods against $node. Here we are going… Read more »

CSS selector for lang :not en/english

Posted by & filed under blabbing.

This type of CSS selector can be useful for when you have a multi-lingual site and some content or features may be different between the EN (english) site and other languages. Without having to explicitly name each language in the selector you just want to say “everything that is not EN”.

Load the fonts first for page speed

Posted by & filed under blabbing, Design, Programming, web.

To increase page speed for blocking font rendering and to reduce the font rendering time when the page loads on your site, add your fonts as a preload at the top of your page. This may seem counter intuitive to load an asset ahead of time for page speed, but it makes sense in two… Read more »

Triggering javascript on change programmatically and have it bubble

Posted by & filed under Programming, web.

A problem I ran into recently is that updating an input value is a form using javascript or jQuery is fairly easy but sometimes this programmatic update of the field does not trigger an onChange event that another piece of code is listening for. Adding a dispatchEvent on the selector can accomplish this.

Working with Hubspot forms onFormSubmit

Posted by & filed under Programming, web.

Getting values from the hubspot form in it’s onFormSubmit handler can be pretty tricky so here is a quick tip. Add the onFormSubmit closure function to the hbspt.forms.create script and then use .find() to get the value of individual form elements that you need. At that point you can use them to pass to tracking… Read more »

Finite and infinite games

Posted by & filed under blabbing.

Something I ran across recently that I liked. There are two types of games: finite games where rules are known & an end is set, & infinite game, where the rules can change and the end is unknown, & rules can change. Your outlook/beliefs will determine the game you believe you are playing.

Stop animating all your pages

Posted by & filed under blabbing, Design, web.

You know that feeling when you get to a site and there isn’t much there and then you start to scroll and POW everything comes flying into the page in all directions. Yeah. Stop doing that.