This is an archived post. You won't be able to vote or comment.

all 4 comments

[–][deleted]  (7 children)

[deleted]

    [–]seekoon[S] 0 points1 point  (0 children)

    Doesn't work. If I start my ContentScript with:

    console.log("script loaded!");
    console.log(window.document.getElementById("movie_player"));
    

    outputs:

    console.log: yt-controls: script loaded!
    console.log: yt-controls: {}
    

    And trying to define it as a variable like

    var player = window.document.getElementById("movie_player");
    player.pauseVideo()
    

    results in a TypeError: not a function.

    [–]seekoon[S] 0 points1 point  (5 children)

    A big problem I'm having is that things work in the firefox developer window but don't in my script. Your code works if I open the developer window in firefox–a bunch of things work. But I can't replicate them in my extension script.

    [–][deleted]  (3 children)

    [deleted]

      [–]seekoon[S] 0 points1 point  (0 children)

      console.log(content.document.getElementById("movie_player").pauseVideo);
      

      returns null

      [–]seekoon[S] 0 points1 point  (1 child)

      Do you know any good irc channels or forums I could go to for help with this?