Browse files

Bug 840905 add MSN international locales into the automation repro r=…

…bhearsum
  • Loading branch information...
1 parent ebb6224 commit 3969ba5f2a47386e3d132ff91b95ceca57bb4b9e @BavarianTomcat BavarianTomcat committed Feb 13, 2013
Showing with 16,224 additions and 0 deletions.
  1. +58 −0 partners/msn-australia/distribution/distribution.ini
  2. BIN partners/msn-australia/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
  3. +212 −0 partners/msn-australia/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
  4. BIN partners/msn-australia/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
  5. +23 −0 partners/msn-australia/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
  6. +87 −0 partners/msn-australia/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
  7. +274 −0 partners/msn-australia/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
  8. +17 −0 partners/msn-australia/distribution/searchplugins/common/bing.xml
  9. +8 −0 partners/msn-australia/repack.cfg
  10. +54 −0 partners/msn-canada/distribution/distribution.ini
  11. BIN partners/msn-canada/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
  12. +212 −0 partners/msn-canada/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
  13. BIN partners/msn-canada/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
  14. +23 −0 partners/msn-canada/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
  15. +87 −0 partners/msn-canada/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
  16. +274 −0 partners/msn-canada/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
  17. +17 −0 partners/msn-canada/distribution/searchplugins/common/bing.xml
  18. +8 −0 partners/msn-canada/repack.cfg
  19. BIN partners/msn-china/distribution/china-dist.tar
  20. +58 −0 partners/msn-china/distribution/distribution.ini
  21. BIN partners/msn-china/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
  22. +212 −0 partners/msn-china/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
  23. BIN partners/msn-china/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
  24. +23 −0 partners/msn-china/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
  25. +87 −0 partners/msn-china/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
  26. +274 −0 partners/msn-china/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
  27. +17 −0 partners/msn-china/distribution/searchplugins/common/bing.xml
  28. +8 −0 partners/msn-china/repack.cfg
  29. +58 −0 partners/msn-co/distribution/distribution.ini
  30. BIN partners/msn-co/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
  31. +212 −0 partners/msn-co/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
  32. BIN partners/msn-co/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
  33. +23 −0 partners/msn-co/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
  34. +87 −0 partners/msn-co/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
  35. +274 −0 partners/msn-co/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
  36. +17 −0 partners/msn-co/distribution/searchplugins/common/bing.xml
  37. +8 −0 partners/msn-co/repack.cfg
  38. +54 −0 partners/msn-cr/distribution/distribution.ini
  39. BIN partners/msn-cr/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
  40. +212 −0 partners/msn-cr/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
  41. BIN partners/msn-cr/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
  42. +23 −0 partners/msn-cr/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
  43. +87 −0 partners/msn-cr/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
  44. +274 −0 partners/msn-cr/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
  45. +17 −0 partners/msn-cr/distribution/searchplugins/common/bing.xml
  46. +8 −0 partners/msn-cr/repack.cfg
  47. +59 −0 partners/msn-de/distribution/distribution.ini
  48. BIN partners/msn-de/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
  49. +212 −0 partners/msn-de/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
  50. BIN partners/msn-de/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
  51. +23 −0 partners/msn-de/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
  52. +87 −0 partners/msn-de/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
  53. +274 −0 partners/msn-de/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
  54. +17 −0 partners/msn-de/distribution/searchplugins/common/bing.xml
  55. +8 −0 partners/msn-de/repack.cfg
  56. +54 −0 partners/msn-en-MY/distribution/distribution.ini
  57. BIN partners/msn-en-MY/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
  58. +212 −0 partners/msn-en-MY/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
  59. BIN partners/msn-en-MY/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
  60. +23 −0 partners/msn-en-MY/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
  61. +87 −0 partners/msn-en-MY/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
  62. +274 −0 partners/msn-en-MY/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
  63. +17 −0 partners/msn-en-MY/distribution/searchplugins/common/bing.xml
  64. +8 −0 partners/msn-en-MY/repack.cfg
  65. +42 −0 partners/msn-en-PH/distribution/distribution.ini
  66. BIN partners/msn-en-PH/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
  67. +212 −0 partners/msn-en-PH/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
  68. BIN partners/msn-en-PH/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
  69. +23 −0 partners/msn-en-PH/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
  70. +87 −0 partners/msn-en-PH/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
  71. +274 −0 partners/msn-en-PH/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
  72. +17 −0 partners/msn-en-PH/distribution/searchplugins/common/bing.xml
  73. +8 −0 partners/msn-en-PH/repack.cfg
  74. +58 −0 partners/msn-en-SG/distribution/distribution.ini
  75. BIN partners/msn-en-SG/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
  76. +212 −0 partners/msn-en-SG/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
  77. BIN partners/msn-en-SG/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
  78. +23 −0 partners/msn-en-SG/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
  79. +87 −0 partners/msn-en-SG/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
  80. +274 −0 partners/msn-en-SG/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
  81. +17 −0 partners/msn-en-SG/distribution/searchplugins/common/bing.xml
  82. +8 −0 partners/msn-en-SG/repack.cfg
  83. +54 −0 partners/msn-es-AR/distribution/distribution.ini
  84. BIN partners/msn-es-AR/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
  85. +212 −0 partners/msn-es-AR/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
  86. BIN partners/msn-es-AR/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
  87. +23 −0 partners/msn-es-AR/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
  88. +87 −0 partners/msn-es-AR/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
  89. +274 −0 partners/msn-es-AR/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
  90. +17 −0 partners/msn-es-AR/distribution/searchplugins/common/bing.xml
  91. +8 −0 partners/msn-es-AR/repack.cfg
  92. +54 −0 partners/msn-es-CL/distribution/distribution.ini
  93. BIN partners/msn-es-CL/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
  94. +212 −0 partners/msn-es-CL/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
  95. BIN partners/msn-es-CL/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
  96. +23 −0 partners/msn-es-CL/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
  97. +87 −0 partners/msn-es-CL/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
  98. +274 −0 partners/msn-es-CL/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
  99. +17 −0 partners/msn-es-CL/distribution/searchplugins/common/bing.xml
  100. +8 −0 partners/msn-es-CL/repack.cfg
  101. +58 −0 partners/msn-es/distribution/distribution.ini
  102. BIN partners/msn-es/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
  103. +212 −0 partners/msn-es/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
  104. BIN partners/msn-es/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
  105. +23 −0 partners/msn-es/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
  106. +87 −0 partners/msn-es/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
  107. +274 −0 partners/msn-es/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
  108. +17 −0 partners/msn-es/distribution/searchplugins/common/bing.xml
  109. +8 −0 partners/msn-es/repack.cfg
  110. +47 −0 partners/msn-fi/distribution/distribution.ini
  111. BIN partners/msn-fi/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
  112. +212 −0 partners/msn-fi/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
  113. BIN partners/msn-fi/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
  114. +23 −0 partners/msn-fi/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
  115. +87 −0 partners/msn-fi/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
  116. +274 −0 partners/msn-fi/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
  117. +17 −0 partners/msn-fi/distribution/searchplugins/common/bing.xml
  118. +8 −0 partners/msn-fi/repack.cfg
  119. +54 −0 partners/msn-fr/distribution/distribution.ini
  120. BIN partners/msn-fr/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
  121. +212 −0 partners/msn-fr/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
  122. BIN partners/msn-fr/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
  123. +23 −0 partners/msn-fr/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
  124. +87 −0 partners/msn-fr/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
  125. +274 −0 partners/msn-fr/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
  126. +17 −0 partners/msn-fr/distribution/searchplugins/common/bing.xml
  127. +8 −0 partners/msn-fr/repack.cfg
  128. +63 −0 partners/msn-id/distribution/distribution.ini
  129. BIN partners/msn-id/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
  130. +212 −0 partners/msn-id/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
  131. BIN partners/msn-id/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
  132. +23 −0 partners/msn-id/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
  133. +87 −0 partners/msn-id/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
  134. +274 −0 partners/msn-id/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
  135. +17 −0 partners/msn-id/distribution/searchplugins/common/bing.xml
  136. +8 −0 partners/msn-id/repack.cfg
  137. +58 −0 partners/msn-ja/distribution/distribution.ini
  138. BIN partners/msn-ja/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
  139. +212 −0 partners/msn-ja/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
  140. BIN partners/msn-ja/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
  141. +23 −0 partners/msn-ja/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
  142. +87 −0 partners/msn-ja/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
  143. +274 −0 partners/msn-ja/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
  144. +17 −0 partners/msn-ja/distribution/searchplugins/common/bing.xml
  145. +8 −0 partners/msn-ja/repack.cfg
  146. +54 −0 partners/msn-latam/distribution/distribution.ini
  147. BIN partners/msn-latam/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
  148. +212 −0 partners/msn-latam/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
  149. BIN partners/msn-latam/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
  150. +23 −0 partners/msn-latam/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
  151. +87 −0 partners/msn-latam/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
  152. +274 −0 partners/msn-latam/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
  153. +17 −0 partners/msn-latam/distribution/searchplugins/common/bing.xml
  154. +8 −0 partners/msn-latam/repack.cfg
  155. +63 −0 partners/msn-nl/distribution/distribution.ini
  156. BIN partners/msn-nl/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
  157. +212 −0 partners/msn-nl/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
  158. BIN partners/msn-nl/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
  159. +23 −0 partners/msn-nl/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
  160. +87 −0 partners/msn-nl/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
  161. +274 −0 partners/msn-nl/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
  162. +17 −0 partners/msn-nl/distribution/searchplugins/common/bing.xml
  163. +8 −0 partners/msn-nl/repack.cfg
  164. +54 −0 partners/msn-pe/distribution/distribution.ini
  165. BIN partners/msn-pe/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
  166. +212 −0 partners/msn-pe/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
  167. BIN partners/msn-pe/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
  168. +23 −0 partners/msn-pe/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
  169. +87 −0 partners/msn-pe/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
  170. +274 −0 partners/msn-pe/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
  171. +17 −0 partners/msn-pe/distribution/searchplugins/common/bing.xml
  172. +8 −0 partners/msn-pe/repack.cfg
  173. +54 −0 partners/msn-pt/distribution/distribution.ini
  174. BIN partners/msn-pt/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
  175. +212 −0 partners/msn-pt/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
  176. BIN partners/msn-pt/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
  177. +23 −0 partners/msn-pt/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
  178. +87 −0 partners/msn-pt/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
  179. +274 −0 partners/msn-pt/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
  180. +17 −0 partners/msn-pt/distribution/searchplugins/common/bing.xml
  181. +8 −0 partners/msn-pt/repack.cfg
  182. +50 −0 partners/msn-sg-CN/distribution/distribution.ini
  183. BIN partners/msn-sg-CN/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
  184. +212 −0 partners/msn-sg-CN/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
  185. BIN partners/msn-sg-CN/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
  186. +23 −0 partners/msn-sg-CN/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
  187. +87 −0 partners/msn-sg-CN/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
  188. +274 −0 partners/msn-sg-CN/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
  189. +17 −0 partners/msn-sg-CN/distribution/searchplugins/common/bing.xml
  190. +8 −0 partners/msn-sg-CN/repack.cfg
  191. +54 −0 partners/msn-th/distribution/distribution.ini
  192. BIN partners/msn-th/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
  193. +212 −0 partners/msn-th/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
  194. BIN partners/msn-th/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
  195. +23 −0 partners/msn-th/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
  196. +87 −0 partners/msn-th/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
  197. +274 −0 partners/msn-th/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
  198. +17 −0 partners/msn-th/distribution/searchplugins/common/bing.xml
  199. +8 −0 partners/msn-th/repack.cfg
  200. +54 −0 partners/msn-uk/distribution/distribution.ini
  201. BIN partners/msn-uk/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
  202. +212 −0 partners/msn-uk/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
  203. BIN partners/msn-uk/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
  204. +23 −0 partners/msn-uk/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
  205. +87 −0 partners/msn-uk/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
  206. +274 −0 partners/msn-uk/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
  207. +17 −0 partners/msn-uk/distribution/searchplugins/common/bing.xml
  208. +8 −0 partners/msn-uk/repack.cfg
  209. +54 −0 partners/msn-ve/distribution/distribution.ini
  210. BIN partners/msn-ve/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
  211. +212 −0 partners/msn-ve/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
  212. BIN partners/msn-ve/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
  213. +23 −0 partners/msn-ve/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
  214. +87 −0 partners/msn-ve/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
  215. +274 −0 partners/msn-ve/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
  216. +17 −0 partners/msn-ve/distribution/searchplugins/common/bing.xml
  217. +8 −0 partners/msn-ve/repack.cfg
