Hi guys, I'm trying to build a simple extension for Opera 11 and I've hit a massive snag I'm sure most developers meet.
In case you don't know, an extension in Opera is just another .html file, with some Javascript if you choose.
What I'm having trouble with is getting the HTML source from the CALLING web page and passing it to the popup.html.
So for example, I'm on my Blog, I'd like to pass that markup and have that as the 'document' variable. Instead the 'document' variable is empty because it's using the popup.html's content - not the calling content.
How could I pass the HTML of the main browser to the popup.html?
Here is the code I have so you can see what I'm trying to do:
<script>
var imgs = document.getElementsByTagName('img')
var t = "";
for (var i=0, n=imgs.length;i<n;i++) t += '<br><a href="'+imgs[i].src+'"><img src="'+imgs[i].src+'" width="100"></a>';
document.write(t)
</script>