| Index: chrome/browser/resources/safe_browsing/malware_block_v2.js
|
| diff --git a/chrome/browser/resources/safe_browsing/malware_block_v2.js b/chrome/browser/resources/safe_browsing/malware_block_v2.js
|
| index 61550d9a1dbd4cfe99589b20aa6846396dad7e33..3fbb10f843b21583eb1c0521c0896ea7c8192067 100644
|
| --- a/chrome/browser/resources/safe_browsing/malware_block_v2.js
|
| +++ b/chrome/browser/resources/safe_browsing/malware_block_v2.js
|
| @@ -38,6 +38,45 @@ function seeMore() {
|
| }
|
| }
|
|
|
| +function setupFinch() {
|
| + var condition = $('trial-type').innerHTML;
|
| + if (condition == '') {
|
| + return; // This is the most common case.
|
| + } else if (condition == 'Cond2MalwareNoBrand' ||
|
| + condition == 'Cond4PhishingNoBrand') {
|
| + $('logo').style.display = 'none';
|
| + } else if (condition == 'Cond5MalwareOneStep' ||
|
| + condition == 'Cond6PhishingOneStep') {
|
| + $('see-more-contents').hidden = false;
|
| + $('see-less-text').hidden = true;
|
| + $('see-more-text').hidden = true;
|
| + } else if (condition == 'Cond7MalwareFearMsg') {
|
| + $('headline').innerText = 'Your computer might get malware if you ' +
|
| + 'proceed. Go back!';
|
| + } else if (condition == 'Cond8PhishingFearMsg') {
|
| + $('headline').innerText = 'You might be the victim of a phishing attack ' +
|
| + 'if you proceed. Go back!';
|
| + } else if (condition == 'Cond9MalwareCollabMsg') {
|
| + $('headline').innerText = 'Help Google stop the spread of malware. ' +
|
| + 'Go back!';
|
| + } else if (condition == 'Cond10PhishingCollabMsg') {
|
| + $('headline').innerText = 'Help Google stop phishing attacks. ' +
|
| + 'Go back!';
|
| + } else if (condition == 'Cond11MalwareQuestion') {
|
| + $('headline').innerText = 'Do you want to infect your computer with a ' +
|
| + 'virus? If not, go back!';
|
| + } else if (condition == 'Cond12PhishingQuestion') {
|
| + $('headline').innerText = 'Do you want to be the victim of a phishing ' +
|
| + 'attack? If not, go back!';
|
| + } else if (condition == 'Cond13MalwareGoBack') {
|
| + $('headline').innerText = 'The Website Ahead Contains Malware! ' +
|
| + 'Go Back!';
|
| + } else if (condition == 'Cond14PhishingGoBack') {
|
| + $('headline').innerText = 'Reported Phishing Website Ahead! ' +
|
| + 'Go Back!';
|
| + }
|
| +}
|
| +
|
| /**
|
| * Onload listener to initialize javascript handlers.
|
| */
|
| @@ -71,6 +110,8 @@ document.addEventListener('DOMContentLoaded', function() {
|
| // handler, we don't want the default actions.
|
| preventDefaultOnPoundLinkClicks(); // From webui/js/util.js.
|
|
|
| + setupFinch();
|
| +
|
| // Allow jsdisplay elements to be visible now.
|
| document.documentElement.classList.remove('loading');
|
| });
|
|
|