svnno****@sourc*****
svnno****@sourc*****
2008年 2月 8日 (金) 22:46:52 JST
Revision: 359 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=bbs2ch&view=rev&rev=359 Author: flyson Date: 2008-02-08 22:46:52 +0900 (Fri, 08 Feb 2008) Log Message: ----------- b2rIGlobalService å æåã³ã¼ãã UTF ã«å¤æ´ Modified Paths: -------------- trunk/bbs2chreader/chrome/content/bbs2chreader/belogin/belogin-dialog.xul trunk/bbs2chreader/chrome/content/bbs2chreader/belogin/belogin.js -------------- next part -------------- Modified: trunk/bbs2chreader/chrome/content/bbs2chreader/belogin/belogin-dialog.xul =================================================================== --- trunk/bbs2chreader/chrome/content/bbs2chreader/belogin/belogin-dialog.xul 2008-02-08 13:37:54 UTC (rev 358) +++ trunk/bbs2chreader/chrome/content/bbs2chreader/belogin/belogin-dialog.xul 2008-02-08 13:46:52 UTC (rev 359) @@ -1,18 +1,15 @@ -<?xml version="1.0" encoding="EUC-JP"?> +<?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> -<dialog id="winMain" title="Be @ 2ch ログイン" +<dialog id="winMain" title="Be @ 2ch ãã°ã¤ã³" onload="startup()" onunload="shutdown()" ondialogaccept="return accept()" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> - <script type="application/x-javascript" src="chrome://bbs2chreader/content/belogin/belogin.js"/> - - <script type="application/x-javascript"><![CDATA[ + <script type="application/javascript;version=1.7" src="chrome://bbs2chreader/content/lib/xpc.js"/> + <script type="application/javascript;version=1.7" src="chrome://bbs2chreader/content/belogin/belogin.js"/> + <script type="application/javascript;version=1.7"><![CDATA[ var gTxtBeCode; var gTxtBeMail; - var gBbs2chService = Components.classes["@mozilla.org/bbs2ch-service;1"] - .getService(Components.interfaces.nsIBbs2chService); - function startup(){ gTxtBeCode = document.getElementById("txtBeCode"); gTxtBeMail = document.getElementById("txtBeMail"); @@ -39,7 +36,8 @@ } function openBe2ch(){ - gBbs2chService.openURL("http://be.2ch.net/", null, true); + var b2rService = XPC.getService("@bbs2ch.sourceforge.jp/b2r-global-service;1", "b2rIGlobalService"); + b2rService.openURL("http://be.2ch.net/", null, true); } ]]></script> @@ -47,11 +45,11 @@ <vbox style="padding:10px; width:360px;"> <hbox align="center"> - <label value="認証コード" style="width:8em;"/> + <label value="èªè¨¼ã³ã¼ã" style="width:8em;"/> <textbox id="txtBeCode" type="password" persist="value2" flex="1"/> </hbox> <hbox align="center"> - <label value="メールアドレス" style="width:8em;"/> + <label value="ã¡ã¼ã«ã¢ãã¬ã¹" style="width:8em;"/> <textbox id="txtBeMail" persist="value2" flex="1"/> </hbox> <hbox pack="end"> Modified: trunk/bbs2chreader/chrome/content/bbs2chreader/belogin/belogin.js =================================================================== --- trunk/bbs2chreader/chrome/content/bbs2chreader/belogin/belogin.js 2008-02-08 13:37:54 UTC (rev 358) +++ trunk/bbs2chreader/chrome/content/bbs2chreader/belogin/belogin.js 2008-02-08 13:46:52 UTC (rev 359) @@ -39,16 +39,16 @@ /** - * Be @ 2ch へのログインログアウト処理を行う + * Be @ 2ch ã¸ã®ãã°ã¤ã³ãã°ã¢ã¦ãå¦çãè¡ã */ var Bbs2chBeLogin = { -// ********** ********* プロパティ ********** ********** +// ********** ********* ãããã㣠********** ********** /** - * nsICookieService を返す + * nsICookieService ãè¿ã * @return nsICookieService */ get cookieService(){ @@ -62,7 +62,7 @@ /** - * http://be.2ch.net/ の nsIURI を返す + * http://be.2ch.net/ ã® nsIURI ãè¿ã * @return nsIURI */ get beURI(){ @@ -77,7 +77,7 @@ /** - * Be @ 2ch にログイン中なら 真 + * Be @ 2ch ã«ãã°ã¤ã³ä¸ãªã ç * @return boolean */ get logined(){ @@ -88,50 +88,50 @@ }, -// ********** ********* メソッド ********** ********** +// ********** ********* ã¡ã½ãã ********** ********** /** - * Be @ 2ch にログインする - * @param aBeCode string Be @ 2ch の認証コード - * @param aBeMail string Be @ 2ch の認証メールアドレス + * Be @ 2ch ã«ãã°ã¤ã³ãã + * @param aBeCode string Be @ 2ch ã®èªè¨¼ã³ã¼ã + * @param aBeMail string Be @ 2ch ã®èªè¨¼ã¡ã¼ã«ã¢ãã¬ã¹ */ login: function(aBeCode, aBeMail){ if(!aBeCode) return; if(!aBeMail) return; - // cookie の有効期限 + // cookie ã®æå¹æé var cookieExpires = new Date(2015, 11, 31).toString(); - // Be 認証コードの登録 + // Be èªè¨¼ã³ã¼ãã®ç»é² var cookieBeCode = "MDMD=" + aBeCode + "; domain=.2ch.net; expires=" + cookieExpires; this.cookieService.setCookieString(this.beURI, null, cookieBeCode, null); - // Be 認証メールの登録 + // Be èªè¨¼ã¡ã¼ã«ã®ç»é² var cookieBeMail = "DMDM=" + aBeMail + "; domain=.2ch.net; expires=" + cookieExpires; this.cookieService.setCookieString(this.beURI, null, cookieBeMail, null); }, /** - * Be @ 2ch からログアウトする + * Be @ 2ch ãããã°ã¢ã¦ããã */ logout: function(){ - // cookie の有効期限 + // cookie ã®æå¹æé var cookieExpires = new Date(1995, 0, 1).toString(); - // 有効期限に過去を指定して Be 認証コードの削除 + // æå¹æéã«éå»ãæå®ã㦠Be èªè¨¼ã³ã¼ãã®åé¤ var cookieBeCode = "MDMD=; domain=.2ch.net; expires=" + cookieExpires; this.cookieService.setCookieString(this.beURI, null, cookieBeCode, null); - // 有効期限に過去を指定して Be 認証メールの削除 + // æå¹æéã«éå»ãæå®ã㦠Be èªè¨¼ã¡ã¼ã«ã®åé¤ var cookieBeMail = "DMDM=; domain=.2ch.net; expires=" + cookieExpires; this.cookieService.setCookieString(this.beURI, null, cookieBeMail, null); }, /** - * ログインダイアログを開く + * ãã°ã¤ã³ãã¤ã¢ãã°ãéã */ openLoginDialog:function(){ var dialogURL = "chrome://bbs2chreader/content/belogin/belogin-dialog.xul";