зеркало из https://github.com/mozilla/pjs.git
Add support for Developer Center
This commit is contained in:
Родитель
b9eebc2032
Коммит
7d8c7de461
|
@ -52,6 +52,7 @@ my %product_destination_map = (
|
|||
"Sunbird" => "mozilla.feedback",
|
||||
"Camino" => "caminofeedback\@mozilla.org",
|
||||
"eBay Companion" => "mozilla.feedback.companion.ebay",
|
||||
"Developer Center" => "mozilla.dev.mdc.feedback",
|
||||
"Other" => "mozilla.feedback"
|
||||
);
|
||||
|
||||
|
@ -60,7 +61,7 @@ my @products_list = (
|
|||
"Firefox", "Firefox Release Candidate", "Thunderbird",
|
||||
"Thunderbird Release Candidate", "Gran Paradiso", "Minefield",
|
||||
"Camino", "SeaMonkey", "Mozilla Suite", "Sunbird",
|
||||
"Other"
|
||||
"Developer Center", "Other"
|
||||
);
|
||||
|
||||
# The default newsgroup if the product isn't in the above map (NNTP only)
|
||||
|
|
|
@ -51,16 +51,23 @@ function browserDetect() {
|
|||
{ regexp: /GranParadiso/, product: "Gran Paradiso" },
|
||||
];
|
||||
|
||||
for (var i = 0; i < matches.length; i++) {
|
||||
if (userAgent.match(matches[i]["regexp"])) {
|
||||
var prod = document.getElementById("product");
|
||||
for (var j = 0; j < prod.options.length; j++) {
|
||||
if (prod.options[j].text == matches[i].product) {
|
||||
prod.selectedIndex = j;
|
||||
}
|
||||
var defaultProduct = "[% form.product FILTER remove('"') %]";
|
||||
|
||||
if (!defaultProduct) {
|
||||
for (var i = 0; i < matches.length; i++) {
|
||||
if (userAgent.match(matches[i]["regexp"])) {
|
||||
defaultProduct = matches[i].product;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (defaultProduct) {
|
||||
var prod = document.getElementById("product");
|
||||
for (var j = 0; j < prod.options.length; j++) {
|
||||
if (prod.options[j].text == defaultProduct) {
|
||||
prod.selectedIndex = j;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче