I am trying to write a code for Greasemonkey. I can handle the tagnames, ids etc. But I got stuck in the 'script' tag. I can get the innerHTML of this script tag. But I want to get the input parameters only of the 'on' function, specifically 4th input which is a number. And store them in an array.
<ol id="online1">
<script language="javascript" >
on('0','2','abc','401757','');
on('1','1','asd','1115337','');
on('2','2','asdsad','1169333','');
gi('asdasd','10453','');
gi('asdasd','10453','');
.
.
.
.
</script>
Should result in
array = [401757,1115337,1169333];
I can get the innerHTML of the script like this:
window.frames[2].document.getElementById('online1').getElementsByTagName('script')[0].innerHTML