Wakaba Extension

By O_Lawd Last update Aug 30, 2010 — Installed 8,852 times.

Code Monkey?

in
Subscribe to Code Monkey? 3 posts, 2 voices



lol_wut Scriptwright
FirefoxWindows

1) This code contents a lot of repeated code. This is baaad-bad-bad.
2) REALLY long variable names ex: replyBoxContentPostAreaTableSubjectRowRightColumnSubmitTask, replyBoxContentPostAreaTableCommentRowRightColumnTextField.
WTF???
3) Indent > 10 tabs, Indent > 80 chars on display => hard to edit!
4) Using a lots of variables, that could be even not declared.
5) Using what kind of selectors? Why not jsquery, sizzle or something?..
This is code is a big piece of shit.
Author, I hate you!

 
O_Lawd Script's Author
FirefoxX11

You are indeed correct. The code sucks, and for my update, I'm completely rewriting it at this very moment, even though I'm concerned about the current length.

> 1) This code contents a lot of repeated code. This is baaad-bad-bad.

Laziness and a lack of function ideas. This is the main issue I'm fixing.

> 2) REALLY long variable names...

They made sense at the time. Don't ask.

> 3) Indent > 10 tabs, Indent > 80 chars on display => hard to edit!

I'm restricting my rewrite to 80 characters total width. Tabbing should be less extreme, I hope.

> 4) Using a lots of variables, that could be even not declared.

I was using more than needed in several sections, for sure. On the other hand, conciseness is not a big goal.

> 5) Using what kind of selectors? Why not jsquery, sizzle or something?..

I've been using document.evaluate and the plain DOM methods. Is it common for userscripts to use external libraries?

> This is code...

Indeed, it is!

This project started with me messing with Javascript to expand images and went all over the place from there. Unfortunately, it has not scaled well and espouses the main issues I have had in programming. I am still learning, and lots of this code was written months back.

The rewrite is going to be more object-oriented.

I hate you, too.~ Thanks for the code review.

 
lol_wut Scriptwright
FirefoxWindows

> I hate you!
>> I hate you, too.~
Nothing personal. I wrote it because I wanted to edit this code to add "tips". And I saw THAT.
I've added them, but I won't send it here cuz using crutches in code and source used for tips is aviable here too.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel