Created
October 3, 2015 19:15
-
-
Save erikccoder/e3915e737214736c381a to your computer and use it in GitHub Desktop.
Kodi_bookmarklet.js
This file contains 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
var videos = document.querySelectorAll("video"); | |
if(videos.length<1){ alert("no video found!"); return; | |
} | |
var i=0; | |
var src = prompt("playIt? " + i + "/" + videos.length, videos[i].src); | |
if(src == null){ alert("no src found"); return; | |
} | |
var url ='http:\/\/192.168.0.107:8080\/jsonrpc?request={"jsonrpc":\"2.0\",\"id\":\"1\",\"method\":\"Player.Open\",\"params\":{\"item\":{\"file\":\"'+src+'\"}}}'; | |
window.location = decodeURIComponent(url); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment