diff --git a/app/src/main/java/com/google/android/youtube/pro/MainActivity.java b/app/src/main/java/com/google/android/youtube/pro/MainActivity.java index ae203b9..fb44f13 100644 --- a/app/src/main/java/com/google/android/youtube/pro/MainActivity.java +++ b/app/src/main/java/com/google/android/youtube/pro/MainActivity.java @@ -76,6 +76,8 @@ public void onPageStarted(WebView p1, String p2, Bitmap p3) { @Override public void onPageFinished(WebView p1, String url) { + + web.loadUrl("javascript:if (window.trustedTypes && window.trustedTypes.createPolicy) {window.trustedTypes.createPolicy('default', {createHTML: (string) => string,createScriptURL: string => string, createScript: string => string, });}"); web.loadUrl("javascript:(function () { var script = document.createElement('script'); script.src='https://cdn.jsdelivr.net/npm/ytpro'; document.body.appendChild(script); })();"); web.loadUrl("javascript:(function () { var script = document.createElement('script'); script.src='https://cdn.jsdelivr.net/npm/ytpro/bgplay.js'; document.body.appendChild(script); })();"); if(dl){