https://bugzilla.wikimedia.org/show_bug.cgi?id=22967
--- Comment #17 from Bawolff <[email protected]> 2010-05-06 21:33:20 UTC --- (In reply to comment #15) > nice. > one small nitpick, though: > > i find it aesthetically displeasing that in the three different points the > function "checkSummary" returns, three different mechanisms are used for > return > value: > for special chars you use the return value of the function itself. > when the string is too long you set both e.preventDefault() and e.returnValue, > but not the return value of the function, and in all other cases you do not > set > any property on e, and leave the function return value undefined. > i think you probably want to add > return false; > when len > 250, and > return true; > just before the last "}" of checkSummary. I'm not sure if that matters too much, but I could see it being slightly confusing. the e.preventDefault() and e.returnValue is to override the default action of the event, the other return is just to get out of the function. > and a practical question: > could you please add a couple of lines instructing me how to add this script > to > my user space (personal scripts or somesuch) in he.wikipedia, so i can test > it? > (can't test it on my own wiki, because i removed the 200 chars limit in the DB > and increased the php limit to 400...) > > peace. yeah, just take the patch, wrap it in an if (wgAction === 'edit') { /*js from patch*/} and put it in your personal js. Should work (I think, no reason why it shouldn't, but i didn't test). -bawolff p.s. I have commit access now so i could commit it, but I was unsure if i should or not since the last version was rejected. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
