| Index: chrome/browser/resources/gaia_auth/saml_injected.js
|
| diff --git a/chrome/browser/resources/gaia_auth/saml_injected.js b/chrome/browser/resources/gaia_auth/saml_injected.js
|
| index e41dfebec624bf6fc801f6e391ee305f76d5174a..f2382259a585ecd7363a965ed5032a392c80113f 100644
|
| --- a/chrome/browser/resources/gaia_auth/saml_injected.js
|
| +++ b/chrome/browser/resources/gaia_auth/saml_injected.js
|
| @@ -134,14 +134,6 @@
|
| };
|
|
|
| /**
|
| - * Returns true if the script is injected into auth main page.
|
| - */
|
| - function isAuthMainPage() {
|
| - return window.location.href.indexOf(
|
| - 'chrome-extension://mfffpogegjflfpflabcdkioaeobkgjik/main.html') == 0;
|
| - }
|
| -
|
| - /**
|
| * Heuristic test whether the current page is a relevant SAML page.
|
| * Current implementation checks if it is a http or https page and has
|
| * some content in it.
|
| @@ -155,26 +147,17 @@
|
| return document.body.scrollWidth > 50 && document.body.scrollHeight > 50;
|
| }
|
|
|
| - if (isAuthMainPage()) {
|
| - // Use an event to signal the auth main to enable SAML support.
|
| - var e = document.createEvent('Event');
|
| - e.initEvent('enableSAML', false, false);
|
| - document.dispatchEvent(e);
|
| - } else {
|
| - var channel;
|
| - var passwordScraper;
|
| - if (isSAMLPage()) {
|
| - var pageURL = window.location.href;
|
| -
|
| - channel = new Channel();
|
| - channel.connect('injected');
|
| - channel.send({name: 'pageLoaded', url: pageURL});
|
| -
|
| - apiCallForwarder = new APICallForwarder();
|
| - apiCallForwarder.init(channel);
|
| -
|
| - passwordScraper = new PasswordInputScraper();
|
| - passwordScraper.init(channel, pageURL, document.documentElement);
|
| - }
|
| + if (isSAMLPage()) {
|
| + var pageURL = window.location.href;
|
| +
|
| + var channel = new Channel();
|
| + channel.connect('injected');
|
| + channel.send({name: 'pageLoaded', url: pageURL});
|
| +
|
| + var apiCallForwarder = new APICallForwarder();
|
| + apiCallForwarder.init(channel);
|
| +
|
| + var passwordScraper = new PasswordInputScraper();
|
| + passwordScraper.init(channel, pageURL, document.documentElement);
|
| }
|
| })();
|
|
|