Skip to content

Instantly share code, notes, and snippets.

@automatthew
automatthew / README.md
Created October 2, 2020 19:09
UATV podcast addon

Enhances streams on unauthorized.tv by adding buttons to jump 30s forward/backward and change playback rate. On android devices, the playback controls on the notification screen also receive jump buttons.

On your desktop browser, install a userscript manager like Tampermonkey and add the script below. Each stream will be augmented with extra buttons.

On android, create a bookmark and copy-paste the snippet below into the URL field. Click on this bookmark whenever you're listening to a podcast to upgrade the page. (You can usually invoke the bookmarklet from the URL bar by typing in its name)

javascript:(function()%7B(function()%7B'use%20strict'%3Bconst%20%24%3Ddocument.querySelector.bind(document)%3Bconst%20gui%3Ddocument.createElement('div')%3Bgui.innerHTML%3D%60%0A%3Cdiv%20class%3D%22tm-controls%22%3E%0A%20%20%3Cbutton%20class%3D%22tm-controls__back%22%3E%3Ci%20class%3D%22fa%20fa-backward%22%3E%3C%2Fi%3E%3C%2Fbutton%3E%0A%20%20%3Cbutton%20class%3D%22tm-controls__rate%22%3E1x%3C%2Fbutton%3E%0A%20%20%3
@automatthew
automatthew / gist:569
Created July 22, 2008 01:22 — forked from dyoder/domain.rb
domain name class; QUESTIONABLE
# first we will give Domains a little help
class Domain < String
def subdomain( rank = 1 ) ; self.split('.')[0..(rank-1)].join('.') ; end
def level( rank ) ; self.split('.')[(rank*-1)..-1].join('.') ; end
def top_level ; level(1) ; end
end
# now we can treat them like strings but also access domain components naturally