Skip to content

Commit

Permalink
exception handled
Browse files Browse the repository at this point in the history
exception handling for chained getter function.
  • Loading branch information
zerodytrash committed Feb 2, 2021
1 parent 3aeac09 commit b572799
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Simple-YouTube-Age-Restriction-Bypass.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name Simple YouTube Age Restriction Bypass
// @namespace https://zerody.one
// @version 0.4
// @version 0.5
// @description View age restricted videos on YouTube without verification and login :)
// @author ZerodyOne
// @match https://www.youtube.com/*
Expand Down Expand Up @@ -40,7 +40,7 @@
if(typeof chainedSetter === "function") chainedSetter(wrappedPlayerResponse);
},
get: function() {
if(typeof chainedGetter === "function") return chainedGetter();
if(typeof chainedGetter === "function") try { return chainedGetter() } catch(err) { };
return wrappedPlayerResponse;
},
configurable: true
Expand Down

0 comments on commit b572799

Please sign in to comment.