Skip to content

Instantly share code, notes, and snippets.

@retronym
Last active October 26, 2022 06:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save retronym/4b9ec234b83c6549ef29df6b73a8bff0 to your computer and use it in GitHub Desktop.
Save retronym/4b9ec234b83c6549ef29df6b73a8bff0 to your computer and use it in GitHub Desktop.
Beardie Config for Stan Sports and Kayo (https://github.com/Bonapara/beardie)
BSStrategy = {
version: 1,
displayName: "Kayo",
accepts: {
method: "predicateOnTab",
format: "%K LIKE[c] '*kayosports.com.au/*/*'",
args: ["URL"]
},
toggle: function () { console.log("toggle"); document.querySelector('[aria-label="Toggle play/pause"]').click(); },
pause: function () { console.log("pause") },
previous: function () { console.log("previous"); document.querySelector('[aria-label="Rewind 15 seconds"]').click(); },
next: function () { console.log("next"); document.querySelector('[aria-label="Skip 15 seconds"]').click(); },
favorite: function () { }
}
BSStrategy = {
version: 1,
displayName: "Stan",
accepts: {
method: "predicateOnTab",
format: "%K LIKE[c] '*play.stan.com.au/programs/*'",
args: ["URL"]
},
isPlaying: function () { return !document.querySelector('#prestoPlay').paused; },
toggle: function () { document.querySelector('.vjs-play-control').click(); },
previous: function () { document.querySelector('.vjs-seek-back-control').click(); },
next: function () { document.querySelector('.vjs-seek-forward-control').click(); },
pause: function () { document.querySelector('#prestoPlay').pauseVideo(); },
favorite: function () { }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment