Chromium Code Reviews| Index: chrome/browser/resources/chromeos/chromevox/chromevox/injected/init_document.js |
| diff --git a/chrome/browser/resources/chromeos/chromevox/chromevox/injected/init_document.js b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/init_document.js |
| index e22cfc8adbbfbb57311f9dab2b08b38c3057ada3..593ed255960e27a6d91e63e5ed1ecbc804b31624 100644 |
| --- a/chrome/browser/resources/chromeos/chromevox/chromevox/injected/init_document.js |
| +++ b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/init_document.js |
| @@ -83,6 +83,29 @@ cvox.ChromeVox.initDocument = function() { |
| return; |
| } |
| + // Look for ChromeVox-specific meta attributes. |
| + var disableContentScript = false; |
| + if (document.head) { |
| + document.head.querySelectorAll('meta[name="chromevox"]').forEach( |
| + function(meta) { |
| + var contentScript = meta.getAttribute('content-script'); |
| + if (contentScript && contentScript.toLowerCase() == 'no') { |
| + disableContentScript = true; |
| + } |
| + }); |
| + } |
| + if (disableContentScript) { |
| + window.console.log('Disabling ChromeVox content script due to meta tag.'); |
|
David Tseng
2016/06/20 16:26:08
nit: remove
dmazzoni
2016/06/20 20:06:23
Done.
|
| + var url = location.href; |
| + url = url.substring(0, url.indexOf('#')) || url; |
| + cvox.ExtensionBridge.send({ |
| + target: 'next', |
| + action: 'enableCompatForUrl', |
| + url: url |
| + }); |
| + return; |
| + } |
| + |
| cvox.ExtensionBridge.send({ |
| target: 'next', |
| action: 'getIsClassicEnabled', |