Skip to content

Instantly share code, notes, and snippets.

@natural-affinity
Last active August 29, 2015 14:08
Show Gist options
  • Select an option

  • Save natural-affinity/8a82dc7a8d5cdc3ebc22 to your computer and use it in GitHub Desktop.

Select an option

Save natural-affinity/8a82dc7a8d5cdc3ebc22 to your computer and use it in GitHub Desktop.
Zen Productivity: UX Hack

JS Console + Defonic + Chromecast

  • Awesome Ambient Noise/Videoscape Product for relaxation (e.g. http://defonic.com)
  • Can cast to TV for a 50 inch+ version via chromcast or similar device
  • Quick Page hack via JS console = Awesome

Steps

  • Navigate to your desired videoscape background page (e.g. http://defonic.com/ocean.html)
  • Cast to TV via chrome browser extension
  • Open your JS console in chrome for that page (COMMAND + OPTION + J or CTRL + SHIFT + J).
  • Run one of the Javascript snippets below depending on your preference (must be re-run for every page refresh)

Protip

Run the snippet below in your chrome JS console to remove the background overlay, text, and video controls.

$('.YTPOverlay').css('background','none');
$('.home-wrap').css('display','none');
$('.video-controls').css('display','none');

Alternatively, for more flexibility, we can make the controls toggle-able via the Enter Key:

$('.YTPOverlay').css('background','none');
$('body').keyup(function (e) {
  var code = e.keyCode || e.which;
  if (code === 13) {
    $('.home-wrap').toggle();
    $('.video-controls').toggle();
  }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment