Skip to content

Commit

Permalink
Fix Catalina not supporting WebGL2 (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanKingston authored Oct 6, 2022
1 parent f059efa commit e66180d
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 8 deletions.
4 changes: 3 additions & 1 deletion Sources/ContentScopeScripts/dist/contentScope.js
Original file line number Diff line number Diff line change
Expand Up @@ -3631,9 +3631,11 @@
'drawArrays'
];
const glContexts = [
WebGL2RenderingContext,
WebGLRenderingContext
];
if ('WebGL2RenderingContext' in globalThis) {
glContexts.push(WebGL2RenderingContext);
}
for (const context of glContexts) {
for (const methodName of unsafeGlMethods) {
// Some methods are browser specific
Expand Down
4 changes: 3 additions & 1 deletion build/android/contentScope.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion build/chrome-mv3/inject.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/chrome/inject.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion build/firefox/inject.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion build/integration/contentScope.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion build/windows/contentScope.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/features/fingerprinting-canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,11 @@ export function init (args) {
'drawArrays'
]
const glContexts = [
WebGL2RenderingContext,
WebGLRenderingContext
]
if ('WebGL2RenderingContext' in globalThis) {
glContexts.push(WebGL2RenderingContext)
}
for (const context of glContexts) {
for (const methodName of unsafeGlMethods) {
// Some methods are browser specific
Expand Down

0 comments on commit e66180d

Please sign in to comment.