mirror of
https://github.com/goodtube4u/goodtube.git
synced 2025-11-22 10:16:11 +00:00
CSP fix
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @name GoodTube
|
||||
// @namespace http://tampermonkey.net/
|
||||
// @version 5.007
|
||||
// @version 5.008
|
||||
// @description Loads Youtube videos from different sources. Also removes ads, shorts, etc.
|
||||
// @author GoodTube
|
||||
// @match https://*.youtube.com/*
|
||||
@@ -18,6 +18,15 @@
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
// Bypass CSP restrictions, introduced by the latest Chrome updates
|
||||
if (window.trustedTypes && window.trustedTypes.createPolicy) {
|
||||
window.trustedTypes.createPolicy('default', {
|
||||
createHTML: string => string,
|
||||
createScriptURL: string => string,
|
||||
createScript: string => string
|
||||
});
|
||||
}
|
||||
|
||||
// Define load function
|
||||
function goodTube_load(loadAttempts) {
|
||||
// If it's the first load attempt
|
||||
|
||||
11
goodtube.user.min.js
vendored
11
goodtube.user.min.js
vendored
@@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @name GoodTube
|
||||
// @namespace http://tampermonkey.net/
|
||||
// @version 5.007
|
||||
// @version 5.008
|
||||
// @description Loads Youtube videos from different sources. Also removes ads, shorts, etc.
|
||||
// @author GoodTube
|
||||
// @match https://*.youtube.com/*
|
||||
@@ -18,6 +18,15 @@
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
// Bypass CSP restrictions, introduced by the latest Chrome updates
|
||||
if (window.trustedTypes && window.trustedTypes.createPolicy) {
|
||||
window.trustedTypes.createPolicy('default', {
|
||||
createHTML: string => string,
|
||||
createScriptURL: string => string,
|
||||
createScript: string => string
|
||||
});
|
||||
}
|
||||
|
||||
// Define load function
|
||||
function goodTube_load(loadAttempts) {
|
||||
// If it's the first load attempt
|
||||
|
||||
Reference in New Issue
Block a user