I'm building an Opera Extension.
开发者_如何学JAVAIs it possible to use the includes folder to directly inject jquery into the live html on a webpage.
I.E. change the background colour of the DOM to say black.
possibly so this script could work.
// The injected script
var elems = document.getElementsByTagName("body");
var arr = jQuery.makeArray(elems);
$(document).ready(function() {
$("body").css("background-color", "#000000");
$("body").css("color", "#ffffff");
$(arr).appendTo(document.body);
});
if it is possible could someone please do a tutorial or point me to one as I cant visualise how to do this in my mind.
thanks kev
You could try pulling apart this extension https://addons.opera.com/addons/extensions/details/scripter-script-includer/ to see how he did it.
精彩评论