Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: safari/include.youtube.js

Issue 29830555: Issue 6786 - Avoid running YouTube code on Safari 12+ (Closed)
Patch Set: Created July 15, 2018, 11:25 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: safari/include.youtube.js
diff --git a/safari/include.youtube.js b/safari/include.youtube.js
index f7976d685596aad67a852ceafb6162e80f400cff..66043f782a2456f316da3f6d02d1a45ba12c52a1 100644
--- a/safari/include.youtube.js
+++ b/safari/include.youtube.js
@@ -19,6 +19,10 @@
if (document.domain != "www.youtube.com")
return;
+ var majorApplicationVersion = parseInt(navigator.userAgent.match(/Version\/([\d]+)/)[1]);
+ if (majorApplicationVersion >= 12)
+ return;
+
var usingContentBlockerAPI = true;
try
{
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld