(hist)
| 1278 | })(); |
| 1279 | |
| 1280 | function pushHistoryLog(hist) { |
| 1281 | if (!historylog) historylog = []; |
| 1282 | // don't add if recent history already constains this item |
| 1283 | if (historylog.length >= 1 && historylog[historylog.length - 1].ref === hist.ref) return; |
| 1284 | if (historylog.length >= 2 && historylog[historylog.length - 2].ref === hist.ref) return; |
| 1285 | if (historylog.length >= 3 && historylog[historylog.length - 3].ref === hist.ref) return; |
| 1286 | historylog.push(hist); |
| 1287 | if (historylog.length > 100) |
| 1288 | historylog = historylog.slice(-100); |
| 1289 | if (localStorage) |
| 1290 | localStorage.setItem(historyKey, JSON.stringify(historylog)) |
| 1291 | refreshHistoryBox(); |
| 1292 | } |
| 1293 | |
| 1294 | function refreshHistoryBox() { |
| 1295 | try { |
no test coverage detected