I'm running a couple of self-written Greasemonkey userscripts that almost always needed the unsafeWindow function in some way. Unfortunately, that function has been discontinued for the most part, but now I'm having trouble fixing my scripts. I've read that there are three new functions (cloneInto(), exportFunction(), and createObjectIn()), but I openly admit that I don't get what this page wants me to do.
Can somebody give me a quick explanation of which of these three functions I should use and of course also how to convert them to work again? I'm sorry, but I'm not very good at this stuff.
As a simple example:
$("#someid").append('<a href="#" onclick="somefunction();return false;">Click</a>');
unsafeWindow.somefunction = function() {
alert("Hello!");
}