Skip to content

Instantly share code, notes, and snippets.

@duke79
Created May 4, 2019 05:05
Show Gist options
  • Save duke79/97f17f36268f698e48f233e752a45208 to your computer and use it in GitHub Desktop.
Save duke79/97f17f36268f698e48f233e752a45208 to your computer and use it in GitHub Desktop.
Emby
// ==UserScript==
// @name Emby - local path
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http://localhost:8096/*
// @grant none
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// ==/UserScript==
(function() {
$(window).load(function(){
var checkExist = setInterval(function() {
if (typeof($("#mediaInfoContent > div:nth-child(5) > span.mediaInfoAttribute"))!="undefined") {
alert($("#mediaInfoContent > div:nth-child(5) > span.mediaInfoAttribute")[0].textContent);
clearInterval(checkExist);
}
}, 100); // check every 100ms
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment