diff --git a/app/src/main/java/dev/vendicated/vencord/VWebviewClient.java b/app/src/main/java/dev/vendicated/vencord/VWebviewClient.java index 38c2cf8..458fba7 100644 --- a/app/src/main/java/dev/vendicated/vencord/VWebviewClient.java +++ b/app/src/main/java/dev/vendicated/vencord/VWebviewClient.java @@ -41,7 +41,7 @@ public void onPageFinished(WebView view, String url) { @Override public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest req) { var uri = req.getUrl(); - if (req.isForMainFrame() || req.getUrl().getHost().equals("raw.githubusercontent.com") && req.getUrl().getPath().endsWith(".css")) { + if (req.isForMainFrame() || req.getUrl().getPath().endsWith(".css")) { try { return doFetch(req); } catch (IOException ex) { @@ -71,6 +71,6 @@ private WebResourceResponse doFetch(WebResourceRequest req) throws IOException { } if (url.endsWith(".css")) modifiedHeaders.put("Content-Type", "text/css"); - return new WebResourceResponse(conn.getHeaderField("Content-Type"), "utf-8", code, msg, modifiedHeaders, conn.getInputStream()); + return new WebResourceResponse(modifiedHeaders.getOrDefault("Content-Type", "application/octet-stream"), "utf-8", code, msg, modifiedHeaders, conn.getInputStream()); } }