Fix for FireFox support

Hi Team! When accessing Harness from FireFox, you see this error:

Harness works best in Chrome. Your browser is currently not supported and may cause unexpected performance issues.

Chrome has been getting allot of bad press recently, and more users want to have access to an alternative browser. When is FireFox support road mapped for?

For FireFox users reading this, who do not want to wait, here is a TamperMonkey script fix today, so you can use FireFox with Harness.

// ==UserScript==
// @name         Harness Pipeline Fixup
// @namespace    https://app.harness.io
// @version      0.1
// @description  Harness for Firefox
// @author       You
// @include      https://app.harness.io/*
// @grant        none
// @run-at       document-start
// ==/UserScript==
 
(function() {
    'use strict';
 
    function waitForAddedNode(params) {
        new MutationObserver(function(mutations) {
            var el = document.querySelector(params.selector);
            if (el) {
                this.disconnect();
                params.done(el);
                wait();
            }
        }).observe(params.parent || document, {
            subtree: !!params.recursive,
            childList: true,
        });
    }
 
    function wait() {
        waitForAddedNode({
            selector: 'div[data-name=pipelineView]',
            recursive: true,
            parent: document,
            done: function(el) {
                console.log(el);
                if (el) {
                    el.parentNode.removeChild(el);
                }
            }
        });
    }
    wait();
})();
3 Likes

Thanks for sharing this!

Re: FireFox Support

Ongoing for us, the more baked support for additional browsers is in our backlog.

Cheers!

-Ravi