CSP updates

This commit is contained in:
goodtube4u
2024-08-08 10:19:40 +10:00
parent 03c2fca924
commit 5680a626ec
4 changed files with 15 additions and 5 deletions

View File

@@ -2,6 +2,16 @@
'use strict';
// Bypass CSP restrictions, introduced by the latest Chrome updates
if (window.trustedTypes && window.trustedTypes.createPolicy && typeof window.trustedTypes.default === 'undefined') {
window.trustedTypes.createPolicy('default', {
createHTML: string => string,
createScriptURL: string => string,
createScript: string => string
});
}
/* General config
------------------------------------------------------------------------------------------ */
// Github location for loading assets

2
goodtube.min.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,7 @@
// ==UserScript==
// @name GoodTube
// @namespace http://tampermonkey.net/
// @version 5.008
// @version 5.009
// @description Loads Youtube videos from different sources. Also removes ads, shorts, etc.
// @author GoodTube
// @match https://*.youtube.com/*
@@ -19,7 +19,7 @@
'use strict';
// Bypass CSP restrictions, introduced by the latest Chrome updates
if (window.trustedTypes && window.trustedTypes.createPolicy) {
if (window.trustedTypes && window.trustedTypes.createPolicy && typeof window.trustedTypes.default === 'undefined') {
window.trustedTypes.createPolicy('default', {
createHTML: string => string,
createScriptURL: string => string,

View File

@@ -1,7 +1,7 @@
// ==UserScript==
// @name GoodTube
// @namespace http://tampermonkey.net/
// @version 5.008
// @version 5.009
// @description Loads Youtube videos from different sources. Also removes ads, shorts, etc.
// @author GoodTube
// @match https://*.youtube.com/*
@@ -19,7 +19,7 @@
'use strict';
// Bypass CSP restrictions, introduced by the latest Chrome updates
if (window.trustedTypes && window.trustedTypes.createPolicy) {
if (window.trustedTypes && window.trustedTypes.createPolicy && typeof window.trustedTypes.default === 'undefined') {
window.trustedTypes.createPolicy('default', {
createHTML: string => string,
createScriptURL: string => string,