Adjust to respond specifically to request device. We still override navigator.bluetooth as well though
[adblocklists.git] / greasemonkey / antiBlueToothApi.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// ==UserScript==
// @name         Anti-Bluetooth API
// @namespace    *
// @description  I've no need or interest in having the bluetooth API. Needs to be tested on an up-to-date Chrome to check whether this works
// @author       B Tasker
// @match        *://*/*
// @grant        none
// @version      1.2
// @downloadURL  https://www.bentasker.co.uk/adblock/greasemonkey/antiBlueToothApi.user.js
// @updateURL    https://www.bentasker.co.uk/adblock/greasemonkey/antiBlueToothApi.user.js
// ==/UserScript==
 
Object.defineProperty(window.navigator, 'bluetooth', {value: function requestDevice(){console.log('Bluetooth access attempt');}});
Object.defineProperty(window.navigator.bluetooth, 'requestDevice', {value: function requestDevice(){console.log('Bluetooth access attempt');}});