Skip to content

Instantly share code, notes, and snippets.

@chrislawes
chrislawes / asana-col-count.js
Last active March 11, 2020 15:47
Add column counts to Asana boards
document.querySelectorAll('.BoardColumn').forEach(item => {
const colCount = `${item.querySelectorAll('.SortableList-itemContainer > div').length}`
const countContainer = item.querySelector('.count-container')
countContainer !== null ? countContainer.innerHTML = colCount : item.querySelector('.BoardColumnHeader-name').innerHTML = `${item.querySelector('.BoardColumnHeader-name').innerHTML} - [<span class="count-container">${colCount}</span>]`
})
{
"workbench.colorTheme": "Material Theme Darker High Contrast",
// "workbench.colorTheme": "Atom One Dark",
"editor.matchBrackets": false,
"telemetry.enableTelemetry": false,
"editor.cursorStyle": "line-thin",
"editor.cursorBlinking": "phase",
"editor.letterSpacing": 0.95,
"editor.fontSize": 12,
"editor.lineHeight": 36,
var mainVideo = $('video');
$(document).on('click', '.js-video-trigger', function(event)
{
// find new video file name from link id
var video = $(this).attr('id');
mainVideo
.find('source').each(function()
@chrislawes
chrislawes / gist:7929370
Created December 12, 2013 15:01
Fade in HTML5 Audio tag (jQuery)
var backgroundVolume = 0; // start background volume at 0
$('#main_audio')[0].volume = backgroundVolume; // set volume to 0
$('#main_audio')[0].play(); // start playing tag
var fadeInAudio = setInterval(
function() {
if(backgroundVolume <= 1) // if it's not at 1 (full volume)
{