Adjust to respond specifically to request device. We still override navigator.bluetooth as well though
Adjust to respond specifically to request device. We still override navigator.bluetooth as well though

// ==UserScript== // ==UserScript==
// @name Anti-Bluetooth API // @name Anti-Bluetooth API
// @namespace * // @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 // @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 // @author B Tasker
// @match *://*/* // @match *://*/*
// @grant none // @grant none
// @version 1.1 // @version 1.2
// @downloadURL https://www.bentasker.co.uk/adblock/greasemonkey/antiBlueToothApi.user.js // @downloadURL https://www.bentasker.co.uk/adblock/greasemonkey/antiBlueToothApi.user.js
// @updateURL https://www.bentasker.co.uk/adblock/greasemonkey/antiBlueToothApi.user.js // @updateURL https://www.bentasker.co.uk/adblock/greasemonkey/antiBlueToothApi.user.js
// ==/UserScript== // ==/UserScript==
   
Object.defineProperty(window.navigator, 'bluetooth', {value: function requestDevice(){console.log('Bluetooth access attempt');}}); 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');}});
   
console.log("Loaded");