View
58 partners/msn-australia/distribution/distribution.ini
@@ -0,0 +1,58 @@
+# Partner Distribution Configuration File
+# Author: Mozilla for MSN-international
+# Date: 2012-08-20
+
+[Global]
+id=msnaustralia
+version=1.0
+about=Mozilla Firefox with MSN Australia
+bookmarks.initialized.pref=cck.msnaustralia.initialized
+
+[Preferences]
+app.distributor="msnaustralia"
+app.distributor.channel=""
+app.partner.msnus="msnaustralia"
+browser.search.distributionID="com.bing"
+mozilla.partner.id="msnaustralia"
+_=Cu.import("resource://gre/modules/Services.jsm"); if (!Services.prefs.prefHasUserValue("extensions.installedDistroAddon.firefoxmsn.full@microsoft.com")) { Services.prefs.clearUserPref("extensions.lastAppVersion"); Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci.nsIAppStartup).quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart); } throw {};
+lightweightThemes.isThemeSelected=true
+lightweightThemes.persisted.footerURL=false
+lightweightThemes.persisted.headerURL=false
+lightweightThemes.usedThemes="[{\"id\":\"486203\",\"name\":\"MSN - blue\",\"headerURL\":\"http://getpersonas-cdn.mozilla.net/static/0/3/486203/Fader_blue_diagnol_header.jpg.jpg?1351246567\",\"footerURL\":\"http://getpersonas-cdn.mozilla.net/static/0/3/486203/Fader_blue_diagonal_footer.jpg.jpg?1351246567\",\"textcolor\":\"#000000\",\"accentcolor\":\"#c9c9c9\",\"iconURL\":\"http://getpersonas-cdn.mozilla.net/static/0/3/486203/preview_small.jpg?1351246567\",\"previewURL\":\"http://getpersonas-cdn.mozilla.net/static/0/3/486203/preview.jpg?1351246567\",\"author\":\"MSNthemes\",\"description\":\"Blue MSN theme.\",\"updateURL\":\"https://www.getpersonas.com/en-US/update_check/486203\",\"version\":\"1351246567\",\"updateDate\":1351258263886,\"installDate\":1351258263886}]"
+
+[LocalizablePreferences]
+browser.search.defaultenginename="Bing"
+browser.search.order.1="Bing"
+browser.search.order.2="Google"
+browser.search.order.3="Yahoo"
+browser.startup.homepage="http://ninemsn.com.au/?pc=MOZM"
+browser.startup.homepage_reset="http://ninemsn.com.au/?pc=MOZM"
+keyword.URL="http://www.bing.com/search?q=&form=MOZFLB&pc=MOZM"
+
+[BookmarksMenu]
+item.1.title=ninemsn
+item.1.link=http://ninemsn.com.au
+item.2.title=ninemsn video
+item.2.link=http://catchup.ninemsn.com.au/catalogue
+item.3.title=ninemsn Lifestyle
+item.3.link=http://lifestyle.ninemsn.com.au/
+item.4.title=9 News
+item.4.link=http://news.ninemsn.com.au/
+item.5.title=Wide World of Sports
+item.5.link=http://wwos.ninemsn.com.au/
+item.6.title=TheFIX
+item.6.link=http://thefix.ninemsn.com.au/
+
+[BookmarksToolbar]
+item.1.title=ninemsn
+item.1.link=http://ninemsn.com.au
+item.2.title=ninemsn video
+item.2.link=http://catchup.ninemsn.com.au/catalogue
+item.3.title=ninemsn Lifestyle
+item.3.link=http://lifestyle.ninemsn.com.au/
+item.4.title=9 News
+item.4.link=http://news.ninemsn.com.au/
+item.5.title=Wide World of Sports
+item.5.link=http://wwos.ninemsn.com.au/
+item.6.title=TheFIX
+item.6.link=http://thefix.ninemsn.com.au/
View
BIN ...ers/msn-australia/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
Binary file not shown.
View
212 partners/msn-australia/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
@@ -0,0 +1,212 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Bing Search for Firefox.
+ *
+ * The Initial Developer of the Original Code is The Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2011
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Edward Lee <edilee@mozilla.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+"use strict";
+const global = this;
+
+const {classes: Cc, interfaces: Ci, manager: Cm, utils: Cu} = Components;
+Cu.import("resource://gre/modules/AddonManager.jsm");
+Cu.import("resource://gre/modules/Services.jsm");
+Cu.import("resource://gre/modules/XPCOMUtils.jsm");
+
+// Remember if we were just installed
+let justInstalled = false;
+
+// Remember if we're on Firefox or Fennec
+let platform = Services.appinfo.name == "Firefox" ? "desktop" : "mobile";
+
+// Add a default search engine and move it to the right place
+function addSearchEngine() {
+ // Hide any existing custom searches
+ let origEngine = Services.search.getEngineByName(SEARCH_NAME);
+ if (origEngine != null) {
+ origEngine.hidden = true;
+ unload(function() origEngine.hidden = false);
+ }
+
+ // Add the special search engine if necessary
+ let engineName = SEARCH_NAME + " ";
+ try {
+ Services.search.addEngineWithDetails(engineName, SEARCH_ICON, "", "",
+ "GET", SEARCH_URL);
+ }
+ catch(ex) {}
+
+ // Get the just-added or existing engine
+ let engine = Services.search.getEngineByName(engineName);
+ if (engine == null)
+ return;
+
+ // Move it to the desired position
+ Services.search.moveEngine(engine, SEARCH_POSITION);
+
+ // Switch to the engine by default if it's first
+ if (SEARCH_POSITION == 0 && justInstalled)
+ Services.search.currentEngine = engine;
+
+ // Clean up when disabling
+ unload(function() Services.search.removeEngine(engine));
+}
+
+// Customize the default prefs
+function setPref(pref, value) {
+ let branch = Services.prefs.getBranch("");
+ branch.setCharPref(pref, value);
+}
+
+// Make sure the window has an app tab set to MSN
+function ensureMsnAppTab(window) {
+ // Only bother if we were just installed and support app tabs
+ if (!justInstalled || platform != "desktop")
+ return;
+
+ // Try again after a short delay if session store is initializing
+ let {__SSi, __SS_restoreID, gBrowser, setTimeout} = window;
+ if (__SSi == null || __SS_restoreID != null) {
+ setTimeout(function() ensureMsnAppTab(window), 1000);
+ return;
+ }
+
+ // Figure out if we already have a pinned MSN
+ let msnTab = findOpenTab(gBrowser, function(tab, URI) {
+ return tab.pinned && URI.host == "msn.com";
+ });
+
+ // Always remove the MSN tab when uninstalling
+ unload(function() gBrowser.removeTab(msnTab));
+
+ // No need to add!
+ if (msnTab != null)
+ return;
+
+ // Add the tab and pin it as the last app tab
+ msnTab = gBrowser.addTab(getMsnBase("", "apptab"));
+ gBrowser.pinTab(msnTab);
+}
+
+// Open a new tab for the landing page and select it
+function showLandingPage(window) {
+ // Only bother if we were just installed and haven't shown yet
+ if (!justInstalled || showLandingPage.shown)
+ return;
+
+ // Do the appropriate thing on each platform
+ if (platform == "desktop") {
+ // Try again after a short delay if session store is initializing
+ let {__SSi, __SS_restoreID, gBrowser, setTimeout} = window;
+ if (__SSi == null || __SS_restoreID != null) {
+ setTimeout(function() showLandingPage(window), 1000);
+ return;
+ }
+
+ // Figure out if we already have a landing page
+ let landingTab = findOpenTab(gBrowser, function(tab, URI) {
+ return URI.spec == LANDING_PAGE;
+ });
+
+ // Always remove the landing page when uninstalling
+ unload(function() gBrowser.removeTab(landingTab));
+
+ // Add the landing page if not open yet
+ if (landingTab == null)
+ landingTab = gBrowser.loadOneTab(LANDING_PAGE);
+
+ // Make sure it's focused
+ gBrowser.selectedTab = landingTab;
+ }
+ else {
+ let {BrowserUI} = window;
+ let tab = BrowserUI.newTab(LANDING_PAGE);
+ unload(function() BrowserUI.closeTab(tab));
+ }
+
+ // Only show the landing page once
+ showLandingPage.shown = true;
+}
+
+/**
+ * Handle the add-on being activated on install/enable
+ */
+function startup({id}, reason) AddonManager.getAddonByID(id, function(addon) {
+ // Load various javascript includes for helper functions
+ ["helper", "utils"].forEach(function(fileName) {
+ let fileURI = addon.getResourceURI("scripts/" + fileName + ".js");
+ Services.scriptloader.loadSubScript(fileURI.spec, global);
+ });
+
+ // Add custom search support to the browser
+ addSearchEngine();
+
+ // Change some prefs to custom search on install
+ if (justInstalled) {
+ setPref(PREF_KEYWORD, SEARCH_KEYWORD_URL);
+ setPref(PREF_HOME, SEARCH_HOME_URL);
+ setPref(PREF_HOME_RESET, SEARCH_HOME_URL);
+ }
+
+ // Add an MSN app tab
+ watchWindows(ensureMsnAppTab);
+
+ // Open the landing page
+ watchWindows(showLandingPage);
+
+ // We're no longer just installed after we get some windows loaded
+ watchWindows(function(window) {
+ if (justInstalled)
+ window.setTimeout(function() justInstalled = false, 5000);
+ });
+})
+
+/**
+ * Handle the add-on being deactivated on uninstall/disable
+ */
+function shutdown(data, reason) {
+ // Clean up with unloaders when we're deactivating
+ if (reason != APP_SHUTDOWN)
+ unload();
+}
+
+/**
+ * Handle the add-on being installed
+ */
+function install(data, reason) {
+ justInstalled = reason == ADDON_INSTALL;
+}
+
+/**
+ * Handle the add-on being uninstalled
+ */
+function uninstall(data, reason) {}
View
BIN partners/msn-australia/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
23 partners/msn-australia/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<r:RDF xmlns="http://www.mozilla.org/2004/em-rdf#"
+ xmlns:r="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <r:Description about="urn:mozilla:install-manifest">
+ <creator>Bing</creator>
+ <description>Search the web with Bing.</description>
+ <homepageURL>http://www.bing.com/</homepageURL>
+ <id>firefoxmsn.full@microsoft.com</id>
+ <name>Bing Search for Firefox</name>
+ <version>1.0</version>
+
+ <bootstrap>true</bootstrap>
+ <type>2</type>
+
+ <targetApplication>
+ <r:Description>
+ <id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</id>
+ <minVersion>4.0</minVersion>
+ <maxVersion>18.0</maxVersion>
+ </r:Description>
+ </targetApplication>
+ </r:Description>
+</r:RDF>
View
87 ...ers/msn-australia/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
@@ -0,0 +1,87 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Bing Search for Firefox Helper Functions.
+ *
+ * The Initial Developer of the Original Code is The Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2011
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Edward Lee <edilee@mozilla.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+"use strict";
+
+const HOME_SEARCH = JSON.stringify({
+ name: "Bing",
+ searchUrl: "http://www.bing.com/search?form=MOZMPB&pc=MOZM&q=_searchTerms_",
+ image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAAAZCAYAAACM9limAAAC7mlDQ1BJQ0MgUHJvZmlsZQAAeAGFVM9rE0EU%2FjZuqdAiCFprDrJ4kCJJWatoRdQ2%2FRFiawzbH7ZFkGQzSdZuNuvuJrWliOTi0SreRe2hB%2F%2BAHnrwZC9KhVpFKN6rKGKhFy3xzW5MtqXqwM5%2B8943731vdt8ADXLSNPWABOQNx1KiEWlsfEJq%2FIgAjqIJQTQlVdvsTiQGQYNz%2BXvn2HoPgVtWw3v7d7J3rZrStpoHhP1A4Eea2Sqw7xdxClkSAog836Epx3QI3%2BPY8uyPOU55eMG1Dys9xFkifEA1Lc5%2FTbhTzSXTQINIOJT1cVI%2BnNeLlNcdB2luZsbIEL1PkKa7zO6rYqGcTvYOkL2d9H5Os94%2BwiHCCxmtP0a4jZ71jNU%2F4mHhpObEhj0cGDX0%2BGAVtxqp%2BDXCFF8QTSeiVHHZLg3xmK79VvJKgnCQOMpkYYBzWkhP10xu%2BLqHBX0m1xOv4ndWUeF5jxNn3tTd70XaAq8wDh0MGgyaDUh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7A0aweluc5YmBROgGVrkW8ulDoUFub6XifTzobJQIW4MjUcCpIKtwWPFUqk3XeAubu48R2q5B%2B4QNccMN%2F29Qx1NPy3U32xgYPIXtbbim0Y7fxKYmjvRM6%2FnfSdaN9d7CGAMM9e7%2BcwZeVuRFfmah9z5NTgfdlSu7dV84flx5gVAZ8hickwAKV5Nluf8Rx8zXzswOxvka35yADQTJgnmaeTvxoPyPyY%2FMs2cC7wrv2Q%2B95n7De%2BpXDP1begEbYbho%2FkrwQePqVD64GUfzbdVzT03o44uR8XhXuM9HCwfYEnNuYg76tq4nvp8%2Bfaw1C%2Btdysbes5Do7gLy2yEkoX8eTv2PXp8KJ0QuY8iJHkl4C4jVnjBzYAClTmHrranKtVV%2F%2B2Z5Xfq86Vf3di9DF3NNpTsMEBB8Ui%2FWJ4NbTY6Tn3zDTT%2B2HoMhzvCWE1%2B9NosnCjKJQByx19Gct%2BstdqNjn4M51ckZPskKNqIjPZ1AFISVMaxXcp140M74gfMOQpHm0In%2BNgCw0rkjy2LGrtrUDLvRdf0RRkpqyB8cMPHNv4QxvnPQr%2BF4o7Tf2YYPaz7JtZtGhpe8Atz4sanlbn%2Bq%2BhjDYwBp6A5q1779FLlu5fiFH8ByuoZ6LxtRBluGt9G5auYewXNxPP4v7N0AOzcoPC7%2FwBfh%2BUgcZXzvgAAAABJRU5ErkJggg%3D%3D",
+});
+const LANDING_PAGE = "http://ninemsn.com.au/?pc=MOZM";
+const PREF_HOME = "browser.startup.homepage";
+const PREF_HOME_RESET = "browser.startup.homepage_reset";
+const PREF_KEYWORD = "keyword.URL";
+const SEARCH_DOMAIN = "www.bing.com";
+const SEARCH_ICON = "data:image/x-icon;base64,AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAAAAAABMLAAATCwAAAAAAAAAAAAAVpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8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F%2F%2F%2F%2F%2F%2B24%2F9QvP8Vpv8Vpv8Vpv8Vpv%2FF6f%2F%2F%2F%2F%2FF6f8Vpv8Vpv8krP9QvP9QvP9Bt%2F8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv%2FF6f%2F%2F%2F%2F%2FF6f8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv9Bt%2F9QvP9Bt%2F8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8AAHBsAABhdAAAbiAAAHJ0AABsaQAAdGkAACBDAABlbgAAUEEAAEVYAAAuQwAAOy4AAEU7AABBVAAAQ00AAC5W";
+const SEARCH_HOME_URL = "http://ninemsn.com.au/?pc=MOZM";
+const SEARCH_KEYWORD_URL = "http://www.bing.com/search?form=MOZMLB&pc=MOZM&q=";
+const SEARCH_NAME = "Bing";
+const SEARCH_POSITION = 0;
+const SEARCH_URL = "http://www.bing.com/search?form=MOZMSB&pc=MOZM&q={searchTerms}";
+
+// Look through tabs in the browser to see if any match
+function findOpenTab(browser, checkTabAndURI) {
+ let foundTab;
+ Array.some(browser.tabs, function(tab) {
+ // Check if there's an existing page
+ try {
+ // Use an activate navigation if it's still loading
+ let {currentURI, webNavigation, __SS_data} = tab.linkedBrowser;
+ let channel = webNavigation.documentChannel;
+ if (channel != null)
+ currentURI = channel.originalURI
+
+ // Use the session restore entry if it's still restoring
+ if (currentURI.spec == "about:blank" && __SS_data != null)
+ currentURI = Services.io.newURI(__SS_data.entries[0].url, null, null);
+
+ // Short circuit now that we found it
+ if (checkTabAndURI(tab, currentURI)) {
+ foundTab = tab;
+ return true;
+ }
+ }
+ catch(ex) {}
+ });
+ return foundTab;
+}
+
+#// Get a MSN url with a partner code
+#function getMsnBase(path, from) {
+# return "http://msn.com/" + path + "?pc=MOZM&source=" +
+# platform + "-" + from;
+#}
View
274 ...ners/msn-australia/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
@@ -0,0 +1,274 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Home Dash Utility.
+ *
+ * The Initial Developer of the Original Code is The Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2011
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Edward Lee <edilee@mozilla.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+"use strict";
+
+/**
+ * Get a localized string with string replacement arguments filled in and
+ * correct plural form picked if necessary.
+ *
+ * @note: Initialize the strings to use with getString.init(addon).
+ *
+ * @usage getString(name): Get the localized string for the given name.
+ * @param [string] name: Corresponding string name in the properties file.
+ * @return [string]: Localized string for the string name.
+ *
+ * @usage getString(name, arg): Replace %S references in the localized string.
+ * @param [string] name: Corresponding string name in the properties file.
+ * @param [any] arg: Value to insert for instances of %S.
+ * @return [string]: Localized string with %S references replaced.
+ *
+ * @usage getString(name, args): Replace %1$S references in localized string.
+ * @param [string] name: Corresponding string name in the properties file.
+ * @param [array of any] args: Array of values to replace references like %1$S.
+ * @return [string]: Localized string with %N$S references replaced.
+ *
+ * @usage getString(name, args, plural): Pick the correct plural form.
+ * @param [string] name: Corresponding string name in the properties file.
+ * @param [array of any] args: Array of values to replace references like %1$S.
+ * @param [number] plural: Number to decide what plural form to use.
+ * @return [string]: Localized string of the correct plural form.
+ */
+function getString(name, args, plural) {
+ // Use the cached bundle to retrieve the string
+ let str;
+ try {
+ str = getString.bundle.GetStringFromName(name);
+ }
+ // Use the fallback in-case the string isn't localized
+ catch(ex) {
+ str = getString.fallback.GetStringFromName(name);
+ }
+
+ // Pick out the correct plural form if necessary
+ if (plural != null)
+ str = getString.plural(plural, str);
+
+ // Fill in the arguments if necessary
+ if (args != null) {
+ // Convert a string or something not array-like to an array
+ if (typeof args == "string" || args.length == null)
+ args = [args];
+
+ // Assume %S refers to the first argument
+ str = str.replace(/%s/gi, args[0]);
+
+ // Replace instances of %N$S where N is a 1-based number
+ Array.forEach(args, function(replacement, index) {
+ str = str.replace(RegExp("%" + (index + 1) + "\\$S", "gi"), replacement);
+ });
+ }
+
+ return str;
+}
+
+/**
+ * Initialize getString() for the provided add-on.
+ *
+ * @usage getString.init(addon): Load properties file for the add-on.
+ * @param [object] addon: Add-on object from AddonManager
+ *
+ * @usage getString.init(addon, getAlternate): Load properties with alternate.
+ * @param [object] addon: Add-on object from AddonManager
+ * @param [function] getAlternate: Convert a locale to an alternate locale
+ */
+getString.init = function(addon, getAlternate) {
+ // Set a default get alternate function if it doesn't exist
+ if (typeof getAlternate != "function")
+ getAlternate = function() "en-US";
+
+ // Get the bundled properties file for the app's locale
+ function getBundle(locale) {
+ let propertyPath = "locales/" + locale + ".properties";
+ let propertyFile = addon.getResourceURI(propertyPath);
+
+ // Get a bundle and test if it's able to do simple things
+ try {
+ // Avoid caching issues by always getting a new file
+ let uniqueFileSpec = propertyFile.spec + "#" + Math.random();
+ let bundle = Services.strings.createBundle(uniqueFileSpec);
+ bundle.getSimpleEnumeration();
+ return bundle;
+ }
+ catch(ex) {}
+
+ // The locale must not exist, so give nothing
+ return null;
+ }
+
+ // Use the current locale or the alternate as the primary bundle
+ let locale = Cc["@mozilla.org/chrome/chrome-registry;1"].
+ getService(Ci.nsIXULChromeRegistry).getSelectedLocale("global");
+ getString.bundle = getBundle(locale) || getBundle(getAlternate(locale));
+
+ // Create a fallback in-case a string is missing
+ getString.fallback = getBundle("en-US");
+
+ // Get the appropriate plural form getter
+ Cu.import("resource://gre/modules/PluralForm.jsm");
+ let rule = getString("pluralRule");
+ [getString.plural] = PluralForm.makeGetter(rule);
+}
+
+/**
+ * Helper that adds event listeners and remembers to remove on unload
+ */
+function listen(window, node, event, func, capture) {
+ // Default to use capture
+ if (capture == null)
+ capture = true;
+
+ node.addEventListener(event, func, capture);
+ function undoListen() {
+ node.removeEventListener(event, func, capture);
+ }
+
+ // Undo the listener on unload and provide a way to undo everything
+ let undoUnload = unload(undoListen, window);
+ return function() {
+ undoListen();
+ undoUnload();
+ };
+}
+
+/**
+ * Save callbacks to run when unloading. Optionally scope the callback to a
+ * container, e.g., window. Provide a way to run all the callbacks.
+ *
+ * @usage unload(): Run all callbacks and release them.
+ *
+ * @usage unload(callback): Add a callback to run on unload.
+ * @param [function] callback: 0-parameter function to call on unload.
+ * @return [function]: A 0-parameter function that undoes adding the callback.
+ *
+ * @usage unload(callback, container) Add a scoped callback to run on unload.
+ * @param [function] callback: 0-parameter function to call on unload.
+ * @param [node] container: Remove the callback when this container unloads.
+ * @return [function]: A 0-parameter function that undoes adding the callback.
+ */
+function unload(callback, container) {
+ // Initialize the array of unloaders on the first usage
+ let unloaders = unload.unloaders;
+ if (unloaders == null)
+ unloaders = unload.unloaders = [];
+
+ // Calling with no arguments runs all the unloader callbacks
+ if (callback == null) {
+ unloaders.slice().forEach(function(unloader) unloader());
+ unloaders.length = 0;
+ return;
+ }
+
+ // The callback is bound to the lifetime of the container if we have one
+ if (container != null) {
+ // Remove the unloader when the container unloads
+ container.addEventListener("unload", removeUnloader, false);
+
+ // Wrap the callback to additionally remove the unload listener
+ let origCallback = callback;
+ callback = function() {
+ container.removeEventListener("unload", removeUnloader, false);
+ origCallback();
+ }
+ }
+
+ // Wrap the callback in a function that ignores failures
+ function unloader() {
+ try {
+ callback();
+ }
+ catch(ex) {}
+ }
+ unloaders.push(unloader);
+
+ // Provide a way to remove the unloader
+ function removeUnloader() {
+ let index = unloaders.indexOf(unloader);
+ if (index != -1)
+ unloaders.splice(index, 1);
+ }
+ return removeUnloader;
+}
+
+/**
+ * Apply a callback to each open and new browser windows.
+ *
+ * @usage watchWindows(callback): Apply a callback to each browser window.
+ * @param [function] callback: 1-parameter function that gets a browser window.
+ */
+function watchWindows(callback) {
+ // Wrap the callback in a function that ignores failures
+ function watcher(window) {
+ try {
+ // Now that the window has loaded, only handle browser windows
+ let {documentElement} = window.document;
+ if (documentElement.getAttribute("windowtype") == "navigator:browser")
+ callback(window);
+ }
+ catch(ex) {}
+ }
+
+ // Wait for the window to finish loading before running the callback
+ function runOnLoad(window) {
+ // Listen for one load event before checking the window type
+ window.addEventListener("load", function runOnce() {
+ window.removeEventListener("load", runOnce, false);
+ watcher(window);
+ }, false);
+ }
+
+ // Add functionality to existing windows
+ let windows = Services.wm.getEnumerator(null);
+ while (windows.hasMoreElements()) {
+ // Only run the watcher immediately if the window is completely loaded
+ let window = windows.getNext();
+ if (window.document.readyState == "complete")
+ watcher(window);
+ // Wait for the window to load before continuing
+ else
+ runOnLoad(window);
+ }
+
+ // Watch for new browser windows opening then wait for it to load
+ function windowWatcher(subject, topic) {
+ if (topic == "domwindowopened")
+ runOnLoad(subject);
+ }
+ Services.ww.registerNotification(windowWatcher);
+
+ // Make sure to stop watching for windows if we're unloading
+ unload(function() Services.ww.unregisterNotification(windowWatcher));
+}
View
17 partners/msn-australia/distribution/searchplugins/common/bing.xml
@@ -0,0 +1,17 @@
+<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
+ <ShortName>Bing</ShortName>
+ <Description>Bing. Search by Microsoft.</Description>
+ <InputEncoding>UTF-8</InputEncoding>
+ <Image width="16" height="16" type="image/x-icon">data:image/x-icon;base64,AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAAAAAABMLAAATCwAAAAAAAAAAAAAVpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8ysf97zf+24//F6f/F6f/F6f+K0/9QvP8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8krP+Z2P/////////w+f/F6f/F6f/i9P/////////T7v9Bt/8Vpv8Vpv8Vpv8Vpv/T7v/////w+f97zf8Vpv8Vpv8Vpv8Vpv9QvP/T7v/////w+f9Bt/8Vpv8Vpv97zf////////9QvP8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8krP/i9P/////i9P8Vpv8Vpv+24//////i9P8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv+K0/////////8Vpv8Vpv/F6f////////8krP8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv+n3v/////w+f8Vpv8Vpv/F6f////////+n3v8krP8Vpv8Vpv8Vpv8Vpv8Vpv9tx/////////+Z2P8Vpv8Vpv/F6f/////////////i9P+K0/9QvP9QvP9tx//F6f////////+n3v8Vpv8Vpv8Vpv/F6f/////T7v+Z2P/i9P////////////////////+24/9QvP8Vpv8Vpv8Vpv8Vpv/F6f/////F6f8Vpv8Vpv8krP9QvP9QvP9Bt/8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv/F6f/////F6f8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv9Bt/9QvP9Bt/8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8AAHBsAABhdAAAbiAAAHJ0AABsaQAAdGkAACBDAABlbgAAUEEAAEVYAAAuQwAAOy4AAEU7AABBVAAAQ00AAC5W</Image>
+ <Url type="application/x-suggestions+json" template="http://api.bing.com/osjson.aspx">
+ <Param name="query" value="{searchTerms}"/>
+ <Param name="form" value="MOZFSB"/>
+ <Param name="pc" value="MOZM"/>
+ </Url>
+ <Url type="text/html" method="GET" template="http://www.bing.com/search">
+ <Param name="q" value="{searchTerms}"/>
+ <Param name="form" value="MOZFSB"/>
+ <Param name="pc" value="MOZM"/>
+ </Url>
+ <SearchForm>http://www.bing.com/search</SearchForm>
+</SearchPlugin>
View
8 partners/msn-australia/repack.cfg
@@ -0,0 +1,8 @@
+aus="msnaustralia"
+dist_id="msnaustralia"
+dist_version="1.0"
+linux-i686=false
+locales="en-US"
+mac=true
+win32=true
+migrationWizardDisabled=true
View
54 partners/msn-canada/distribution/distribution.ini
@@ -0,0 +1,54 @@
+# Partner Distribution Configuration File
+# Author: Mozilla for MSN-international
+# Date: 2012-08-20
+
+[Global]
+id=msncanada
+version=1.0
+about=Mozilla Firefox with MSN Canada
+bookmarks.initialized.pref=cck.msncanada.initialized
+
+[Preferences]
+app.distributor="msncanada"
+app.distributor.channel=""
+app.partner.msnus="msncanada"
+browser.search.distributionID="com.bing"
+mozilla.partner.id="msncanada"
+_=Cu.import("resource://gre/modules/Services.jsm"); if (!Services.prefs.prefHasUserValue("extensions.installedDistroAddon.firefoxmsn.full@microsoft.com")) { Services.prefs.clearUserPref("extensions.lastAppVersion"); Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci.nsIAppStartup).quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart); } throw {};
+lightweightThemes.isThemeSelected=true
+lightweightThemes.persisted.footerURL=false
+lightweightThemes.persisted.headerURL=false
+lightweightThemes.usedThemes="[{\"id\":\"486203\",\"name\":\"MSN - blue\",\"headerURL\":\"http://getpersonas-cdn.mozilla.net/static/0/3/486203/Fader_blue_diagnol_header.jpg.jpg?1351246567\",\"footerURL\":\"http://getpersonas-cdn.mozilla.net/static/0/3/486203/Fader_blue_diagonal_footer.jpg.jpg?1351246567\",\"textcolor\":\"#000000\",\"accentcolor\":\"#c9c9c9\",\"iconURL\":\"http://getpersonas-cdn.mozilla.net/static/0/3/486203/preview_small.jpg?1351246567\",\"previewURL\":\"http://getpersonas-cdn.mozilla.net/static/0/3/486203/preview.jpg?1351246567\",\"author\":\"MSNthemes\",\"description\":\"Blue MSN theme.\",\"updateURL\":\"https://www.getpersonas.com/en-US/update_check/486203\",\"version\":\"1351246567\",\"updateDate\":1351258263886,\"installDate\":1351258263886}]"
+
+[LocalizablePreferences]
+browser.search.defaultenginename="Bing"
+browser.search.order.1="Bing"
+browser.search.order.2="Google"
+browser.search.order.3="Yahoo"
+browser.startup.homepage="http://ca.msn.com/?pc=MOZM"
+browser.startup.homepage_reset="http://ca.msn.com/?pc=MOZM"
+keyword.URL="http://www.bing.com/search?q=&form=MOZFLB&pc=MOZM"
+
+[BookmarksMenu]
+item.1.title=MSN
+item.1.link=http://ca.msn.com
+item.2.title=MSN Entertainment
+item.2.link=http://http://entertainment.ca.msn.com/
+item.3.title=MSN Sport
+item.3.link=http://sports.ca.msn.com/
+item.4.title=MSN Money
+item.4.link=http://money.ca.msn.com/
+item.5.title=MSN Lifestyle
+item.5.link=http://lifestyle.ca.msn.com/
+
+[BookmarksToolbar]
+item.1.title=MSN
+item.1.link=http://ca.msn.com
+item.2.title=MSN Entertainment
+item.2.link=http://http://entertainment.ca.msn.com/
+item.3.title=MSN Sports
+item.3.link=http://sports.ca.msn.com/
+item.4.title=MSN Money
+item.4.link=http://money.ca.msn.com/
+item.5.title=MSN Lifestyle
+item.5.link=http://lifestyle.ca.msn.com/
View
BIN partners/msn-canada/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
Binary file not shown.
View
212 partners/msn-canada/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
@@ -0,0 +1,212 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Bing Search for Firefox.
+ *
+ * The Initial Developer of the Original Code is The Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2011
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Edward Lee <edilee@mozilla.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+"use strict";
+const global = this;
+
+const {classes: Cc, interfaces: Ci, manager: Cm, utils: Cu} = Components;
+Cu.import("resource://gre/modules/AddonManager.jsm");
+Cu.import("resource://gre/modules/Services.jsm");
+Cu.import("resource://gre/modules/XPCOMUtils.jsm");
+
+// Remember if we were just installed
+let justInstalled = false;
+
+// Remember if we're on Firefox or Fennec
+let platform = Services.appinfo.name == "Firefox" ? "desktop" : "mobile";
+
+// Add a default search engine and move it to the right place
+function addSearchEngine() {
+ // Hide any existing custom searches
+ let origEngine = Services.search.getEngineByName(SEARCH_NAME);
+ if (origEngine != null) {
+ origEngine.hidden = true;
+ unload(function() origEngine.hidden = false);
+ }
+
+ // Add the special search engine if necessary
+ let engineName = SEARCH_NAME + " ";
+ try {
+ Services.search.addEngineWithDetails(engineName, SEARCH_ICON, "", "",
+ "GET", SEARCH_URL);
+ }
+ catch(ex) {}
+
+ // Get the just-added or existing engine
+ let engine = Services.search.getEngineByName(engineName);
+ if (engine == null)
+ return;
+
+ // Move it to the desired position
+ Services.search.moveEngine(engine, SEARCH_POSITION);
+
+ // Switch to the engine by default if it's first
+ if (SEARCH_POSITION == 0 && justInstalled)
+ Services.search.currentEngine = engine;
+
+ // Clean up when disabling
+ unload(function() Services.search.removeEngine(engine));
+}
+
+// Customize the default prefs
+function setPref(pref, value) {
+ let branch = Services.prefs.getBranch("");
+ branch.setCharPref(pref, value);
+}
+
+// Make sure the window has an app tab set to MSN
+function ensureMsnAppTab(window) {
+ // Only bother if we were just installed and support app tabs
+ if (!justInstalled || platform != "desktop")
+ return;
+
+ // Try again after a short delay if session store is initializing
+ let {__SSi, __SS_restoreID, gBrowser, setTimeout} = window;
+ if (__SSi == null || __SS_restoreID != null) {
+ setTimeout(function() ensureMsnAppTab(window), 1000);
+ return;
+ }
+
+ // Figure out if we already have a pinned MSN
+ let msnTab = findOpenTab(gBrowser, function(tab, URI) {
+ return tab.pinned && URI.host == "msn.com";
+ });
+
+ // Always remove the MSN tab when uninstalling
+ unload(function() gBrowser.removeTab(msnTab));
+
+ // No need to add!
+ if (msnTab != null)
+ return;
+
+ // Add the tab and pin it as the last app tab
+ msnTab = gBrowser.addTab(getMsnBase("", "apptab"));
+ gBrowser.pinTab(msnTab);
+}
+
+// Open a new tab for the landing page and select it
+function showLandingPage(window) {
+ // Only bother if we were just installed and haven't shown yet
+ if (!justInstalled || showLandingPage.shown)
+ return;
+
+ // Do the appropriate thing on each platform
+ if (platform == "desktop") {
+ // Try again after a short delay if session store is initializing
+ let {__SSi, __SS_restoreID, gBrowser, setTimeout} = window;
+ if (__SSi == null || __SS_restoreID != null) {
+ setTimeout(function() showLandingPage(window), 1000);
+ return;
+ }
+
+ // Figure out if we already have a landing page
+ let landingTab = findOpenTab(gBrowser, function(tab, URI) {
+ return URI.spec == LANDING_PAGE;
+ });
+
+ // Always remove the landing page when uninstalling
+ unload(function() gBrowser.removeTab(landingTab));
+
+ // Add the landing page if not open yet
+ if (landingTab == null)
+ landingTab = gBrowser.loadOneTab(LANDING_PAGE);
+
+ // Make sure it's focused
+ gBrowser.selectedTab = landingTab;
+ }
+ else {
+ let {BrowserUI} = window;
+ let tab = BrowserUI.newTab(LANDING_PAGE);
+ unload(function() BrowserUI.closeTab(tab));
+ }
+
+ // Only show the landing page once
+ showLandingPage.shown = true;
+}
+
+/**
+ * Handle the add-on being activated on install/enable
+ */
+function startup({id}, reason) AddonManager.getAddonByID(id, function(addon) {
+ // Load various javascript includes for helper functions
+ ["helper", "utils"].forEach(function(fileName) {
+ let fileURI = addon.getResourceURI("scripts/" + fileName + ".js");
+ Services.scriptloader.loadSubScript(fileURI.spec, global);
+ });
+
+ // Add custom search support to the browser
+ addSearchEngine();
+
+ // Change some prefs to custom search on install
+ if (justInstalled) {
+ setPref(PREF_KEYWORD, SEARCH_KEYWORD_URL);
+ setPref(PREF_HOME, SEARCH_HOME_URL);
+ setPref(PREF_HOME_RESET, SEARCH_HOME_URL);
+ }
+
+ // Add an MSN app tab
+ watchWindows(ensureMsnAppTab);
+
+ // Open the landing page
+ watchWindows(showLandingPage);
+
+ // We're no longer just installed after we get some windows loaded
+ watchWindows(function(window) {
+ if (justInstalled)
+ window.setTimeout(function() justInstalled = false, 5000);
+ });
+})
+
+/**
+ * Handle the add-on being deactivated on uninstall/disable
+ */
+function shutdown(data, reason) {
+ // Clean up with unloaders when we're deactivating
+ if (reason != APP_SHUTDOWN)
+ unload();
+}
+
+/**
+ * Handle the add-on being installed
+ */
+function install(data, reason) {
+ justInstalled = reason == ADDON_INSTALL;
+}
+
+/**
+ * Handle the add-on being uninstalled
+ */
+function uninstall(data, reason) {}
View
BIN partners/msn-canada/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
23 partners/msn-canada/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<r:RDF xmlns="http://www.mozilla.org/2004/em-rdf#"
+ xmlns:r="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <r:Description about="urn:mozilla:install-manifest">
+ <creator>Bing</creator>
+ <description>Search the web with Bing.</description>
+ <homepageURL>http://www.bing.com/</homepageURL>
+ <id>firefoxmsn.full@microsoft.com</id>
+ <name>Bing Search for Firefox</name>
+ <version>1.0</version>
+
+ <bootstrap>true</bootstrap>
+ <type>2</type>
+
+ <targetApplication>
+ <r:Description>
+ <id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</id>
+ <minVersion>4.0</minVersion>
+ <maxVersion>18.0</maxVersion>
+ </r:Description>
+ </targetApplication>
+ </r:Description>
+</r:RDF>
View
87 partners/msn-canada/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
@@ -0,0 +1,87 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Bing Search for Firefox Helper Functions.
+ *
+ * The Initial Developer of the Original Code is The Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2011
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Edward Lee <edilee@mozilla.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+"use strict";
+
+const HOME_SEARCH = JSON.stringify({
+ name: "Bing",
+ searchUrl: "http://www.bing.com/search?form=MOZMPB&pc=MOZM&q=_searchTerms_",
+ image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAAAZCAYAAACM9limAAAC7mlDQ1BJQ0MgUHJvZmlsZQAAeAGFVM9rE0EU%2FjZuqdAiCFprDrJ4kCJJWatoRdQ2%2FRFiawzbH7ZFkGQzSdZuNuvuJrWliOTi0SreRe2hB%2F%2BAHnrwZC9KhVpFKN6rKGKhFy3xzW5MtqXqwM5%2B8943731vdt8ADXLSNPWABOQNx1KiEWlsfEJq%2F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&pc=MOZM&q={searchTerms}";
+
+// Look through tabs in the browser to see if any match
+function findOpenTab(browser, checkTabAndURI) {
+ let foundTab;
+ Array.some(browser.tabs, function(tab) {
+ // Check if there's an existing page
+ try {
+ // Use an activate navigation if it's still loading
+ let {currentURI, webNavigation, __SS_data} = tab.linkedBrowser;
+ let channel = webNavigation.documentChannel;
+ if (channel != null)
+ currentURI = channel.originalURI
+
+ // Use the session restore entry if it's still restoring
+ if (currentURI.spec == "about:blank" && __SS_data != null)
+ currentURI = Services.io.newURI(__SS_data.entries[0].url, null, null);
+
+ // Short circuit now that we found it
+ if (checkTabAndURI(tab, currentURI)) {
+ foundTab = tab;
+ return true;
+ }
+ }
+ catch(ex) {}
+ });
+ return foundTab;
+}
+
+#// Get a MSN url with a partner code
+#function getMsnBase(path, from) {
+# return "http://msn.com/" + path + "?pc=MOZM&source=" +
+# platform + "-" + from;
+#}
View
274 partners/msn-canada/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
@@ -0,0 +1,274 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Home Dash Utility.
+ *
+ * The Initial Developer of the Original Code is The Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2011
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Edward Lee <edilee@mozilla.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+"use strict";
+
+/**
+ * Get a localized string with string replacement arguments filled in and
+ * correct plural form picked if necessary.
+ *
+ * @note: Initialize the strings to use with getString.init(addon).
+ *
+ * @usage getString(name): Get the localized string for the given name.
+ * @param [string] name: Corresponding string name in the properties file.
+ * @return [string]: Localized string for the string name.
+ *
+ * @usage getString(name, arg): Replace %S references in the localized string.
+ * @param [string] name: Corresponding string name in the properties file.
+ * @param [any] arg: Value to insert for instances of %S.
+ * @return [string]: Localized string with %S references replaced.
+ *
+ * @usage getString(name, args): Replace %1$S references in localized string.
+ * @param [string] name: Corresponding string name in the properties file.
+ * @param [array of any] args: Array of values to replace references like %1$S.
+ * @return [string]: Localized string with %N$S references replaced.
+ *
+ * @usage getString(name, args, plural): Pick the correct plural form.
+ * @param [string] name: Corresponding string name in the properties file.
+ * @param [array of any] args: Array of values to replace references like %1$S.
+ * @param [number] plural: Number to decide what plural form to use.
+ * @return [string]: Localized string of the correct plural form.
+ */
+function getString(name, args, plural) {
+ // Use the cached bundle to retrieve the string
+ let str;
+ try {
+ str = getString.bundle.GetStringFromName(name);
+ }
+ // Use the fallback in-case the string isn't localized
+ catch(ex) {
+ str = getString.fallback.GetStringFromName(name);
+ }
+
+ // Pick out the correct plural form if necessary
+ if (plural != null)
+ str = getString.plural(plural, str);
+
+ // Fill in the arguments if necessary
+ if (args != null) {
+ // Convert a string or something not array-like to an array
+ if (typeof args == "string" || args.length == null)
+ args = [args];
+
+ // Assume %S refers to the first argument
+ str = str.replace(/%s/gi, args[0]);
+
+ // Replace instances of %N$S where N is a 1-based number
+ Array.forEach(args, function(replacement, index) {
+ str = str.replace(RegExp("%" + (index + 1) + "\\$S", "gi"), replacement);
+ });
+ }
+
+ return str;
+}
+
+/**
+ * Initialize getString() for the provided add-on.
+ *
+ * @usage getString.init(addon): Load properties file for the add-on.
+ * @param [object] addon: Add-on object from AddonManager
+ *
+ * @usage getString.init(addon, getAlternate): Load properties with alternate.
+ * @param [object] addon: Add-on object from AddonManager
+ * @param [function] getAlternate: Convert a locale to an alternate locale
+ */
+getString.init = function(addon, getAlternate) {
+ // Set a default get alternate function if it doesn't exist
+ if (typeof getAlternate != "function")
+ getAlternate = function() "en-US";
+
+ // Get the bundled properties file for the app's locale
+ function getBundle(locale) {
+ let propertyPath = "locales/" + locale + ".properties";
+ let propertyFile = addon.getResourceURI(propertyPath);
+
+ // Get a bundle and test if it's able to do simple things
+ try {
+ // Avoid caching issues by always getting a new file
+ let uniqueFileSpec = propertyFile.spec + "#" + Math.random();
+ let bundle = Services.strings.createBundle(uniqueFileSpec);
+ bundle.getSimpleEnumeration();
+ return bundle;
+ }
+ catch(ex) {}
+
+ // The locale must not exist, so give nothing
+ return null;
+ }
+
+ // Use the current locale or the alternate as the primary bundle
+ let locale = Cc["@mozilla.org/chrome/chrome-registry;1"].
+ getService(Ci.nsIXULChromeRegistry).getSelectedLocale("global");
+ getString.bundle = getBundle(locale) || getBundle(getAlternate(locale));
+
+ // Create a fallback in-case a string is missing
+ getString.fallback = getBundle("en-US");
+
+ // Get the appropriate plural form getter
+ Cu.import("resource://gre/modules/PluralForm.jsm");
+ let rule = getString("pluralRule");
+ [getString.plural] = PluralForm.makeGetter(rule);
+}
+
+/**
+ * Helper that adds event listeners and remembers to remove on unload
+ */
+function listen(window, node, event, func, capture) {
+ // Default to use capture
+ if (capture == null)
+ capture = true;
+
+ node.addEventListener(event, func, capture);
+ function undoListen() {
+ node.removeEventListener(event, func, capture);
+ }
+
+ // Undo the listener on unload and provide a way to undo everything
+ let undoUnload = unload(undoListen, window);
+ return function() {
+ undoListen();
+ undoUnload();
+ };
+}
+
+/**
+ * Save callbacks to run when unloading. Optionally scope the callback to a
+ * container, e.g., window. Provide a way to run all the callbacks.
+ *
+ * @usage unload(): Run all callbacks and release them.
+ *
+ * @usage unload(callback): Add a callback to run on unload.
+ * @param [function] callback: 0-parameter function to call on unload.
+ * @return [function]: A 0-parameter function that undoes adding the callback.
+ *
+ * @usage unload(callback, container) Add a scoped callback to run on unload.
+ * @param [function] callback: 0-parameter function to call on unload.
+ * @param [node] container: Remove the callback when this container unloads.
+ * @return [function]: A 0-parameter function that undoes adding the callback.
+ */
+function unload(callback, container) {
+ // Initialize the array of unloaders on the first usage
+ let unloaders = unload.unloaders;
+ if (unloaders == null)
+ unloaders = unload.unloaders = [];
+
+ // Calling with no arguments runs all the unloader callbacks
+ if (callback == null) {
+ unloaders.slice().forEach(function(unloader) unloader());
+ unloaders.length = 0;
+ return;
+ }
+
+ // The callback is bound to the lifetime of the container if we have one
+ if (container != null) {
+ // Remove the unloader when the container unloads
+ container.addEventListener("unload", removeUnloader, false);
+
+ // Wrap the callback to additionally remove the unload listener
+ let origCallback = callback;
+ callback = function() {
+ container.removeEventListener("unload", removeUnloader, false);
+ origCallback();
+ }
+ }
+
+ // Wrap the callback in a function that ignores failures
+ function unloader() {
+ try {
+ callback();
+ }
+ catch(ex) {}
+ }
+ unloaders.push(unloader);
+
+ // Provide a way to remove the unloader
+ function removeUnloader() {
+ let index = unloaders.indexOf(unloader);
+ if (index != -1)
+ unloaders.splice(index, 1);
+ }
+ return removeUnloader;
+}
+
+/**
+ * Apply a callback to each open and new browser windows.
+ *
+ * @usage watchWindows(callback): Apply a callback to each browser window.
+ * @param [function] callback: 1-parameter function that gets a browser window.
+ */
+function watchWindows(callback) {
+ // Wrap the callback in a function that ignores failures
+ function watcher(window) {
+ try {
+ // Now that the window has loaded, only handle browser windows
+ let {documentElement} = window.document;
+ if (documentElement.getAttribute("windowtype") == "navigator:browser")
+ callback(window);
+ }
+ catch(ex) {}
+ }
+
+ // Wait for the window to finish loading before running the callback
+ function runOnLoad(window) {
+ // Listen for one load event before checking the window type
+ window.addEventListener("load", function runOnce() {
+ window.removeEventListener("load", runOnce, false);
+ watcher(window);
+ }, false);
+ }
+
+ // Add functionality to existing windows
+ let windows = Services.wm.getEnumerator(null);
+ while (windows.hasMoreElements()) {
+ // Only run the watcher immediately if the window is completely loaded
+ let window = windows.getNext();
+ if (window.document.readyState == "complete")
+ watcher(window);
+ // Wait for the window to load before continuing
+ else
+ runOnLoad(window);
+ }
+
+ // Watch for new browser windows opening then wait for it to load
+ function windowWatcher(subject, topic) {
+ if (topic == "domwindowopened")
+ runOnLoad(subject);
+ }
+ Services.ww.registerNotification(windowWatcher);
+
+ // Make sure to stop watching for windows if we're unloading
+ unload(function() Services.ww.unregisterNotification(windowWatcher));
+}
View
17 partners/msn-canada/distribution/searchplugins/common/bing.xml
@@ -0,0 +1,17 @@
+<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
+ <ShortName>Bing</ShortName>
+ <Description>Bing. Search by Microsoft.</Description>
+ <InputEncoding>UTF-8</InputEncoding>
+ <Image width="16" height="16" type="image/x-icon">data:image/x-icon;base64,AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAAAAAABMLAAATCwAAAAAAAAAAAAAVpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8ysf97zf+24//F6f/F6f/F6f+K0/9QvP8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8krP+Z2P/////////w+f/F6f/F6f/i9P/////////T7v9Bt/8Vpv8Vpv8Vpv8Vpv/T7v/////w+f97zf8Vpv8Vpv8Vpv8Vpv9QvP/T7v/////w+f9Bt/8Vpv8Vpv97zf////////9QvP8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8krP/i9P/////i9P8Vpv8Vpv+24//////i9P8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv+K0/////////8Vpv8Vpv/F6f////////8krP8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv+n3v/////w+f8Vpv8Vpv/F6f////////+n3v8krP8Vpv8Vpv8Vpv8Vpv8Vpv9tx/////////+Z2P8Vpv8Vpv/F6f/////////////i9P+K0/9QvP9QvP9tx//F6f////////+n3v8Vpv8Vpv8Vpv/F6f/////T7v+Z2P/i9P////////////////////+24/9QvP8Vpv8Vpv8Vpv8Vpv/F6f/////F6f8Vpv8Vpv8krP9QvP9QvP9Bt/8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv/F6f/////F6f8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv9Bt/9QvP9Bt/8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8AAHBsAABhdAAAbiAAAHJ0AABsaQAAdGkAACBDAABlbgAAUEEAAEVYAAAuQwAAOy4AAEU7AABBVAAAQ00AAC5W</Image>
+ <Url type="application/x-suggestions+json" template="http://api.bing.com/osjson.aspx">
+ <Param name="query" value="{searchTerms}"/>
+ <Param name="form" value="MOZFSB"/>
+ <Param name="pc" value="MOZM"/>
+ </Url>
+ <Url type="text/html" method="GET" template="http://www.bing.com/search">
+ <Param name="q" value="{searchTerms}"/>
+ <Param name="form" value="MOZFSB"/>
+ <Param name="pc" value="MOZM"/>
+ </Url>
+ <SearchForm>http://www.bing.com/search</SearchForm>
+</SearchPlugin>
View
8 partners/msn-canada/repack.cfg
@@ -0,0 +1,8 @@
+aus="msncanada"
+dist_id="msncanada"
+dist_version="1.0"
+linux-i686=false
+locales="en-US"
+mac=true
+win32=true
+migrationWizardDisabled=true
View
BIN partners/msn-china/distribution/china-dist.tar
Binary file not shown.
View
58 partners/msn-china/distribution/distribution.ini
@@ -0,0 +1,58 @@
+# Partner Distribution Configuration File
+# Author: Mozilla for MSN-international
+# Date: 2012-08-20
+
+[Global]
+id=msncn
+version=1.0
+about=Mozilla Firefox with MSN China
+bookmarks.initialized.pref=cck.msncn.initialized
+
+[Preferences]
+app.distributor="msncn"
+app.distributor.channel=""
+app.partner.msnus="msncn"
+browser.search.distributionID="com.bing"
+mozilla.partner.id="msncn"
+_=Cu.import("resource://gre/modules/Services.jsm"); if (!Services.prefs.prefHasUserValue("extensions.installedDistroAddon.firefoxmsn.full@microsoft.com")) { Services.prefs.clearUserPref("extensions.lastAppVersion"); Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci.nsIAppStartup).quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart); } throw {};
+lightweightThemes.isThemeSelected=true
+lightweightThemes.persisted.footerURL=false
+lightweightThemes.persisted.headerURL=false
+lightweightThemes.usedThemes="[{\"id\":\"486203\",\"name\":\"MSN - blue\",\"headerURL\":\"http://getpersonas-cdn.mozilla.net/static/0/3/486203/Fader_blue_diagnol_header.jpg.jpg?1351246567\",\"footerURL\":\"http://getpersonas-cdn.mozilla.net/static/0/3/486203/Fader_blue_diagonal_footer.jpg.jpg?1351246567\",\"textcolor\":\"#000000\",\"accentcolor\":\"#c9c9c9\",\"iconURL\":\"http://getpersonas-cdn.mozilla.net/static/0/3/486203/preview_small.jpg?1351246567\",\"previewURL\":\"http://getpersonas-cdn.mozilla.net/static/0/3/486203/preview.jpg?1351246567\",\"author\":\"MSNthemes\",\"description\":\"Blue MSN theme.\",\"updateURL\":\"https://www.getpersonas.com/en-US/update_check/486203\",\"version\":\"1351246567\",\"updateDate\":1351258263886,\"installDate\":1351258263886}]"
+
+[LocalizablePreferences]
+browser.search.defaultenginename="Bing"
+browser.search.order.1="Bing"
+browser.search.order.2="Google"
+browser.search.order.3="Yahoo"
+browser.startup.homepage="http://cn.msn.com/?ocid=MSNFF"
+browser.startup.homepage_reset="http://cn.msn.com/?ocid=MSNFF"
+keyword.URL="http://www.bing.com/search?q=&form=MOZFLB&pc=MOZM"
+
+[BookmarksMenu]
+item.1.title=MSN中文网
+item.1.link=http://cn.msn.com/?ocid=MSNFF
+item.2.title=MSN文娱
+item.2.link=http://ent.msn.com.cn/?ocid=MSNFF
+item.3.title=MSN时尚
+item.3.link=http://fashion.msn.com.cn/?ocid=MSNFF
+item.4.title=MSN奢侈品
+item.4.link=http://luxury.msn.com.cn/?ocid=MSNFF
+item.5.title=MSN汽车
+item.5.link=http://auto.msn.com.cn/?ocid=MSNFF
+item.6.title=MSN理�
+item.6.link=http://money.msn.com.cn/?ocid=MSNFF
+
+[BookmarksToolbar]
+item.1.title=MSN中?~V~G?~Q
+item.1.link=http://cn.msn.com/?ocid=MSNFF
+item.2.title=MSN?~V~G娱
+item.2.link=http://ent.msn.com.cn/?ocid=MSNFF
+item.3.title=MSN?~W??~Z
+item.3.link=http://fashion.msn.com.cn/?ocid=MSNFF
+item.4.title=MSN奢?~H?~S~A
+item.4.link=http://luxury.msn.com.cn/?ocid=MSNFF
+item.5.title=MSN汽车
+item.5.link=http://auto.msn.com.cn/?ocid=MSNFF
+item.6.title=MSN?~P~F财
+item.6.link=http://money.msn.com.cn/?ocid=MSNFF
View
BIN partners/msn-china/distribution/extensions/firefoxmsn.full@microsoft.com/.bootstrap.js.swp
Binary file not shown.
View
212 partners/msn-china/distribution/extensions/firefoxmsn.full@microsoft.com/bootstrap.js
@@ -0,0 +1,212 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Bing Search for Firefox.
+ *
+ * The Initial Developer of the Original Code is The Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2011
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Edward Lee <edilee@mozilla.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+"use strict";
+const global = this;
+
+const {classes: Cc, interfaces: Ci, manager: Cm, utils: Cu} = Components;
+Cu.import("resource://gre/modules/AddonManager.jsm");
+Cu.import("resource://gre/modules/Services.jsm");
+Cu.import("resource://gre/modules/XPCOMUtils.jsm");
+
+// Remember if we were just installed
+let justInstalled = false;
+
+// Remember if we're on Firefox or Fennec
+let platform = Services.appinfo.name == "Firefox" ? "desktop" : "mobile";
+
+// Add a default search engine and move it to the right place
+function addSearchEngine() {
+ // Hide any existing custom searches
+ let origEngine = Services.search.getEngineByName(SEARCH_NAME);
+ if (origEngine != null) {
+ origEngine.hidden = true;
+ unload(function() origEngine.hidden = false);
+ }
+
+ // Add the special search engine if necessary
+ let engineName = SEARCH_NAME + " ";
+ try {
+ Services.search.addEngineWithDetails(engineName, SEARCH_ICON, "", "",
+ "GET", SEARCH_URL);
+ }
+ catch(ex) {}
+
+ // Get the just-added or existing engine
+ let engine = Services.search.getEngineByName(engineName);
+ if (engine == null)
+ return;
+
+ // Move it to the desired position
+ Services.search.moveEngine(engine, SEARCH_POSITION);
+
+ // Switch to the engine by default if it's first
+ if (SEARCH_POSITION == 0 && justInstalled)
+ Services.search.currentEngine = engine;
+
+ // Clean up when disabling
+ unload(function() Services.search.removeEngine(engine));
+}
+
+// Customize the default prefs
+function setPref(pref, value) {
+ let branch = Services.prefs.getBranch("");
+ branch.setCharPref(pref, value);
+}
+
+// Make sure the window has an app tab set to MSN
+function ensureMsnAppTab(window) {
+ // Only bother if we were just installed and support app tabs
+ if (!justInstalled || platform != "desktop")
+ return;
+
+ // Try again after a short delay if session store is initializing
+ let {__SSi, __SS_restoreID, gBrowser, setTimeout} = window;
+ if (__SSi == null || __SS_restoreID != null) {
+ setTimeout(function() ensureMsnAppTab(window), 1000);
+ return;
+ }
+
+ // Figure out if we already have a pinned MSN
+ let msnTab = findOpenTab(gBrowser, function(tab, URI) {
+ return tab.pinned && URI.host == "msn.com";
+ });
+
+ // Always remove the MSN tab when uninstalling
+ unload(function() gBrowser.removeTab(msnTab));
+
+ // No need to add!
+ if (msnTab != null)
+ return;
+
+ // Add the tab and pin it as the last app tab
+ msnTab = gBrowser.addTab(getMsnBase("", "apptab"));
+ gBrowser.pinTab(msnTab);
+}
+
+// Open a new tab for the landing page and select it
+function showLandingPage(window) {
+ // Only bother if we were just installed and haven't shown yet
+ if (!justInstalled || showLandingPage.shown)
+ return;
+
+ // Do the appropriate thing on each platform
+ if (platform == "desktop") {
+ // Try again after a short delay if session store is initializing
+ let {__SSi, __SS_restoreID, gBrowser, setTimeout} = window;
+ if (__SSi == null || __SS_restoreID != null) {
+ setTimeout(function() showLandingPage(window), 1000);
+ return;
+ }
+
+ // Figure out if we already have a landing page
+ let landingTab = findOpenTab(gBrowser, function(tab, URI) {
+ return URI.spec == LANDING_PAGE;
+ });
+
+ // Always remove the landing page when uninstalling
+ unload(function() gBrowser.removeTab(landingTab));
+
+ // Add the landing page if not open yet
+ if (landingTab == null)
+ landingTab = gBrowser.loadOneTab(LANDING_PAGE);
+
+ // Make sure it's focused
+ gBrowser.selectedTab = landingTab;
+ }
+ else {
+ let {BrowserUI} = window;
+ let tab = BrowserUI.newTab(LANDING_PAGE);
+ unload(function() BrowserUI.closeTab(tab));
+ }
+
+ // Only show the landing page once
+ showLandingPage.shown = true;
+}
+
+/**
+ * Handle the add-on being activated on install/enable
+ */
+function startup({id}, reason) AddonManager.getAddonByID(id, function(addon) {
+ // Load various javascript includes for helper functions
+ ["helper", "utils"].forEach(function(fileName) {
+ let fileURI = addon.getResourceURI("scripts/" + fileName + ".js");
+ Services.scriptloader.loadSubScript(fileURI.spec, global);
+ });
+
+ // Add custom search support to the browser
+ addSearchEngine();
+
+ // Change some prefs to custom search on install
+ if (justInstalled) {
+ setPref(PREF_KEYWORD, SEARCH_KEYWORD_URL);
+ setPref(PREF_HOME, SEARCH_HOME_URL);
+ setPref(PREF_HOME_RESET, SEARCH_HOME_URL);
+ }
+
+ // Add an MSN app tab
+ watchWindows(ensureMsnAppTab);
+
+ // Open the landing page
+ watchWindows(showLandingPage);
+
+ // We're no longer just installed after we get some windows loaded
+ watchWindows(function(window) {
+ if (justInstalled)
+ window.setTimeout(function() justInstalled = false, 5000);
+ });
+})
+
+/**
+ * Handle the add-on being deactivated on uninstall/disable
+ */
+function shutdown(data, reason) {
+ // Clean up with unloaders when we're deactivating
+ if (reason != APP_SHUTDOWN)
+ unload();
+}
+
+/**
+ * Handle the add-on being installed
+ */
+function install(data, reason) {
+ justInstalled = reason == ADDON_INSTALL;
+}
+
+/**
+ * Handle the add-on being uninstalled
+ */
+function uninstall(data, reason) {}
View
BIN partners/msn-china/distribution/extensions/firefoxmsn.full@microsoft.com/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
23 partners/msn-china/distribution/extensions/firefoxmsn.full@microsoft.com/install.rdf
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<r:RDF xmlns="http://www.mozilla.org/2004/em-rdf#"
+ xmlns:r="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <r:Description about="urn:mozilla:install-manifest">
+ <creator>Bing</creator>
+ <description>Search the web with Bing.</description>
+ <homepageURL>http://www.bing.com/</homepageURL>
+ <id>firefoxmsn.full@microsoft.com</id>
+ <name>Bing Search for Firefox</name>
+ <version>1.0</version>
+
+ <bootstrap>true</bootstrap>
+ <type>2</type>
+
+ <targetApplication>
+ <r:Description>
+ <id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</id>
+ <minVersion>4.0</minVersion>
+ <maxVersion>18.0</maxVersion>
+ </r:Description>
+ </targetApplication>
+ </r:Description>
+</r:RDF>
View
87 partners/msn-china/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/helper.js
@@ -0,0 +1,87 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Bing Search for Firefox Helper Functions.
+ *
+ * The Initial Developer of the Original Code is The Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2011
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Edward Lee <edilee@mozilla.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+"use strict";
+
+const HOME_SEARCH = JSON.stringify({
+ name: "Bing",
+ searchUrl: "http://www.bing.com/search?form=MOZMPB&pc=MOZM&q=_searchTerms_",
+ image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAAAZCAYAAACM9limAAAC7mlDQ1BJQ0MgUHJvZmlsZQAAeAGFVM9rE0EU%2FjZuqdAiCFprDrJ4kCJJWatoRdQ2%2FRFiawzbH7ZFkGQzSdZuNuvuJrWliOTi0SreRe2hB%2F%2BAHnrwZC9KhVpFKN6rKGKhFy3xzW5MtqXqwM5%2B8943731vdt8ADXLSNPWABOQNx1KiEWlsfEJq%2FIgAjqIJQTQlVdvsTiQGQYNz%2BXvn2HoPgVtWw3v7d7J3rZrStpoHhP1A4Eea2Sqw7xdxClkSAog836Epx3QI3%2BPY8uyPOU55eMG1Dys9xFkifEA1Lc5%2FTbhTzSXTQINIOJT1cVI%2BnNeLlNcdB2luZsbIEL1PkKa7zO6rYqGcTvYOkL2d9H5Os94%2BwiHCCxmtP0a4jZ71jNU%2F4mHhpObEhj0cGDX0%2BGAVtxqp%2BDXCFF8QTSeiVHHZLg3xmK79VvJKgnCQOMpkYYBzWkhP10xu%2BLqHBX0m1xOv4ndWUeF5jxNn3tTd70XaAq8wDh0MGgyaDUhQEEUEYZiwUECGPBoxNLJyPyOrBhuTezJ1JGq7dGJEsUF7Ntw9t1Gk3Tz%2BKCJxlEO1CJL8Qf4qr8lP5Xn5y1yw2Fb3lK2bmrry4DvF5Zm5Gh7X08jjc01efJXUdpNXR5aseXq8muwaP%2BxXl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z5NTgfdlSu7dV84flx5gVAZ8hickwAKV5Nluf8Rx8zXzswOxvka35yADQTJgnmaeTvxoPyPyY%2FMs2cC7wrv2Q%2B95n7De%2BpXDP1begEbYbho%2FkrwQePqVD64GUfzbdVzT03o44uR8XhXuM9HCwfYEnNuYg76tq4nvp8%2Bfaw1C%2Btdysbes5Do7gLy2yEkoX8eTv2PXp8KJ0QuY8iJHkl4C4jVnjBzYAClTmHrranKtVV%2F%2B2Z5Xfq86Vf3di9DF3NNpTsMEBB8Ui%2FWJ4NbTY6Tn3zDTT%2B2HoMhzvCWE1%2B9NosnCjKJQByx19Gct%2BstdqNjn4M51ckZPskKNqIjPZ1AFISVMaxXcp140M74gfMOQpHm0In%2BNgCw0rkjy2LGrtrUDLvRdf0RRkpqyB8cMPHNv4QxvnPQr%2BF4o7Tf2YYPaz7JtZtGhpe8Atz4sanlbn%2Bq%2BhjDYwBp6A5q1779FLlu5fiFH8ByuoZ6LxtRBluGt9G5auYewXNxPP4v7N0AOzcoPC7%2FwBfh%2BUgcZXzvgAAAABJRU5ErkJggg%3D%3D",
+});
+const LANDING_PAGE = "http://cn.msn.com/?ocid=MSNFF";
+const PREF_HOME = "browser.startup.homepage";
+const PREF_HOME_RESET = "browser.startup.homepage_reset";
+const PREF_KEYWORD = "keyword.URL";
+const SEARCH_DOMAIN = "www.bing.com";
+const SEARCH_ICON = "data:image/x-icon;base64,AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAAAAAABMLAAATCwAAAAAAAAAAAAAVpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8ysf97zf%2B24%2F%2FF6f%2FF6f%2FF6f%2BK0%2F9QvP8Vpv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2F%2F%2FF6f8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv9Bt%2F9QvP9Bt%2F8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8AAHBsAABhdAAAbiAAAHJ0AABsaQAAdGkAACBDAABlbgAAUEEAAEVYAAAuQwAAOy4AAEU7AABBVAAAQ00AAC5W";
+const SEARCH_HOME_URL = "http://cn.msn.com/?ocid=MSNFF";
+const SEARCH_KEYWORD_URL = "http://www.bing.com/search?form=MOZMLB&pc=MOZM&q=";
+const SEARCH_NAME = "Bing";
+const SEARCH_POSITION = 0;
+const SEARCH_URL = "http://www.bing.com/search?form=MOZMSB&pc=MOZM&q={searchTerms}";
+
+// Look through tabs in the browser to see if any match
+function findOpenTab(browser, checkTabAndURI) {
+ let foundTab;
+ Array.some(browser.tabs, function(tab) {
+ // Check if there's an existing page
+ try {
+ // Use an activate navigation if it's still loading
+ let {currentURI, webNavigation, __SS_data} = tab.linkedBrowser;
+ let channel = webNavigation.documentChannel;
+ if (channel != null)
+ currentURI = channel.originalURI
+
+ // Use the session restore entry if it's still restoring
+ if (currentURI.spec == "about:blank" && __SS_data != null)
+ currentURI = Services.io.newURI(__SS_data.entries[0].url, null, null);
+
+ // Short circuit now that we found it
+ if (checkTabAndURI(tab, currentURI)) {
+ foundTab = tab;
+ return true;
+ }
+ }
+ catch(ex) {}
+ });
+ return foundTab;
+}
+
+#// Get a MSN url with a partner code
+#function getMsnBase(path, from) {
+# return "http://msn.com/" + path + "?pc=MOZM&source=" +
+# platform + "-" + from;
+#}
View
274 partners/msn-china/distribution/extensions/firefoxmsn.full@microsoft.com/scripts/utils.js
@@ -0,0 +1,274 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Home Dash Utility.
+ *
+ * The Initial Developer of the Original Code is The Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2011
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Edward Lee <edilee@mozilla.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or