Detecting Apple Silicon

I happened to check the scripts I had loaded & spotted something I had not specifically requested. It was duckduckgo-privacy-protection.js. Guess a default search engine choice can do this.

Anyway, did a quick scroll, & saw they they are creating & check a webgl context to detect.

    // We use this method to detect M1 macs and set appropriate API values to prevent sites from detecting fingerprinting protections
    function isAppleSilicon () {
        const canvas = document.createElement('canvas');
        const gl = canvas.getContext('webgl');

        // Best guess if the device is an Apple Silicon
        // @ts-expect-error - Object is possibly 'null'
        return gl.getSupportedExtensions().indexOf('WEBGL_compressed_texture_etc') !== -1

Probably safe, since etc is kind of an obsolete compression type. Intel based Apple machines are probably fading fast, so might be an obsolete check itself.

duckduckgo on Macs/Chrome actually tries to replace any other search engines which you would like to use, a kind of undetectable virus behaviour.