phaistonian / MyExtensions

Are you an extensions developer? Keep track of your Chrome extensions. Be notified for new comments, ratings and more!
https://chrome.google.com/webstore/detail/igejgfmbjjjjplnnlgnbejpkpdajkblm
52 stars 24 forks source link

"class" is reserved name so you can't use it #1

Closed IIsi50MHz closed 12 years ago

IIsi50MHz commented 13 years ago

Symptoms:

  1. User puts name in for "Find your extensions" in the options and gets "no user found" well, despite having themes or extensions in the Chrome web store.
  2. If JavaScript console is open, then this error appears: "Paused on exception: 'SyntaxError'."

Cause: "class" is now a reserved keyword, so you can no longer use it as a variable.

Solution: Use the following patch submitted by cmrd.Kaash on 2011/08/03 (based on work by Derek and an anonymous user).

Lines: 1296-1303: var c_class = ''; var title = 'no change'; if(diff) { c_class = diff > 0 ? ' up' : ' down'; title = diff > 0 ? ' +' + diff.toFormatted(',') : diff.toFormatted(','); }

            html.push('<td class="cell-users'+c_class+'" title="'+title+'"><div>' + Number((this.users.total || 0).toString().replace(/,/, '').toInt()).toFormatted(',') +  '</div></td>');     
neocotic commented 12 years ago

I checked the code and couldn't find any instances of this during my work on #13. Can this be closed now?