Skip to content

Instantly share code, notes, and snippets.

View etkirsch's full-sized avatar

Evan Kirsch etkirsch

  • Google
  • San Francisco Bay Area
View GitHub Profile
@etkirsch
etkirsch / minify-bandcamp.js
Last active May 24, 2016 19:26
Bandcamp Web Interface -> Minified Player for Screen Casting (use as a chrome bookmark)
javascript:var s = $('#tralbumArt a img');s.css({height:'600px',width:'600px','z-index':'10000',position:'fixed',top:0,bottom:0,right:0,'background-repeat':'no-repeat'});var b=$('body');b.css({overflow:'hidden'});var c = $('.tralbumCommands');c.css({display:'none'});var d = $('#customHeaderWrapper');d.css({display:'none'});var e = $('.track_list'); e.css({'margin-bottom':'1000px'});var f = $('.trackView'); f.css({'margin-left': '-32px'});var g = $('#tralbumArt'); g.css({'outline': '0px'});var h = $('.share-panel-wrapper-desktop'); h.css({display: 'none'});var i = $('.collected-by'); i.css({display: 'none'});
@etkirsch
etkirsch / ndn-countsuccesses-macro.js
Last active October 22, 2020 02:49
Simple "Count Successes from Nd6" Macro
const evaluateSuccesses = (html) => {
const formula = html.find('.formula').val();
const targetValue = html.find('.target').val();
const rolls = new Roll(formula).roll();
rolls.target
const successes = rolls.dice[0].rolls.filter((indivRoll) => indivRoll.roll >= targetValue).length;
const messageData = {
flavor: `There were ${successes} successes with this roll (must exceed or equal ${targetValue})!`,
};
rolls.toMessage(messageData);