Welcome to Inkbunny...
Allowed ratings
To view member-only content, create an account. ( Hide )
Whippy

(UserScript) Superfly Reply - a better reply box for InkBunny UPDATE!

by
Yup I Derped big time and forgot to add support for actually editing comments!! So I figured that out and adjusted the positions and sizes of all those damn divs to look a lil better.  Enjoy!!

DOWNLOAD HERE
Viewed: 52 times
Added: 6 years, 10 months ago
 
Goldy
6 years, 10 months ago
I installed this version but editing don't work for me. Nothing appends when I click on edit button.
Goldy
6 years, 10 months ago
Error in console : Uncaught TypeError: Cannot read property 'href' of undefined
Whippy
6 years, 10 months ago
Hmmm 0_0
what browser are you using?
Whippy
6 years, 10 months ago
Okay, ran this thing through a few tests and sure enough "property is unfefined"  and "null" came up quite a lot. I was making some elements null when I wanted them to be blank but apparently null isn't the same thing as '' in javascript...woohoo. So I fixed it to be '' instead of null and I can't make it produced anymore errors. *Updates* give it a try and lemme know how it goes.
Goldy
6 years, 10 months ago
I will test with this comment :3
Goldy
6 years, 10 months ago
No, same error...

For information I'm using chromium 15.0.874.121 (on Debian)
Goldy
6 years, 10 months ago
I just tried on a journal I just created to try to debug the script and it's work :3
Goldy
6 years, 10 months ago
That's strange... It works on my journal but not here... well sorry for the spam, that probably comes from my browser ^^
Whippy
6 years, 10 months ago
Nope, I have the same browser on Windows and it works. It's your OS, or the way they made that browser for your OS. Hmmmph, I'll go over it again and see if I can't fix it tomorrow ^^;
Whippy
6 years, 10 months ago
Oh meep...on second thought..the script prolly isn't even finding the edit link in order to change it...grr...i'll have to check this out later..yesh
Whippy
6 years, 10 months ago
Okay, I tweaked it some more. Got rid of most of that parts that have "removeChild()" in them (that removes an entire chunk of code from that HTML). It should work fine now, I can't get it to produce any errors. You know the drill :P
Goldy
6 years, 10 months ago
Oki, I'm testing :3
Goldy
6 years, 10 months ago
That is strange... It's working when I test with a comment on my own journal, but here I've still got this error :

journalview.php:79 Uncaught TypeError: Cannot read property 'href' of undefined
Goldy
6 years, 10 months ago
More details :

journalview.php:79 Uncaught TypeError: Cannot read property 'href' of undefined
reply_box    journalview.php:79
(anonymous function)   journalview.php:1360
onclick   journalview.php:1361
Whippy
6 years, 10 months ago
href..there's only 3 of them in the whole script. I think I found the one that's causing all the trouble though:
" if (rmethod == 'edit')
{
cs = cs.getElementsByTagName('a')[3].href;


I changed 'cs=' to 'cs2=' . JS must be picky that way... I hope that fixed your error. I dunno what to say about that anonymous function stuff...unless it's all reffering to the same thing.

*downloads debian to test it himself*
Goldy
6 years, 10 months ago
Don' t download Debian, you can use an Ubuntu Live cd (I'm using this version https://launchpad.net/~chromium-daily/+archive/stable ) ^^

Btw, I will test with this comment
Goldy
6 years, 10 months ago
Same error... I tried to deactivate all other extensions, but I've got the same error...

I would like to help you more, but I'm not very comfortable with JS ^^'
Whippy
6 years, 10 months ago
It's okay! I totally understand. Hehe, about a month ago I wouldn't have touched this at all. JS is tricky stuff! Especially all that silly method stuff.  I've downloaded Unbuntu, now I just need to run it inside VMWare and install chromium.
Whippy
6 years, 10 months ago
http://dl.dropbox.com/u/43927622/apps/INKBUNNY/IB_supe...

I think Prime (below) was having the same error as you. I fixed it for him. Maybe it'll work for you too?
Goldy
6 years, 10 months ago
test :3

Edit : It works :3

Well done Looq :3
Whippy
6 years, 10 months ago
^__^ Squeeeee!!!
I'm happy that I finally fixed it for you! Now I can move on to that image loading script XD!!
Goldy
6 years, 10 months ago
I'm happy too, your script is very useful :3 It should be added on the website imho :3
Whippy
6 years, 10 months ago
*smiles*
I think one of the admins already tried testing it, but unfortunately his greasemonkey is broken on firefox and he can't install any scripts 0_0

See Here for that conversation
Prime
6 years, 10 months ago
Test
Edit: Hmm, editing still doesn't work for me for some reason.
Whippy
6 years, 10 months ago
Okay, which OS and Browser are you using?
I'm working on it ATM.
Prime
6 years, 10 months ago
Windows 7 32-bit and Firefox 3.6.24
Whippy
6 years, 10 months ago
Ah snap ^////^ I used to have firefox 3.6, but I finally upgraded to version 8 a few weeks back.
Prime
6 years, 10 months ago
I have too many addons that aren't compatible. So I put up with the horrible memory leaks.
Whippy
6 years, 10 months ago
I had some like that too. Like bartab for instance. I checked around the addon page the find that somebody else made something just like it to replace it.  If any of your addons alter the HTML of inkbunny somehow, it's very possible that it would break the reply script.

Could you open up your javascript console in firefox to see what it says when you click on an "edit" link? http://www.cmsmarket.com/resources/dev-corner/92-how-t...
Prime
6 years, 10 months ago
Sure: Error: cs.getElementsByTagName("a")[3] is undefined
Source File: https://inkbunny.net/journalview.php?id=23231#commentid...
Line: 55
And I just tried disabling all extra addons. It still doesn't work.
Whippy
6 years, 10 months ago
Excellent, thanks! I replaced that bit of code with a loop that actually checks the text of the link instead of relying on a number. Give this a shot:
http://dl.dropbox.com/u/43927622/apps/INKBUNNY/IB_supe...
Prime
6 years, 10 months ago
Test
Edit: Yay, it works now. Thanks Looq.
Whippy
6 years, 10 months ago
Oh thank gods ^_^
You just made my day *snugs*
Prime
6 years, 10 months ago
Hehe, no problem.
New Comment:
Move reply box to top
Log in or create an account to comment.