This script doesn't work for websites with two dots in the host-variable of the switch case statement.
In line 386, const host = location.hostname.split('.').slice(-2).join('.'); specifies that only the last two parts of the hostname are stored as host. So https://qastack.com.ua/ becomes com.ua as host. In the switch statement, however, it is compared to qastack.com.ua.
This script doesn't work for websites with two dots in the
host-variable of the switch case statement.In line 386,
const host = location.hostname.split('.').slice(-2).join('.');specifies that only the last two parts of the hostname are stored ashost. So https://qastack.com.ua/ becomescom.uaashost. In the switch statement, however, it is compared toqastack.com.ua.