Change to using hostname

This commit is contained in:
Ajay
2023-07-11 17:22:23 -04:00
parent e8370121d5
commit af977840c6
2 changed files with 2 additions and 2 deletions

View File

@@ -2388,7 +2388,7 @@ function hotkeyListener(e: KeyboardEvent): void {
* Adds the CSS to the page if needed. Required on optional sites with Chrome.
*/
function addCSS() {
if (!isFirefoxOrSafari() && Config.config.invidiousInstances.includes(new URL(document.URL).host.split(":")[0])) {
if (!isFirefoxOrSafari() && Config.config.invidiousInstances.includes(new URL(document.URL).hostname)) {
window.addEventListener("DOMContentLoaded", () => {
const head = document.getElementsByTagName("head")[0];