Source code
Revision control
Copy as Markdown
Other Tools
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
"use strict";
/**
*
* The online banking at ib.absa.co.za detect if window.controllers is a
* non-falsy value to detect if the current browser is Firefox or something
* which breaks the UA detection on this site and results in a "Browser
* unsuppored" error message.
*
* This site patch simply sets window.controllers to a string, resulting in
* their check to work again.
*/
/* globals exportFunction */
console.info(
"window.controllers has been shimmed for compatibility reasons. See https://webcompat.com/issues/16401 for details."
);
Object.defineProperty(window.wrappedJSObject, "controllers", {
get: exportFunction(function () {
return true;
}, window),
set: exportFunction(function () {}, window),
});