third_party/subscriptions-project/config.js
/**
   * Returns false if access is restricted, otherwise true
   * @param {!Element} root An element that is an item of type in ALLOWED_TYPES list
   * @return {?boolean} locked access
   * @private
   */
Returns false if access is restricted, otherwise true
@param {!Element} root An element that is an item of type in ALLOWED_TYPES list
@return {?boolean} locked access
@private
Returns false if access is restricted otherwise true @param { !Element } root An element that is an item of type in ALLOWED_TYPES list @return { ?boolean } locked access @private
discoverAccess_(root) {
    const ALREADY_SEEN = 'alreadySeenForAccessInfo';
    const nodeList = root.querySelectorAll("[itemprop='isAccessibleForFree']");
    for (let i = 0; nodeList[i]; i++) {
      const element = nodeList[i];
      const content = element.getAttribute('content') || element.textContent;
      if (!content) {
        continue;
      }
      if (this.isValidElement_(element, root, ALREADY_SEEN)) {
        let accessForFree = null;
        if (content.toLowerCase() == 'true') {
          accessForFree = true;
        } else if (content.toLowerCase() == 'false') {
          accessForFree = false;
        }
        return accessForFree;
      }
    }
    return null;
  }
discoverAccess_ ( root ) { const ALREADY_SEEN = 'alreadySeenForAccessInfo' ; const nodeList = root . querySelectorAll ( "[itemprop='isAccessibleForFree']" ) ; for ( let i = 0 ; nodeList [ i ] ; i ++ ) { const element = nodeList [ i ] ; const content = element . getAttribute ( 'content' ) || element . textContent ; if ( ! content ) { continue ; } if ( this . isValidElement_ ( element , root , ALREADY_SEEN ) ) { let accessForFree = null ; if ( content . toLowerCase ( ) == 'true' ) { accessForFree = true ; } else if ( content . toLowerCase ( ) == 'false' ) { accessForFree = false ; } return accessForFree ; } } return null ; }
Returns false if access is restricted, otherwise true
 @param {!Element} root An element that is an item of type in ALLOWED_TYPES list
 @return {?boolean} locked access
 @private
Returns false if access is restricted otherwise true @param { !Element } root An element that is an item of type in ALLOWED_TYPES list @return { ?boolean } locked access @private