Error
|
|
Edit one of your comments and then try to edit one of your other comments without refreshing the page. Result: preview button is gone. Have fun trying to fix this. Took me over an hour. |
|
|
It's not gone for me. Works fine. Have you updated to 1.0.8? |
|
|
I reinstalled, disabled all other scrips, and tried it again just now. Your button still doesn't show up when you go from editing one comment to editing another. It does show up when you edit the SAME comment, but not another. And btw, I've disabled all other scripts. I'll let you know why it happens. Your button is being added, it's just getting wiped out when the new comment loads. You have to wait for the new comment to load into the editbox before you can add your button. |
|
|
Try it now. |
|
|
Nope, still doesn't. What I do is before the setInterval I append an element to the editbox. Then in the interval I keep checking if that element exists. If it doesn't exist then the comment has been loaded and the preview button can be added. |
|
|
I did what you said about the appending elements. I'm going to release it after I shorten the element creation parts with create() that avg gave me a long time ago. Off topic, your auto-update script has a small bug. When you have a newer version of the script than what's available, it will say you have an older version and ask you to update. It should be |
|
|
JoeSimmons wrote: I use one I found on Greasespot. JoeSimmons wrote: I guess I always thought it was kind of pointless because usually the developer would be the only one with the newer version, but it's still a good idea. I changed it. Btw you have strip the periods in the version number to make the comparison work properly. |
|
|
sizzlemctwizzle wrote: Shouldn't you do that in your script? It would work fine. Also, you don't need User-agent in the headers of the XHR.
|
|
|
JoeSimmons wrote: Yeah I do, but I noticed you modified the update code in your script and I didn't think you stripped the periods. Maybe I'm wrong. JoeSimmons wrote: Yeah, you're right. I forgot about that. Us.o doesn't browser sniff. I don't have to send any headers really. |
|
|
sizzlemctwizzle wrote: I did strip the periods. But I'm using your latest code now, thanks for updating it. sizzlemctwizzle wrote: Doesn't matter anyways. The browser automatically sends the User-agent and all the rest of the headers whether you supply them or not. When you put them there, you're just changing them. I've tested this on my own. |