Created
November 30, 2022 16:35
-
-
Save ewwink/0d20b19a5c9b352b4cc70381dc86ba1a to your computer and use it in GitHub Desktop.
Plyr.io Bookmarklet - Replace built in Browser video player with Plyr.io
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var css = document.createElement("link"); | |
css.rel = "stylesheet"; | |
css.href = "https://cdn.plyr.io/3.7.3/plyr.css"; | |
document.body.appendChild(css); | |
var scr = document.createElement("script"); | |
scr.src = "https://cdn.plyr.io/3.7.3/plyr.js"; | |
scr.onload = function() { | |
document.querySelectorAll("video").forEach(function(v) { | |
var player = new Plyr(v); | |
}); | |
}; | |
document.body.appendChild(scr); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment