Skip to content

Commit

Permalink
Merge pull request #242 from allanlw/master
Browse files Browse the repository at this point in the history
Fix two issues with case sensitive comparisson in the account switcher module.
  • Loading branch information
honestbleeps committed Feb 3, 2013
2 parents 47563b1 + 96f814e commit bd52d9b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/reddit_enhancement_suite.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -12288,7 +12288,7 @@ modules['accountSwitcher'] = {
var accountCount = 0;
for (var i=0, len=accounts.length; i<len; i++) {
var thisPair = accounts[i];
if (thisPair[0] != this.loggedInUser || this.options.showCurrentUserName.value){
if (thisPair[0].toUpperCase() !== this.loggedInUser.toUpperCase() || this.options.showCurrentUserName.value){
accountCount++;
var thisLI = document.createElement('LI');
addClass(thisLI, 'accountName');
Expand Down Expand Up @@ -12370,8 +12370,9 @@ modules['accountSwitcher'] = {
}
for (var i=0, len=accounts.length; i<len; i++) {
var thisPair = accounts[i];
if (thisPair[0] == username) {
if (thisPair[0].toUpperCase() === username.toUpperCase()) {
password = thisPair[1];
break;
}
}
// console.log('request with user: ' +username+ ' -- passwd: ' + password);
Expand Down

0 comments on commit bd52d9b

Please sign in to comment.