mirror of
https://github.com/goodtube4u/goodtube.git
synced 2025-11-22 10:16:11 +00:00
CSP updates
This commit is contained in:
10
goodtube.js
10
goodtube.js
@@ -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
2
goodtube.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -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,
|
||||
|
||||
4
goodtube.user.min.js
vendored
4
goodtube.user.min.js
vendored
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user