Created
August 29, 2010 20:21
-
-
Save Rohaq/556654 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SALR.prototype.getUserFeatures = function() { | |
var Platinum = ''; | |
var Archives = ''; | |
var NoAds = ''; | |
jQuery.get('/member.php?action=accountfeatures', function(data){ | |
var PlatRegex = new RegExp('<dt class="(.+?)">Platinum Upgrade</dt>',["i"]); | |
var PlatMatches = PlatRegex.exec(data); | |
if ( PlatMatches != null ) { | |
// alert("Platinum: " + PlatMatches[1]); | |
Platinum = PlatMatches[1]; | |
} | |
var ArchRegex = new RegExp('<dt class="(.+?)">Archives Upgrade</dt>',["i"]); | |
var ArchMatches = ArchRegex.exec(data); | |
if ( ArchMatches != null ) { | |
// alert("Archives: " + ArchMatches[1]); | |
Archives = ArchMatches[1]; | |
} | |
var NoAdsRegex = new RegExp('<dt class="(.+?)">No-Ads Upgrade</dt>',["i"]); | |
var NoAdsMatches = NoAdsRegex.exec(data); | |
if ( NoAdsMatches != null ) { | |
// alert("No-Ads: " + NoAdsMatches[1]); | |
NoAds = NoAdsMatches[1]; | |
} | |
}); | |
return { | |
Platinum:Platinum, | |
Archives:Archives, | |
NoAds:NoAds | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment