- Timestamp:
- 09/19/08 11:14:10 (2 months ago)
- Location:
- platform/firefox/FireMobileSimulator/trunk
- Files:
-
- 1 removed
- 48 modified
- 1 moved
-
build.xml (modified) (1 diff, 1 prop)
-
dist (deleted)
-
src/chrome.manifest (modified) (1 diff)
-
src/chrome/content/about.xul (modified) (1 diff, 1 prop)
-
src/chrome/content/carrier/common.js (modified) (9 diffs, 1 prop)
-
src/chrome/content/carrier/ezweb.js (modified) (10 diffs, 1 prop)
-
src/chrome/content/carrier/foma.js (modified) (5 diffs, 1 prop)
-
src/chrome/content/carrier/softbank.js (modified) (10 diffs, 1 prop)
-
src/chrome/content/common/carrier.js (modified) (1 prop)
-
src/chrome/content/common/ecl.js (modified) (1 prop)
-
src/chrome/content/common/preferences.js (modified) (3 diffs, 1 prop)
-
src/chrome/content/common/util.js (modified) (11 diffs, 1 prop)
-
src/chrome/content/firefoxOverlay.xul (modified) (2 diffs, 1 prop)
-
src/chrome/content/html/au_gps.html (modified) (1 diff, 1 prop)
-
src/chrome/content/html/au_gps.js (modified) (2 diffs, 1 prop)
-
src/chrome/content/html/au_mos.html (modified) (1 prop)
-
src/chrome/content/html/dc_openiarea.html (modified) (1 diff, 1 prop)
-
src/chrome/content/html/dc_openiarea.js (modified) (2 diffs, 1 prop)
-
src/chrome/content/html/error.html (modified) (1 diff, 1 prop)
-
src/chrome/content/mpc.js (modified) (2 diffs, 1 prop)
-
src/chrome/content/options/dialogs/device.js (modified) (1 diff, 1 prop)
-
src/chrome/content/options/dialogs/device.xul (modified) (1 diff, 1 prop)
-
src/chrome/content/options/options.js (modified) (10 diffs, 1 prop)
-
src/chrome/content/options/options.xul (modified) (1 prop)
-
src/chrome/content/options/pages/devices.xul (modified) (2 diffs, 1 prop)
-
src/chrome/content/options/pages/general.xul (modified) (3 diffs, 1 prop)
-
src/chrome/content/options/pages/gps.xul (modified) (3 diffs, 1 prop)
-
src/chrome/content/options/pages/pictogram.xul (modified) (3 diffs, 1 prop)
-
src/chrome/content/overlay.js (modified) (12 diffs, 1 prop)
-
src/chrome/locale/ja (moved) (moved from platform/firefox/FireMobileSimulator/trunk/src/chrome/locale/ja-JP) (1 prop)
-
src/chrome/locale/ja/about.dtd (modified) (1 prop)
-
src/chrome/locale/ja/msim.dtd (modified) (1 diff, 1 prop)
-
src/chrome/locale/ja/msim.properties (modified) (1 prop)
-
src/chrome/skin/msim_icon.png (modified) (1 prop) (previous)
-
src/chrome/skin/msim_off.png (modified) (1 prop) (previous)
-
src/chrome/skin/msim_on.png (modified) (1 prop) (previous)
-
src/chrome/skin/options.css (modified) (1 prop)
-
src/chrome/skin/overlay.css (modified) (1 prop)
-
src/components/msimModifyHeaders.js (modified) (5 diffs, 1 prop)
-
src/components/msimStreamConverter.js (modified) (13 diffs, 1 prop)
-
src/components/nsDeviceProtocolHandler.js (modified) (6 diffs, 1 prop)
-
src/defaults/preferences/msim.js (modified) (1 prop)
-
src/install.rdf (modified) (2 diffs, 1 prop)
-
test/env.cgi (modified) (1 diff)
-
test/gps/au.html (modified) (1 prop)
-
test/gps/dc.html (modified) (1 prop)
-
test/pictogram/au_sjis.html (modified) (2 diffs, 1 prop)
-
test/pictogram/au_utf8.html (modified) (2 diffs, 1 prop)
-
test/pictogram/au_utf8_js.html (modified) (1 diff, 1 prop)
-
test/uid/dc.html (modified) (1 prop)
Legend:
- Unmodified
- Added
- Removed
-
platform/firefox/FireMobileSimulator/trunk/build.xml
- Property svn:mime-type deleted
r19538 r19579 2 2 3 3 <project name="FireMobileSimulator" default="dist"> 4 <property name="src.dir" value="src" />5 <property name="dist.dir" value="dist" />6 <property name="app.name" value="FireMobileSimulator" />7 <property name="app.code" value="msim" />8 <property name="app.id" value="{77cc852e-6b45-11dd-929f-d30256d89593}" /> <!-- extension id like: xxx@xxx.com -->9 <property name="f f.dir" value="C:\Documents and Settings\horikawa_t\Application Data\Mozilla\Firefox\Profiles\dzneq73f.nms\extensions\"/>4 <property name="src.dir" value="src"/> 5 <property name="dist.dir" value="dist"/> 6 <property name="app.name" value="FireMobileSimulator"/> 7 <property name="app.code" value="msim"/> 8 <property name="app.id" value="{77cc852e-6b45-11dd-929f-d30256d89593}"/> <!-- extension id like: xxx@xxx.com --> 9 <property name="fx.dir" value="C:\Documents and Settings\horikawa_t\Application Data\Mozilla\Firefox\Profiles\dzneq73f.nms\extensions\"/> 10 10 11 <condition property="f f.present">11 <condition property="fx.present"> 12 12 <and> 13 <isset property="f f.dir"/>14 <available file="${f f.dir}" type="dir"/>13 <isset property="fx.dir"/> 14 <available file="${fx.dir}" type="dir"/> 15 15 </and> 16 16 </condition> 17 17 18 18 <target name="chrome"> 19 <mkdir dir="${dist.dir}" />20 <mkdir dir="${dist.dir}/chrome" />19 <mkdir dir="${dist.dir}"/> 20 <mkdir dir="${dist.dir}/chrome"/> 21 21 <zip destfile="${dist.dir}/chrome/${app.code}.jar"> 22 22 <fileset dir="${src.dir}/chrome"> 23 <include name="content/**" />24 <include name="locale/**" />25 <include name="skin/**" />26 <exclude name="**/Thumbs.db" />27 <exclude name="**/.*" />28 <exclude name="**/CVS/**" />23 <include name="content/**"/> 24 <include name="locale/**"/> 25 <include name="skin/**"/> 26 <exclude name="**/Thumbs.db"/> 27 <exclude name="**/.*"/> 28 <exclude name="**/CVS/**"/> 29 29 </fileset> 30 30 </zip> 31 31 </target> 32 32 33 <target name="test.chrome" depends="chrome" if="f f.present">33 <target name="test.chrome" depends="chrome" if="fx.present"> 34 34 <!-- copy to chrome directory --> 35 <copy file="${dist.dir}/chrome/${app.code}.jar" todir="${f f.dir}/chrome/chrome" overwrite="true"/>36 <copy file="${src.dir}/chrome.manifest" tofile="${f f.dir}/chrome/${app.name}.manifest" overwrite="true"/>35 <copy file="${dist.dir}/chrome/${app.code}.jar" todir="${fx.dir}/chrome/chrome" overwrite="true"/> 36 <copy file="${src.dir}/chrome.manifest" tofile="${fx.dir}/chrome/${app.name}.manifest" overwrite="true"/> 37 37 </target> 38 38 39 39 <!-- copy to extensions directory --> 40 40 <!-- 41 <target name="test.ext" depends="chrome" if="f f.present">42 <copy file="${dist.dir}/${app.name}.jar" todir="${f f.dir}/extensions/${app.id}/chrome" overwrite="true"/>43 <copy file="${src.dir}/chrome.manifest" todir="${f f.dir}/extensions/${app.id}" overwrite="true"/>41 <target name="test.ext" depends="chrome" if="fx.present"> 42 <copy file="${dist.dir}/${app.name}.jar" todir="${fx.dir}/extensions/${app.id}/chrome" overwrite="true"/> 43 <copy file="${src.dir}/chrome.manifest" todir="${fx.dir}/extensions/${app.id}" overwrite="true"/> 44 44 </target> 45 45 --> 46 46 47 47 <target name="dist" depends="chrome"> 48 48 <zip destfile="${dist.dir}/${app.name}.xpi"> 49 49 <zipfileset file="${dist.dir}/chrome/${app.code}.jar" prefix="chrome"/> 50 50 <fileset dir="${src.dir}"> 51 <include name="chrome.manifest" />52 <include name="install.rdf" />53 <include name="defaults/**" />54 <include name="components/**" />55 <exclude name="**/.*" />56 <exclude name="**/CVS/**" />51 <include name="chrome.manifest"/> 52 <include name="install.rdf"/> 53 <include name="defaults/**"/> 54 <include name="components/**"/> 55 <exclude name="**/.*"/> 56 <exclude name="**/CVS/**"/> 57 57 </fileset> 58 58 </zip> 59 <copy file="${dist.dir}/chrome/${app.code}.jar" todir="${f f.dir}/${app.id}/chrome"/>60 <copy todir="${f f.dir}/${app.id}">59 <copy file="${dist.dir}/chrome/${app.code}.jar" todir="${fx.dir}/${app.id}/chrome"/> 60 <copy todir="${fx.dir}/${app.id}"> 61 61 <fileset dir="${src.dir}"> 62 <include name="chrome.manifest" />63 <include name="install.rdf" />64 <include name="defaults/**" />65 <include name="components/**" />66 <exclude name="**/.*" />67 <exclude name="**/CVS/**" />62 <include name="chrome.manifest"/> 63 <include name="install.rdf"/> 64 <include name="defaults/**"/> 65 <include name="components/**"/> 66 <exclude name="**/.*"/> 67 <exclude name="**/CVS/**"/> 68 68 </fileset> 69 69 </copy> 70 70 </target> 71 71 72 72 <target name="clean"> 73 <delete dir="${dist.dir}" />73 <delete dir="${dist.dir}"/> 74 74 </target> 75 75 76 <target name="clean.ff" if="ff.present">77 <delete dir="${f f.dir}/extensions/${app.id}" failonerror="false"/>78 <delete file="${f f.dir}/chrome/${app.name}.manifest" failonerror="false"/>79 <delete file="${f f.dir}/chrome/chrome/${app.name}.jar" failonerror="false"/>76 <target name="clean.ff" if="fx.present"> 77 <delete dir="${fx.dir}/extensions/${app.id}" failonerror="false"/> 78 <delete file="${fx.dir}/chrome/${app.name}.manifest" failonerror="false"/> 79 <delete file="${fx.dir}/chrome/chrome/${app.name}.jar" failonerror="false"/> 80 80 </target> 81 81 -
platform/firefox/FireMobileSimulator/trunk/src/chrome.manifest
r19538 r19579 1 1 content msim jar:chrome/msim.jar!/content/ 2 2 content msim jar:chrome/msim.jar!/content/ contentaccessible=yes 3 locale msim ja -JP jar:chrome/msim.jar!/locale/ja-JP/3 locale msim ja jar:chrome/msim.jar!/locale/ja/ 4 4 skin msim classic/1.0 jar:chrome/msim.jar!/skin/ 5 5 overlay chrome://browser/content/browser.xul chrome://msim/content/firefoxOverlay.xul -
platform/firefox/FireMobileSimulator/trunk/src/chrome/content/about.xul
- Property svn:mime-type deleted
r19538 r19579 52 52 <separator class="thin"/> 53 53 <label value="&homepage;" style="font-weight: bold;"/> 54 <label onclick="openURL(this.value)" class="text-link" value="https://addons.mozilla.org/ja/firefox/addon/8519" />54 <label onclick="openURL(this.value)" class="text-link" value="https://addons.mozilla.org/ja/firefox/addon/8519"/> 55 55 <separator class="thin"/> 56 56 </vbox> -
platform/firefox/FireMobileSimulator/trunk/src/chrome/content/carrier/common.js
- Property svn:mime-type deleted
r19538 r19579 1 1 var MPC_SJIS = "SJIS"; 2 var MPC_UTF8 = "UTF-8" 3 var MPC_EUCJP = "EUC_JP" 2 var MPC_UTF8 = "UTF-8"; 3 var MPC_EUCJP = "EUC_JP"; 4 4 5 5 var HexStrings = function(hexstrings, charset) { … … 14 14 i : 0, 15 15 hasNextCharacter : function() { 16 if (this.i < this.hexstrings.length - 1) { 17 return true; 18 } else { 19 return false; 20 } 16 return this.i < (this.hexstrings.length - 1); 21 17 }, 22 18 … … 46 42 } 47 43 } 48 } 44 }; 49 45 50 46 function unpack(str) { … … 66 62 } 67 63 var unicode = EscapeUnicode(UnescapeSJIS(hex)); 68 if ( unicode.match(/^\%u[0-9A-F]{4}$/) || unicode.match(/^\%[0-9A-F]{2}$/)) {64 if (/^\%(?:u[0-9A-F]{4}|[0-9A-F]{2})$/.test(unicode)) { 69 65 //dump("return" + parseInt(unicode.substring(2, 6), 16) + "\n"); 70 66 return parseInt(unicode.substring(2, 6), 16); … … 81 77 } 82 78 var unicode = EscapeUnicode(UnescapeUTF8(hex)); 83 if ( unicode.match(/^\%u[0-9A-F]{4}$/) || unicode.match(/^\%[0-9A-F]{2}$/)) {79 if (/^\%(?:u[0-9A-F]{4}|[0-9A-F]{2})$/.test(unicode)) { 84 80 //dump("return" + parseInt(unicode.substring(2, 6), 16) + "\n"); 85 81 return parseInt(unicode.substring(2, 6), 16); … … 89 85 } 90 86 91 function utf82unicode(bits) {87 function utf82unicode(bits) { 92 88 var rbits = new Array(2); 93 if (bits.length == 3){89 if (bits.length == 3) { 94 90 var x = bits[0] & 0x0F; 95 91 var y = bits[1] & 0x3F; … … 97 93 rbits[0] = (x << 4) + (y >> 2); 98 94 rbits[1] = ((y & 0x3) << 6) + z; 99 } else{95 } else { 100 96 dump("NOT IMPLEMENTED!\n"); 101 97 } … … 103 99 } 104 100 105 function unicode2utf8(bits) {101 function unicode2utf8(bits) { 106 102 var rbits = new Array(3); 107 if (bits.length == 2){103 if (bits.length == 2) { 108 104 rbits[0] = 0xE0 + (bits[0] >> 4); 109 105 rbits[1] = 0x80 + ((bits[0] & 0x0F) << 2) + (bits[1] >> 6); 110 106 rbits[2] = 0x80 + (0x3F & bits[1]); 111 } else{107 } else { 112 108 dump("NOT IMPLEMENTED!\n"); 113 109 } … … 115 111 } 116 112 117 function bits2dec(bits) {118 var r =0;119 for (var i=0; i<bits.length; i++){113 function bits2dec(bits) { 114 var r = 0; 115 for (var i=0; i<bits.length; i++) { 120 116 r += bits[i] << (8*(bits.length-i-1)); 121 117 } 122 118 //dump(bits[0].toString(16)+",return to:"+r+"\n"); 123 //if (bits.length>1){119 //if (bits.length>1) { 124 120 //dump(bits[1].toString(16)+",return to:"+r+"\n"); 125 121 //} -
platform/firefox/FireMobileSimulator/trunk/src/chrome/content/carrier/ezweb.js
- Property svn:mime-type deleted
r19538 r19579 28 28 _____convert : function(str) { 29 29 // 2008/09/03 この変換は正規表現でなくてDOMでやった方が良いので使っていない 30 var re1 = /<img\s+( icon|localsrc)="?([0-9]+)"?\s*>/ig;30 var re1 = /<img\s+(?:icon|localsrc)\s*=\s*(["']?)([0-9]+)\1\s*>/ig; 31 31 32 32 var _this = this; 33 33 var f = function(whole, s1, s2) { 34 34 return _this.e_options_encode(s2); 35 } 35 }; 36 36 str = str.replace(re1, f); 37 37 return str; … … 45 45 */ 46 46 setImagePath : function(path) { 47 path.replace(RegExp('/ *$'), '');47 path.replace(RegExp('/+$'), ''); 48 48 this.e_img_path = path + '/e/'; 49 49 }, … … 65 65 66 66 getImageSrc : function(iconno) { 67 return this.e_img_path.replace(/ [/]*$/g, "") + '/' + iconno + '.gif';67 return this.e_img_path.replace(/\/+$/g, "") + '/' + iconno + '.gif'; 68 68 }, 69 69 70 70 getIconNumFromIconName : function(iconname){ 71 71 //javascriptの予約語が含まれているため、キー名の先頭に_(アンダーバー)を付与している … … 773 773 result = false; 774 774 } 775 776 if (char1 == 0xEE && char2 == 0x94){775 776 if (char1 == 0xEE && char2 == 0x94) { 777 777 dump("##probably pictogram?? "+char1+":"+char2+":"+char3+"\n") 778 778 } … … 823 823 if (_this.isPictogramSJISDecs(decs)) { 824 824 // decsはSJISの文字コード 825 dump("au SJIS 16 match\n") 825 dump("au SJIS 16 match\n"); 826 826 return _this 827 827 .e_options_encode(_this.getIconMapSJIS()[bits2dec(decs)]); 828 828 } else if (_this.isPictogramUnicodeDecs(decs)) { 829 829 // decsはUnicode 830 dump("au Unicode 16 match\n") 830 dump("au Unicode 16 match\n"); 831 831 return _this 832 832 .e_options_encode(_this.getIconMapUnicode()[bits2dec(decs)]); … … 838 838 }); 839 839 // SJIS10進数値参照を、SJIS文字コードに変換 840 var re2 = /\&\#([0-9]{5});/ ig;840 var re2 = /\&\#([0-9]{5});/g; 841 841 str = str.replace(re2, function(whole, s1) { 842 842 dump("[mpc]au regmatch10:" + s1 + "\n"); … … 853 853 if (_this.isPictogramSJISDecs(decs)) { 854 854 // decsはSJISの文字コード 855 dump("au SJIS 10 match\n") 855 dump("au SJIS 10 match\n"); 856 856 return _this 857 857 .e_options_encode(_this.getIconMapSJIS()[bits2dec(decs)]); 858 858 } else if (_this.isPictogramUnicodeDecs(decs)) { 859 859 // decsはUnicode 860 dump("au Unicode 10 match\n") 860 dump("au Unicode 10 match\n"); 861 861 return _this 862 862 .e_options_encode(_this.getIconMapUnicode()[bits2dec(decs)]); 863 863 } else { 864 dump("au 10 no match\n") 864 dump("au 10 no match\n"); 865 865 // return String.fromCharCode(dec1) + String.fromCharCode(dec2); 866 866 return whole; … … 910 910 return r; 911 911 } 912 r[0] = bits[0] + 0x07 912 r[0] = bits[0] + 0x07; 913 913 r[1] = bits[1]; 914 914 return r; … … 1559 1559 62604 : 821, 1560 1560 62605 : 822 1561 } 1561 }; 1562 1562 } 1563 1563 return this.icomMap; … … 2208 2208 60295 : 821, 2209 2209 60296 : 822 2210 } 2210 }; 2211 2211 } 2212 2212 return this.icomMap; -
platform/firefox/FireMobileSimulator/trunk/src/chrome/content/carrier/foma.js
- Property svn:mime-type deleted
r19538 r19579 28 28 dump("[mpc]DoCoMo convert start.charset = "+this.charset+"\n"); 29 29 // Firefoxから数値参照が直接渡ってこないので、とりあえずコメントアウト 30 // var re1 = / \&\#x([a-f0-9]{4});/ig;31 // var re2 = / \&\#([0-9]{5});/ig;30 // var re1 = /&#x([a-f0-9]{4});/ig; 31 // var re2 = /&#([0-9]{5});/g; 32 32 // var _this = this; 33 33 // Unicodeの16進数値文字参照をimgタグ形式に変換 34 // str = str.replace(re1, function(whole, s1) { var udec =34 // str = str.replace(re1, function(whole, s1) { var udec = 35 35 // parseInt(s1,16); return _this.isPictogramDec(udec) ? 36 36 // _this.i_options_encode(udec) : s1 ; }); 37 37 // SJISの10進数値文字参照をimgタグ形式に変換 38 // str = str.replace(re2, function(whole, s1) { var udec = sdec2udec(s1);38 // str = str.replace(re2, function(whole, s1) { var udec = sdec2udec(s1); 39 39 // return _this.isPictogramDec(udec) ? _this.i_options_encode(udec) : s1 40 40 // ; }); … … 48 48 // いきなりimgタグに変換する 49 49 dump("[mpc]DoCoMo Unicode16match start\n"); 50 var re1 = / \&\#x([a-f0-9]{2})([a-f0-9]{2});/ig;50 var re1 = /&#x([a-f0-9]{2})([a-f0-9]{2});/ig; 51 51 var _this = this; 52 52 str = str.replace(re1, function(whole, s1, s2) { … … 67 67 if (this.charset == MPC_SJIS) { 68 68 dump("[mpc]DoCoMo SJIS10match start\n"); 69 var regNumericReferenceDec = / \&\#([0-9]{5});/ig;69 var regNumericReferenceDec = /&#([0-9]{5});/g; 70 70 str = str.replace(regNumericReferenceDec, function(whole, s1) { 71 71 //dump("regmatch10:" + s1 + "\n"); … … 192 192 */ 193 193 setImagePath : function(path) { 194 path.replace(RegExp('/ *$'), '');194 path.replace(RegExp('/+$'), ''); 195 195 this.i_img_path = path + '/i/'; 196 196 }, … … 204 204 */ 205 205 i_options_encode : function(dec) { 206 var buf = '<img src="' + this.i_img_path.replace(/ [/]*$/g, "") + '/'206 var buf = '<img src="' + this.i_img_path.replace(/\/+$/g, "") + '/' 207 207 + dec + '.gif" alt="" border="0" width="12" height="12" />'; 208 208 return buf; -
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)