Redundant Space Remover

[ Summary | Example | Changes | FAQ ]

Summary

This Firefox extension removes spaces inserted between Chinese characters.
Latest version is 0.2.3. Install here. Don't forget to give me some feedback.

Example

Simply put, this extension converts something looks like into .

Changes

0.2.3(2007-12-21)
  • Updated the code to work with Firefox 3.0.x beta
0.2.2(2006-04-09)
  • Updated the code to work with Firefox 2.x
0.2(2006-01-16)
  • Updated the code to work with Firefox 1.5
  • Updated the example to current affair
0.1(2005-07-10)
  • Fixed the problem of removing spaces actually intented to separate strings of Chinese characters
  • Simplified logic for deciding whether a character is Chinese
0.0.2(2004-12-5)
  • Changed function names for uniqueness
  • Made code slightly more efficient
0.0.1(2004-11-28)
  • Initial release

FAQ

  1. What is RSRemover?
  2. Why remove those spaces?
  3. Why are those spaces added in the first place anyway?
  4. How does RSRemover work?
  5. Does RSRemover work in Mozilla Suite?
  6. Is there any limitations?
  7. Why don't you put RSRemover in Firefox Add-ons?
  8. Help! Firefox complains that the extension does not pass security check!
  9. I love RSRemover! Can I pay you?
  10. I have suggestions/made improvements! Where can I send them to?

  1. What is RSRemover?
    Redundant Space Remover (RSRemover) is a
    Firefox extension that removes redundant space inserted between every pair of consecutive Chinese characters.
  2. Why remove those spaces?
    Those spaces waste your screen space (unless you have one of those
    30-inch Cinema Display from Apple)! Why would you want to spend your money on a big screen and then have those spaces wasted? Moreover, those spaces make the text longer than necessary, making them harder to read.
  3. Why are those spaces added in the first place anyway?
    They are there mostly for historical reason. There was a time when most people use English version of Windows and then use
    external utilities to display Chinese characters. The problem is that these utilities failed to break long sentences into multiple lines, and the added spaces between Chinese characters make sure that English browsers would be able to break the lines. This happens in many Hong Kong newspapers, including Appledaily. The problem has long gone since the browsers became capable of natively understanding and displaying CJK characters.
  4. How does RSRemover work?
    RSRemover works by adding a hook to the "load" event. It first checks if the page is Big5 encoding. If so, it recursively looks into the whole
    DOM tree to get all the #text nodes. For each text node, it removes all the spaces between consecutive Chinese characters.
  5. Does RSRemover work in Mozilla Suite?
    The extension is designed mainly for Firefox. However, I have tested it on Mozilla 1.7.3 and it seems to work.
  6. Is there any limitations?
    The extension fails to remove the spaces of the text that are modified by JavaScript after the page finished loading. This is because the removal is done right after the page is finished loading. Also, the extension would take non-trivial time if the page is extremely long. Any suggestion to fix these problems is appreciated.
  7. Why don't you put RSRemover in Firefox Add-ons?
    Well, it is just a very simple extension and is only useful for viewing some particular web sites that are in Big5 encoding and have redundant spaces, so probably it is not worth doing so.
  8. Help! Firefox complains that the extension does not pass security check!
    The short answer: This is not a question.

    A longer answer: Type "about:config" in the URL bar, add a boolean preference called "extensions.checkUpdateSecurity" and set it to false before adding this extension.

    The longest answer: Starting from Firefox 3, "insecure" extensions are disabled by default. I have no intention to make it work for RSRemover, so you would have to disable that. See the "longer" answer for direction.

  9. I love RSRemover! Can I pay you?
    Sure, give me some donation! Through Amazon: Amazon Honor System Click Here to Pay Learn More
    Or Paypal
  10. I have suggestions/made improvements! Where can I send them to?
    Just drop me an
    email.
Last modified: