(idx)
| 157 | } |
| 158 | |
| 159 | function activateAccount(idx) |
| 160 | { |
| 161 | mailbox.idx = idx; |
| 162 | var acc_id = ui[idx].id.value; |
| 163 | if(acc_id.length != 16) |
| 164 | acc_id = 'XXXXXXXXXXXXXXXX'; |
| 165 | var binary_id = []; |
| 166 | for(var i = 7; i >= 0; i--) |
| 167 | { |
| 168 | var digit = parseInt(acc_id[2*i], 16) * 16 + parseInt(acc_id[2*i+1], 16); |
| 169 | if(digit != digit) |
| 170 | { |
| 171 | alert("Must be 16 characters long and only contain [0-9A-F]"); |
| 172 | return; |
| 173 | } |
| 174 | binary_id.push(digit); |
| 175 | } |
| 176 | mailbox.action = 1; |
| 177 | mailbox.account_id = binary_id; |
| 178 | call_native(); |
| 179 | fetchAccounts(); |
| 180 | if(ui[idx].id.value == acc_id.toUpperCase()) |
| 181 | alert("PSN ID set successfully!"); |
| 182 | return false; |
| 183 | } |
| 184 | |
| 185 | fetchAccounts(); |
| 186 |
nothing calls this directly
no test coverage detected