Bug 916205 - Add and package UA override list; r=fabrice r=glandium

This commit is contained in:
Jim Chen 2013-09-18 10:57:08 -04:00
parent 2d263a8ebc
commit edfdc92c0a
4 changed files with 292 additions and 0 deletions

View File

@ -66,6 +66,16 @@ WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
endif
endif #LIBXUL_SDK
UA_UPDATE_FILE = ua-update.json
$(UA_UPDATE_FILE): % : %.in
# strip out comment lines, which are not valid in JSON
sed -e "/^ *\\/\\//d" -e "/^ *$$/d" $^ > $@
UA_UPDATE_FILES = $(UA_UPDATE_FILE)
UA_UPDATE_DEST = $(FINAL_TARGET)
INSTALL_TARGETS += UA_UPDATE
# Make sure the standalone glue doesn't try to get libxpcom.so from b2g/app.
NSDISTMODE = copy

View File

@ -729,6 +729,11 @@ pref("memory_info_dumper.watch_fifo.enabled", true);
pref("memory_info_dumper.watch_fifo.directory", "/data/local");
pref("general.useragent.enable_overrides", true);
// See ua-update.json.in for the packaged UA override list
pref("general.useragent.updates.enabled", true);
pref("general.useragent.updates.url", "");
pref("general.useragent.updates.interval", 604800); // 1 week
pref("general.useragent.updates.retry", 86400); // 1 day
// Make <audio> and <video> talk to the AudioChannelService.
pref("media.useAudioChannelService", true);

276
b2g/app/ua-update.json.in Normal file
View File

