Skip to content

Commit 3211409

Browse files
authoredJan 13, 2020
Merge pull request #3978 from ryanbr/google-mic
Hide google microphone from brave/brave-browser#2690
2 parents dcd6504 + d74f9e8 commit 3211409

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Stop the google mic from showing up.
2+
// https://github.com/brave/brave-browser/issues/2690
3+
4+
var selection = document.querySelector('[aria-label="Search by voice"]')!== null;
5+
if (selection) {
6+
document.querySelector('[aria-label="Search by voice"]').style.visibility = 'hidden';
7+
} else {
8+
console.warn('The element aria-label does not exist in the page.');
9+
}
10+

‎components/brave_extension/extension/brave_extension/manifest.json

+7
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@
7575
"js": [
7676
"assets/siteHack-glennbeck.com.js"
7777
]
78+
}, {
79+
"run_at": "document_start",
80+
"all_frames": true,
81+
"matches": ["https://www.google.*"],
82+
"js": [
83+
"assets/siteHack-googlemic.js"
84+
]
7885
}
7986
],
8087
"permissions": [ "contentSettings", "settingsPrivate", "management", "tabs", "storage", "webNavigation", "contextMenus", "cookies", "*://*/*", "chrome://favicon/*" ],

0 commit comments

Comments
 (0)
Please sign in to comment.