ä»æ¥ã®å°ãã¿ãabout:config ã§ä¸è¦ã®ã¨ã³ããªã¼ã®åé¤ã
åå°ï¼ã©ãï¼ã§ãã¿ã«ãªã£ã¦ãããããªã®ã§ãabout:config ã§ä¸è¦ãªè¨å®å¤ãä½ã£ã¦ãããã«ãããæ¶ãæ¹æ³ãæ¸ãã¦ã¿ã¾ãããã
ã¾ã about:config ä¸ã«ã¦å³ã¯ãªãã¯ã§æ°è¦ä½æâæååãé¸ãã§ãhoge ã¨ãã®è¨å®åãä½ãã¾ããã§ããã®è¨å®å¤ã fuga ã¨ããã¾ããããã§ãã£ãã Firefox ãçµäºãã¦ãããã¡ã¤ã«ã«ãã pref.js ãã¨ãã£ã¿ãªã©ã§éãã¦ã¿ãã¨ä»¥ä¸ã®ãããªè¨è¿°ãè¦ã¤ããã¯ãã§ãã
user_pref("hoge", "fuga");
pref.js 㯠ã¦ã¼ã¶ã¼åå¥ã® Firefox ã®è¨å®ãä¿åãã¦ãããã¡ã¤ã«ã§ãããããã«å ã»ã©ä½ã£ã hoge ãè¨å®ããããã¨ã確èªã§ãã¾ããã¨ãã£ã¿ãéãã¦ãå度 Firefox ãèµ·åã㦠about:config ãéãã¾ããä»åº¦ã¯ãã® hoge ãæ¶ãã¦ã¿ã¾ãããã
ãã£ã«ã¿ãªã©ã使ã£ã¦ãhoge ãåºãã¾ããå³ã¯ãªãã¯ãªã©ãããªã»ãããé¸ã³ã¾ããããã¨ãè¨å®åã¯æ®ãã¾ãããå¤ã¯ç©ºã«ãªãã¯ãã§ããã§ãæ°ã«ããªãã¦ã大ä¸å¤«ãFirefox ãéãã¦å度ã¨ãã£ã¿ã§ pref.js ãéãã¦ã¿ã¾ãããããããä¸æè°ãæ¤ç´¢ãã¦ãå
ã»ã©ã® user_pref("hoge", "fuga");
ã¯è¦ã¤ãããªãã¯ãã§ããã¨ãã£ã¿ãéãã¦è©¦ãã«å度 Firefox ãç«ã¡ä¸ããabout:config ãéãã¦ã¿ã¾ããããä»åº¦ã¯ãã£ã«ã¿ã§ hoge ãæ¢ãã¦ãè¦å½ãããªãã¯ãã§ãã
Firefox ã¯çµäºæã«è¨å®ã pref.js ã«æ¸ãè¾¼ãã®ã§ããããã®éã«ç¡å¹ãªè¨å®ã¯ãæ¸ãè¾¼ã¾ãªãã¨ããæåã®ããã§ãã確èªã«ä½¿ã£ã Firefox ã¯ãMozilla/5.0 (Windows; U; Windows NT 5.0; ja; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2 - Build ID: 2007021917 ãªãã³ã«ãMozilla/5.0 (Windows; U; Windows NT 5.0; ja; rv:1.9a3pre) Gecko/20070314 Minefield/3.0a3pre - Build ID: 2007031418 ã§ãã
è¨å®ããããå ´åãpref.js ãç´æ¥ç·¨éãã¦è¡ããã¨ãå¯è½ã§ãããç·¨éãã¹ãç¯ããFierfox ã®åä½ã«æ¯éããããå ´åãããã¾ãã®ã§ããå§ãã§ããæ¹æ³ã§ã¯ããã¾ãããabout:config ã®ã»ããä¸è¬çã«å®å¿ã ã¨æãã¾ãã
ã¤ãã§ã«æ¸ãã¦ããã¨ãæ¡å¼µæ©è½ãªã©ãã¤ã³ã¹ãã¼ã«ããã¨ãã®è¨å®ã¯ãpref.js ã«æ¸ãè¾¼ã¾ãã¾ããã該å½ã®æ¡å¼µæ©è½ãã¢ã³ã¤ã³ã¹ãã¼ã«ãã¦ããé常ã¯ãã®è¨å®ã¯æ®ã£ãã¾ã¾ã«ãªãã¾ããã¢ã³ã¤ã³ã¹ãã¼ã«å¾ãã¡ãã¡ãè¨å®ããªã»ããããã°è¨å®ã¯åé¤ããã¾ãããæ®éã¯é¢åã§ãããªãã¨ã¯ãã£ã¦ããã¾ãããããããããã¿ãæ®ããã¨ãããã¨ã ã¨æããã¾ãã
ãã®ãã¡ãpref.js ã user.js ã«ã¤ãã¦ãã¡ããã¨æ¸ãã¦ããããã¨åããæã£ã¦ããã®ã§ãããã¾ãã©ãããã®ã§ãã¤ãâ¦ã:p)