Closed aeosynth closed 12 years ago
What's the benefit of doing this?
one less network request
one less async dance
debugging is easier when the lines in your error console match the lines in your source code
https://github.com/milkytiptoe/Name-Sync/blob/master/NameSync.user.js#L21-23
var script = document.createElement("script");
script.textContent = "(" + a.toString() + ")();";
document.body.appendChild(script);
hahaha, oh wow - you plug your entire script through this
Well I'll try and do it then.
haha, oh wow
Jeez. It's copied straight from an example I found months ago online that worked with no side effects.
https://github.com/milkytiptoe/Name-Sync/commit/b42178840ad501e251023730d745b922e5553e09
I embedded jquery but when I call NameSync() directly (as in not that snippet above) for some reason the 'options' network request doesn't send, it goes straight to the 'get'. Still looking.
dude, you should embed jquery outside of any other function. and you don't have to use your init
function at all, just directly call NameSync()
.
I knew that, but the issue was my server was declining origins not from 4chan.org, but the change doesn't send the origin anymore. Fixed. Thanks aeosynth.
you should probably just embed jquery into your source