[8.3.2] Message at Kibana's login page "Please upgrade your browser" when applying a Tampermonkey userscript

When applying the following userscript in Tampermonkey:

// ==UserScript==
// @name         tab-size: 2
// @description  Sets the tab (U+9) character's display size to 2.
// @version      22.07.16-1645
// @author       Gerold 'Geri' Broser <https://stackoverflow.com/users/1744774>
// @namespace    igb
// @match        http://*/*
// @match        https://*/*
// @grant        none
// ==/UserScript==

(function() {
  'use strict';

    try {
        console.log("BEGIN tab-size: 2...");

        let body = document.getElementsByTagName("body")[0]
        body.style.tabSize = 2

        console.log("END tab-size: 2.")
    }
	catch (e) {
		console.error(e)
	}

})();

Kibana's login page shows:

Please upgrade your browser

This Elastic installation has strict security requirements enabled that your current browser does not meet.

WT...H?

To improve security, Kibana has a CSP configured: Content Security Policy (CSP) - HTTP | MDN

It seems like this can throw off tampermonkey scripts - see this stackoverflow question which looks like it's related: javascript - Tampermonkey script blocked by a CSP error - Stack Overflow

1 Like

Thanks for the SO link, but it even doesn't work with:

...
// @grant        GM_addStyle
...
GM_addStyle('body { tab-size: 2 !important; }')
...

I solved it with:

...
// @exclude      https://*kibana*
...

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.