IsSuEat / open-livestreamer-firefox-addon

Addon for firefox to quickly open stream urls in vlc using livestreamer
GNU General Public License v3.0
18 stars 7 forks source link

Missing "Open with livestreamer" context menu on hitbox.tv and youtube. #5

Closed baizon closed 9 years ago

baizon commented 9 years ago

Hi, the "Open with livestreamer" entry in the context menu is missing on hitbox.tv and youtube.com (available on twitch.tv).

baizon commented 9 years ago

Got it working with the following code change: main.js --- contextMenu.URLContext(".twitch.tv"), +++ contextMenu.URLContext([".twitch.tv", ".hitbox.tv", ".youtube.com"]), --- contextMenu.SelectorContext(".thumb") +++ contextMenu.SelectorContext("a[href]") twitchCM.js --- self.postMessage(node.childNodes[1].href); +++ self.postMessage(node.href);

Edit: You could also remove twitchCM.js and put the js code into contentScript, like this: contentScript: 'self.on("click", function(node, data){' + ' self.postMessage(node.href);' + '});',

IsSuEat commented 9 years ago

Thanks for your feedback! You are the first contributer I have! :+1: As I have not done this before, but I want to try it: could you try forking the repository and create a pull request? Thanks again!

baizon commented 9 years ago

Made a pull request.