views:

47

answers:

1

i've been reading a lot and have been trying to get this done for about 5 hours now... so here it is

I want to write a script that will override a function dummy() {$.ajax(...)}; on a website.

here is how i'm trying to do it

unsafeWindow.dummy = function(data){differantFunction(); $.ajax(...);};

function differantFunction(){
...
}

but the dummy function that would have been called up to do something on the original page... now just does nothing.

//update

I tried running that function i'm trying to override trough the adres bar to see what's wrong: (javascript:dummy("..");)

and I get an error telling me $ is undefined but I have jquery on the website and in the userscript... i'm so lost right now