SALR.prototype.notifyUserAccessResult = function(result) { return result; }; SALR.prototype.getUserAccess = function() { var Platinum = ''; var Archives = ''; var NoAds = ''; var that = this; jQuery.get('/member.php?action=accountfeatures', function(data){ var PlatRegex = new RegExp('
Platinum Upgrade
',["i"]); var PlatMatches = PlatRegex.exec(data); if ( PlatMatches != null ) { // alert("Platinum: " + PlatMatches[1]); Platinum = PlatMatches[1]; } var ArchRegex = new RegExp('
Archives Upgrade
',["i"]); var ArchMatches = ArchRegex.exec(data); if ( ArchMatches != null ) { // alert("Archives: " + ArchMatches[1]); Archives = ArchMatches[1]; } var NoAdsRegex = new RegExp('
No-Ads Upgrade
',["i"]); var NoAdsMatches = NoAdsRegex.exec(data); if ( NoAdsMatches != null ) { // alert("No-Ads: " + NoAdsMatches[1]); NoAds = NoAdsMatches[1]; } that.notifyUserAccessResult({ Platinum:Platinum, Archives:Archives, NoAds:NoAds }); }); }