diff --git a/chrome/browser/resources/history/history.js b/chrome/browser/resources/history/history.js index 64458dbeeffcd..8a59ce2a7f51a 100644 --- a/chrome/browser/resources/history/history.js +++ b/chrome/browser/resources/history/history.js @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. + diff --git a/chrome/browser/resources/ntp4/new_tab.html b/chrome/browser/resources/ntp4/new_tab.html index 1aecb76b12376..0dbd981244271 100644 --- a/chrome/browser/resources/ntp4/new_tab.html +++ b/chrome/browser/resources/ntp4/new_tab.html @@ -50,7 +50,7 @@ - + diff --git a/chrome/browser/resources/ntp4/synthetic_middleclick.js b/chrome/browser/resources/synthetic_middleclick.js similarity index 84% rename from chrome/browser/resources/ntp4/synthetic_middleclick.js rename to chrome/browser/resources/synthetic_middleclick.js index 8c90c98a7f5ab..03b982e47a6bb 100644 --- a/chrome/browser/resources/ntp4/synthetic_middleclick.js +++ b/chrome/browser/resources/synthetic_middleclick.js @@ -21,4 +21,9 @@ document.addEventListener('mouseup', function(e) { middleButtonMouseDownTarget = null; }, true); +window.addEventListener('click', function(e) { + if (e.button == 1 && !e.isTrusted) + e.preventDefault(); +}); + })();