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
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…