| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * This file is part of the Adblock Plus, | 2 * This file is part of the Adblock Plus, |
| 3 * Copyright (C) 2006-2012 Eyeo GmbH | 3 * Copyright (C) 2006-2012 Eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1316 textElement.abpInitialized = true; | 1316 textElement.abpInitialized = true; |
| 1317 } | 1317 } |
| 1318 | 1318 |
| 1319 function updateTypeWarningOverride() | 1319 function updateTypeWarningOverride() |
| 1320 { | 1320 { |
| 1321 document.documentElement.canAdvance = E("typeWarningOverride").checked; | 1321 document.documentElement.canAdvance = E("typeWarningOverride").checked; |
| 1322 } | 1322 } |
| 1323 | 1323 |
| 1324 function initScreenshotPage() | 1324 function initScreenshotPage() |
| 1325 { | 1325 { |
| 1326 document.documentElement.canAdvance = true; | |
|
Wladimir Palant
2012/11/22 14:16:29
I am mostly sure that canAdvance = true is set aut
Andrey Novikov
2012/11/22 14:44:15
It stays disabled in my case when I press Back on
| |
| 1327 | |
| 1326 E("progressBar").activeItem = E("screenshotHeader"); | 1328 E("progressBar").activeItem = E("screenshotHeader"); |
| 1327 } | 1329 } |
| 1328 | 1330 |
| 1329 function initCommentPage() | 1331 function initCommentPage() |
| 1330 { | 1332 { |
| 1333 document.documentElement.canAdvance = false; | |
| 1334 | |
| 1331 E("progressBar").activeItem = E("commentPageHeader"); | 1335 E("progressBar").activeItem = E("commentPageHeader"); |
| 1332 | 1336 |
| 1337 updateEmail(); | |
|
Wladimir Palant
2012/11/22 14:16:29
This will already set the canAdvance property, I d
Andrey Novikov
2012/11/22 14:44:15
Done.
| |
| 1338 | |
| 1333 screenshotDataSource.exportData(); | 1339 screenshotDataSource.exportData(); |
| 1334 updateDataField(); | 1340 updateDataField(); |
| 1335 } | 1341 } |
| 1336 | 1342 |
| 1337 function showDataField() | 1343 function showDataField() |
| 1338 { | 1344 { |
| 1339 E('dataDeck').selectedIndex = 1; | 1345 E('dataDeck').selectedIndex = 1; |
| 1340 updateDataField(); | 1346 updateDataField(); |
| 1341 E('data').focus(); | 1347 E('data').focus(); |
| 1342 } | 1348 } |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 1372 | 1378 |
| 1373 let value = E("comment").value; | 1379 let value = E("comment").value; |
| 1374 appendElement(reportData.documentElement, "comment", null, value.substr(0, 100 0)); | 1380 appendElement(reportData.documentElement, "comment", null, value.substr(0, 100 0)); |
| 1375 E("commentLengthWarning").setAttribute("visible", value.length > 1000); | 1381 E("commentLengthWarning").setAttribute("visible", value.length > 1000); |
| 1376 updateDataField(); | 1382 updateDataField(); |
| 1377 } | 1383 } |
| 1378 | 1384 |
| 1379 function updateEmail() | 1385 function updateEmail() |
| 1380 { | 1386 { |
| 1381 removeReportElement("email"); | 1387 removeReportElement("email"); |
| 1382 appendElement(reportData.documentElement, "email", null, E("email").value.repl ace(/\@/g, " at ").replace(/\./g, " dot ")); | 1388 |
| 1389 let value = E("email").value; | |
| 1390 E("email").setAttribute("value", value); // https://bugzilla.mozilla.org/show_ bug.cgi?id=111486 | |
|
Wladimir Palant
2012/11/22 14:16:29
Please add a proper comment - the bug link is addi
Andrey Novikov
2012/11/22 14:44:15
Done.
| |
| 1391 appendElement(reportData.documentElement, "email", null, value); | |
| 1383 updateDataField(); | 1392 updateDataField(); |
| 1393 | |
| 1394 document.documentElement.canAdvance = /\S/.test(value); | |
| 1395 } | |
| 1396 | |
| 1397 function updateAnonymity(anonymous) | |
| 1398 { | |
| 1399 if (anonymous) | |
| 1400 { | |
| 1401 E("email").value = ""; | |
| 1402 updateEmail(); | |
| 1403 } | |
| 1404 E("email").disabled = anonymous; | |
| 1405 E("emailLabel").disabled = anonymous; | |
|
Wladimir Palant
2012/11/22 14:16:29
I don't think we ever disable labels.
Andrey Novikov
2012/11/22 14:44:15
It looks much more user friendly in UI, have a try
| |
| 1406 E("anonymityWarning").setAttribute("visible", anonymous); | |
| 1407 | |
| 1408 document.documentElement.canAdvance = anonymous; | |
| 1384 } | 1409 } |
|
Wladimir Palant
2012/11/22 14:16:29
The interaction of these two functions is pretty c
Andrey Novikov
2012/11/22 14:44:15
It sends empty value in that case. Redesigned it.
| |
| 1385 | 1410 |
| 1386 function updateExtensions(attach) | 1411 function updateExtensions(attach) |
| 1387 { | 1412 { |
| 1388 extensionsDataSource.exportData(attach); | 1413 extensionsDataSource.exportData(attach); |
| 1389 updateDataField(); | 1414 updateDataField(); |
| 1390 } | 1415 } |
| 1391 | 1416 |
| 1392 function initSendPage() | 1417 function initSendPage() |
| 1393 { | 1418 { |
| 1394 E("progressBar").activeItem = E("sendPageHeader"); | 1419 E("progressBar").activeItem = E("sendPageHeader"); |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1539 | 1564 |
| 1540 function censorURL(url) | 1565 function censorURL(url) |
| 1541 { | 1566 { |
| 1542 return url.replace(/([?;&\/#][^?;&\/#]+?=)[^?;&\/#]+/g, "$1*"); | 1567 return url.replace(/([?;&\/#][^?;&\/#]+?=)[^?;&\/#]+/g, "$1*"); |
| 1543 } | 1568 } |
| 1544 | 1569 |
| 1545 function encodeHTML(str) | 1570 function encodeHTML(str) |
| 1546 { | 1571 { |
| 1547 return str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"). replace(/"/g, """); | 1572 return str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"). replace(/"/g, """); |
| 1548 } | 1573 } |
| OLD | NEW |