i'm trying to develop an extension for chrome. I'm quite new with javaScropts working. To understand what i'm trying to do: on this page there is a video, i can use the console to start and stop the video with this:
var p = jwplayer.apply();
p.play();
p.pause();
How can i write this command in a javascript extention?
EDIT: I've read your suggestion. But I'm really new with javascript, so it's difficult for me transpose those codes to my case. I want to point that i'm developing an extension, so i have to write a js that implement the code above as if i'm directly writing it into the console. Something like this (that of course it doesn't work):
$(window).ready(function() {
var p = jwplayer.apply();
p.play();
});
I'm sorry for the stupid question, but it's my first experiment with javaScript.