Firefox 확장 기능(Extensions)에 대한 정보 및 질문과 답변을 하는 게시판입니다. update.mozilla.or.kr 를 참고하세요
-
화성
- 서포터즈

- Posts: 168
- Joined: 2005 02 17 00:49 53
- Location: 구미
-
Contact:
Post
by 화성 »
마우스 제스쳐에 등록해 두고 썼던 겁니다. 조금만 고치면 될 것 같은데요.
Code: Select all
(function(){
var sel = mgGetSelection().toString().replace(/^\s+|\s+$/, "");
if (sel.length == 0)
return;
var nbox = gBrowser.getNotificationBox();
var n = nbox.getNotificationWithValue("kspacer-result") || nbox.appendNotification("", "kspacer-result", null, nbox.PRIORITY_INFO_MEDIUM, [
{ label: "복사", accessKey: "C", callback: function() { Cc["@mozilla.org/widget/clipboardhelper;1"].getService(Ci.nsIClipboardHelper).copyString(n.label); } }
]);
n.label = "한국어 자동 띄어쓰기 교정기에 접속합니다.";
n.image = "chrome://global/skin/throbber/Throbber-small.gif";
var req = new XMLHttpRequest();
req.open("POST", "http://nlp2.korea.ac.kr/~dglee/kspacer/spacer.cgi", true);
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
req.overrideMimeType("text/html; charset=EUC-KR");
req.onerror = function(e) { n.label = "오류: " + e.target.status; n.image = null; };
req.onload = function(e) {
var p = this.responseText.indexOf('", p) + 1;
n.label = this.responseText.substring(p, this.responseText.lastIndexOf(""));
n.image = null;
};
var conv = Cc["@mozilla.org/intl/scriptableunicodeconverter"].createInstance(Ci.nsIScriptableUnicodeConverter);
conv.charset = "EUC-KR";
req.send("TEXT=" + escape(conv.ConvertFromUnicode(sel.toString())));
})();
-
astraea
- 해커

- Posts: 477
- Joined: 2004 01 04 23:57 23
-
Contact:
Post
by astraea »
확장도 좋지만
ff 내의 자체 기능을 활용하여
사전 파일을 제작하여
spell check 에 이용하면
손쉽게 입력폼에서 틀린건 빨갛게 밑줄 그어지고
참 좋을거 같은데,,
영어와 달리 한글 맞춤법 사전 파일은
만들기 힘들겠죠?ㅠ_ㅠ;
Users browsing this forum: No registered users and 1 guest