I believe this is also good the Dict.CN who shall get much more access to its web pages when try to recite new words with Dict.cn. We can even write our own notes to the each new word in the Dict.CN site. "http://www18.dict.cn/scb/index.php?act=&word_class=0"
BTW: I am using this addon on Firefox 9.01, just changed the applicable versions.
改overlay.js第278行 var string = doc.getSelection().toString();
Firefox 8改函數返回類型,所以取str長度時無定義,toGB出錯 document.getSelection() now returns the same Selection object as window.getSelection() , instead of stringifying it. 參考 https://developer.mozilla.org/en/Firefox_8_for_developers
this.oXMLhttp.open("GET", url, true); //line 105 this.oXMLhttp.overrideMimeType("text/xml"); // this is the new line in overlay.js this.oXMLhttp.send(null); this.showDef('Looking up "' + this.word + '"');
Fix for Firefox 8 and 9 and ...:
after applying the fix above, mod line 278 as follows: var string = doc.getSelection(); ===> var string = doc.getSelection().toString(); Thanks to Cye3s at http://g.mozest.com/thread-40360-1-1
Thanks SevenD for the solution, it works! you saved this extension!
I made the change and uploaded the changed file and the instruction here: http://public.bay.livefilestore.com/y1pxJ44ghpfLpF1GYguH7COougPYzv-IMT_W7wiwdsz5gf6RfCeiF8_-aGEMiDr1mU5f0mEuoNVL8fZ4tqSnimwKw/Fix%20for%20Firefox%20Extension%20DictCN.zip?download&psid=1
We have been using this add-on for years now. Unfortunately, it seems a change to the dict.cn server has broken this add-on. To fix this, change the MIME type of the reply of the dict.cn server - as the reply is not treated as XML the parsing does not work. This will hard-code the MIME type and fix this. Insert the following in overlay.js line 105 (before "this.oXMLhttp.send(null);" this.oXMLhttp.overrideMimeType("text/xml");
You will find "overlay.js" in "dictcn.jar" in your profile's extension directory under "firstname.lastname@example.org\chrome\".
You can easily open it with 7ZIP (or rename it to dictcn.ZIP) and in the archive go to "chrome\content\overlay.js".
I'm using FF 3.6.10 and DictCN 3.2.1, but DictCN isn't working at all! I got "Not Found" for every words I searched. I followed your method and changed the config, but still the same, DictCN doens't work.
Just installed it. Really like it so far, but one request: on the next update, when translating from English to Chinese, can you add the pinyin for the characters? Takes out one step in the translation, then usage process