Skip to content

Instantly share code, notes, and snippets.

@francescosalvi
Created May 31, 2018 13:55
Show Gist options
  • Save francescosalvi/62ad430eb987c127c8d00fa311c44377 to your computer and use it in GitHub Desktop.
Save francescosalvi/62ad430eb987c127c8d00fa311c44377 to your computer and use it in GitHub Desktop.
DI.fm uninterrupted playback
// Dismisses "Are you still there?" message popup on di.fm free accounts, immediately resuming playback.
// Load in page using extensions like https://chrome.google.com/webstore/detail/custom-javascript-for-web/poakhlngfciodnhlhhgnaaelnpjljija
// (no need to import jQuery as it's already avaiabled on the website)
$(document).ready(function(){
// auto start playing
$('.ico.icon-play').closest('div').click()
window.setInterval(function(){
// if interrupting modal is open, close it
$('button.close[data-dismiss="modal"]').click()
}, 5000)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment