(idx)
| 115 | } |
| 116 | |
| 117 | function activateAccount(idx) |
| 118 | { |
| 119 | mailbox.idx = idx; |
| 120 | var acc_id = ui[idx].id.value; |
| 121 | if(acc_id.length != 16) |
| 122 | acc_id = 'XXXXXXXXXXXXXXXX'; |
| 123 | var binary_id = []; |
| 124 | for(var i = 7; i >= 0; i--) |
| 125 | { |
| 126 | var digit = parseInt(acc_id[2*i], 16) * 16 + parseInt(acc_id[2*i+1], 16); |
| 127 | if(digit != digit) |
| 128 | { |
| 129 | alert("Must be 16 characters long and only contain [0-9A-F]"); |
| 130 | return; |
| 131 | } |
| 132 | binary_id.push(digit); |
| 133 | } |
| 134 | mailbox.action = 1; |
| 135 | mailbox.account_id = binary_id; |
| 136 | call_native(); |
| 137 | fetchAccounts(); |
| 138 | if(ui[idx].id.value == acc_id.toUpperCase()) |
| 139 | alert("PSN ID set successfully!"); |
| 140 | return false; |
| 141 | } |
| 142 | |
| 143 | fetchAccounts(); |
| 144 |
nothing calls this directly
no test coverage detected