@ -0,0 +1,276 @@
// Comments must be on their own lines and must start with "//"
// Send these sites a custom user-agent. Bugs to remove each override after
// evangelism are included.
{
// bug 802981, maps.google.com
"maps.google.com": "\\(Mobile#(Android; Mobile",
// bug 826330, uol.com.br
"uol.com.br": "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19",
// bug 826332, live.com
"live.com": "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19",
// bug 826335, globo.com
"globo.com": "\\(Mobile#(Android; Mobile",
// bug 826338, yahoo.com
"yahoo.com": "\\(Mobile#(Android; Mobile",
// bug 826342, mercadolivre.com.br
"mercadolivre.com.br": "\\(Mobile#(Android; Mobile",
// bug 826343, ig.com.br
"ig.com.br": "\\(Mobile#(Android; Mobile",
// bug 826344, abril.com.br
"abril.com.br": "\\(Mobile#(Android; Mobile",
// bug 826347, msn.com
"msn.com": "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19",
// bug 826348, linkedin.com
"linkedin.com": "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19",
// bug 826353, itau.com.br
"itau.com.br": "\\(Mobile#(Android; Mobile",
// bug 826504, orkut.com.br
"orkut.com.br": "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19",
// bug 826510, r7.com
"r7.com": "\\(Mobile#(Android; Mobile",
// bug 826514, estadao.com.br
"estadao.com.br": "\\(Mobile#(Android; Mobile",
// bug 826517, letras.mus.br
"letras.mus.br": "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19",
// bug 826711, bb.com.br
"bb.com.br": "\\(Mobile#(Android; Mobile",
// bug 826712, orkut.com
"orkut.com": "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19",
// bug 826715, noticias.uol.com.br
"noticias.uol.com.br": "\\(Mobile#(Android; Mobile",
// bug 826720, olx.com.br
"olx.com.br": "\\(Mobile#(Android; Mobile",
// bug 826736, bancobrasil.com.br
"bancobrasil.com.br": "\\(Mobile#(Android; Mobile",
// bug 826845, techtudo.com.br
"techtudo.com.br": "\\(Mobile#(Android; Mobile",
// bug 826958, ebay.com
"ebay.com": "\\(Mobile#(Android; Mobile",
// bug 827622, bing.com
"bing.com": "\\(Mobile#(Android; Mobile",
// bug 827625, pagseguro.uol.com.br
"pagseguro.uol.com.br": "\\(Mobile#(Android; Mobile",
// bug 827626, magazineluiza.com.br
"magazineluiza.com.br": "\\(Mobile#(Android; Mobile",
// bug 827627, bol.uol.com.br
"bol.uol.com.br": "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19",
// bug 827628, groupon.com.br
"groupon.com.br": "\\(Mobile#(Android; Mobile",
// bug 827630, vagalume.com.br
"vagalume.com.br": "\\(Mobile#(Android; Mobile",
// bug 827631, climatempo.com.br
"climatempo.com.br": "\\(Mobile#(Android; Mobile",
// bug 827632, tecmundo.com.br
"tecmundo.com.br": "\\(Mobile#(Android; Mobile",
// bug 827633, hao123.com
"hao123.com": "\\(Mobile#(Android; Mobile",
// bug 827576, lancenet.com.br
"lancenet.com.br": "\\(Mobile#(Android; Mobile",
// bug 827573, webmotors.com.br
"webmotors.com.br": "\\(Mobile#(Android; Mobile",
// bug 827661, mercadolibre.com.co
"mercadolibre.com.co": "\\(Mobile#(Android; Mobile",
// bug 827664, elespectador.com
"elespectador.com": "\\(Mobile#(Android; Mobile",
// bug 827668, scribd.com
"scribd.com": "\\(Mobile#(Android; Mobile",
// bug 827670, elpais.com.co
"elpais.com.co": "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19",
// bug 827672, olx.com.co
"olx.com.co": "\\(Mobile#(Android; Mobile",
// bug 827674, avianca.com
"avianca.com": "\\(Mobile#(Android; Mobile",
// bug 827678, marca.com
"marca.com": "\\(Mobile#(Android; Mobile",
// bug 828354, gazeta.pl
"gazeta.pl": "\\(Mobile#(Android; Mobile",
// bug 828360, sport.pl
"sport.pl": "\\(Mobile#(Android; Mobile",
// bug 828364, nk.pl
"nk.pl": "\\(Mobile#(Android; Mobile",
// bug 828366, wyborcza.biz
"wyborcza.biz": "\\(Mobile#(Android; Mobile",
// bug 828369, money.pl
"money.pl": "\\(Mobile#(Android; Mobile",
// bug 828371, ingbank.pl
"ingbank.pl": "\\(Mobile#(Android; Mobile",
// bug 828376, plotek.pl
"plotek.pl": "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19",
// bug 828378, wyborcza.pl
"wyborcza.pl": "\\(Mobile#(Android; Mobile",
// bug 828380, deser.pl
"deser.pl": "\\(Mobile#(Android; Mobile",
// bug 828386, ebay.es
"ebay.es": "\\(Mobile#(Android; Mobile",
// bug 828392, infojobs.net
"infojobs.net": "\\(Mobile#(Android; Mobile",
// bug 828399, antena3.com
"antena3.com": "\\(Mobile#(Android; Mobile",
// bug 828401, ingdirect.es
"ingdirect.es": "\\(Mobile#(Android; Mobile",
// bug 828403, fotocasa.es
"fotocasa.es": "\\(Mobile#(Android; Mobile",
// bug 828406, orange.es
"orange.es": "\\(Mobile#(Android; Mobile",
// bug 828414, paginasamarillas.es
"paginasamarillas.es": "\\(Mobile#(Android; Mobile",
// bug 828416, loteriasyapuestas.es
"loteriasyapuestas.es": "\\(Mobile#(Android; Mobile",
// bug 828418, bbva.es
"bbva.es": "\\(Mobile#(Android; Mobile",
// bug 828422, publico.es
"publico.es": "\\(Mobile#(Android; Mobile",
// bug 828425, mercadolibre.com.ve
"mercadolibre.com.ve": "\\(Mobile#(Android; Mobile",
// bug 828433, olx.com.ve
"olx.com.ve": "\\(Mobile#(Android; Mobile",
// bug 828439, movistar.com.ve
"movistar.com.ve": "\\(Mobile#(Android; Mobile",
// bug 828445, bumeran.com.ve
"bumeran.com.ve": "\\(Mobile#(Android; Mobile",
// bug 828448, petardas.com
"petardas.com": "\\(Mobile#(Android; Mobile",
// bug 827869, mail.google.com
"mail.google.com": "\\(Mobile#(Android; Mobile",
// bug 843109, enfemenino.com
"enfemenino.com": "\\(Mobile#(Android; Mobile",
// bug 843112, movil.bankinter.es
"movil.bankinter.es": "\\(Mobile#(Android; Mobile",
// bug 843114, einforma.com
"einforma.com": "\\(Mobile#(Android; Mobile",
// bug 843116, wwwhatsnew.com
"wwwhatsnew.com": "\\(Mobile#(Android; Mobile",
// bug 843119, askthebuilder.com
"askthebuilder.com": "\\(Mobile#(Android; Mobile",
// bug 843121, tor.com
"tor.com": "\\(Mobile#(Android; Mobile",
// bug 843124, maruccisports.com
"maruccisports.com": "\\(Mobile#(Android; Mobile",
// bug 843126, es.playstation.com
"es.playstation.com": "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19",
// bug 843129, 11870.com
"11870.com": "\\(Mobile#(Android; Mobile",
// bug 843200, iphonejuegosgratis.com
"iphonejuegosgratis.com": "\\(Mobile#(Android; Mobile",
// bug 843132, comunio.es
"comunio.es": "\\(Mobile#(Android; Mobile",
// bug 843134, news.google.com
"news.google.com": "\\(Mobile#(Android; Mobile",
// bug 843136, deviantart.com
"deviantart.com": "\\(Mobile#(Android; Mobile",
// bug 843137, nytimes.com
"nytimes.com": "\\(Mobile#(Android; Mobile",
// bug 843139, consumersearch.com
"consumersearch.com": "\\(Mobile#(Android; Mobile",
// bug 843141, foodily.com
"foodily.com": "\\(Mobile#(Android; Mobile",
// bug 843197, icanhas.cheezburger.com
"icanhas.cheezburger.com": "\\(Mobile#(Android; Mobile",
// bug 843151, citibank.com
"citibank.com": "\\(Mobile#(Android; Mobile",
// bug 843153, games.com
"games.com": "\\(Mobile#(Android; Mobile",
// bug 843156, orbitz.com
"orbitz.com": "\\(Mobile#(Android; Mobile",
// bug 843158, starwoodhotels.com
"starwoodhotels.com": "\\(Mobile#(Android; Mobile",
// bug 843160, ehow.com
"ehow.com": "\\(Mobile#(Android; Mobile",
// bug 843162, urbanspoon.com
"urbanspoon.com": "\\(Mobile#(Android; Mobile",
// bug 843165, virginatlantic.com
"virginatlantic.com": "\\(Mobile#(Android; Mobile",
// bug 843168, cheaptickets.com
"cheaptickets.com": "\\(Mobile#(Android; Mobile",
// bug 843172, zimbio.com
"zimbio.com": "\\(Mobile#(Android; Mobile",
// bug 843176, tylted.com
"tylted.com": "\\(Mobile#(Android; Mobile",
// bug 843178, txt2nite.com
"txt2nite.com": "\\(Mobile#(Android; Mobile",
// bug 843181, slashgear.com
"slashgear.com": "\\(Mobile#(Android; Mobile",
// bug 843186, chevrolet.com
"chevrolet.com": "\\(Mobile#(Android; Mobile",
// bug 848854, deadline.com
"deadline.com": "\\(Mobile#(Android; Mobile",
// bug 866577, 3g.qq.com
"3g.qq.com": "\\(Mobile#(Android; Mobile",
// bug 878222, arukereso.hu
"arukereso.hu": "\\(Mobile#(Android; Mobile",
// bug 878228, blikk.hu
"blikk.hu": "\\(Mobile#(Android; Mobile",
// bug 878230, citromail.hu
"citromail.hu": "\\(Mobile#(Android; Mobile",
// bug 878232, hazipatika.com
"hazipatika.com": "\\(Mobile#(Android; Mobile",
// bug 878234, hvg.hu
"hvg.hu": "\\(Mobile#(Android; Mobile",
// bug 878236, jofogas.hu
"jofogas.hu": "\\(Mobile#(Android; Mobile",
// bug 878238, koponyeg.hu
"koponyeg.hu": "\\(Mobile#(Android; Mobile",
// bug 878240, kuruc.info
"kuruc.info": "\\(Mobile#(Android; Mobile",
// bug 878242, nemzetisport.hu
"nemzetisport.hu": "\\(Mobile#(Android; Mobile",
// bug 878244, nlcafe.hu
"nlcafe.hu": "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19",
// bug 878246, port.hu
"port.hu": "\\(Mobile#(Android; Mobile",
// bug 878249, portfolio.hu
"portfolio.hu": "\\(Mobile#(Android; Mobile",
// bug 878253, vatera.hu
"vatera.hu": "\\(Mobile#(Android; Mobile",
// bug 878255, 24sata.hr
"24sata.hr": "\\(Mobile#(Android; Mobile",
// bug 878256, bet365.com
"bet365.com": "\\(Mobile#(Android; Mobile",
// bug 878258, blackhatteam.com
"blackhatteam.com": "\\(Mobile#(Android; Mobile",
// bug 878260, cdm.me
"cdm.me": "\\(Mobile#(Android; Mobile",
// bug 878262, download.com
"download.com": "\\(Mobile#(Android; Mobile",
// bug 878264, haber.ba
"haber.ba": "\\(Mobile#(Android; Mobile",
// bug 878268, jutarnji.hr
"jutarnji.hr": "\\(Mobile#(Android; Mobile",
// bug 878271, kurir-info.rs
"kurir-info.rs": "\\(Mobile#(Android; Mobile",
// bug 878273, livescore.com
"livescore.com": "\\(Mobile#(Android; Mobile",
// bug 878275, mondo.rs
"mondo.rs": "\\(Mobile#(Android; Mobile",
// bug 878277, naslovi.net
"naslovi.net": "\\(Mobile#(Android; Mobile",
// bug 878284, softonic.com
"softonic.com": "\\(Mobile#(Android; Mobile",
// bug 878286, yandex.ru
"yandex.ru": "\\(Mobile#(Android; Mobile",
// bug 878630, ask.com
"ask.com": "\\(Mobile#(Android; Mobile",
// bug 878632, banorte.com
"banorte.com": "\\(Mobile#(Android; Mobile",
// bug 878634, buenastareas.com
"buenastareas.com": "\\(Mobile#(Android; Mobile",
// bug 878635, cnn.com
"cnn.com": "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19",
// bug 878637, eluniversal.com.mx
"eluniversal.com.mx": "\\(Mobile#(Android; Mobile",
// bug 878640, hootsuite.com
"hootsuite.com": "\\(Mobile#(Android; Mobile",
// bug 878642, mercadolibre.com.mx
"mercadolibre.com.mx": "\\(Mobile#(Android; Mobile",
// bug 878645, olx.com.mx
"olx.com.mx": "\\(Mobile#(Android; Mobile",
// bug 878647, sat.gob.mx
"sat.gob.mx": "\\(Mobile#(Android; Mobile",
// bug 878649, univision.com
"univision.com": "\\(Mobile#(Android; Mobile",
// bug 878653, redstarbelgrade.info
"redstarbelgrade.info": "\\(Mobile#(Android; Mobile",
// bug 878655, vesti-online.com
"vesti-online.com": "\\(Mobile#(Android; Mobile"
}

View File

@ -119,6 +119,7 @@
@BINPATH@/mozsqlt3@DLL_SUFFIX@
#endif
@BINPATH@/blocklist.xml
@BINPATH@/ua-update.json
#ifdef XP_UNIX
#ifndef XP_MACOSX
@BINPATH@/run-mozilla.sh