Graphley / website / assets / pm-year.js
| 1 | // Keeps every year line on the current year without a redeploy. |
| 2 | (function () { |
| 3 | function run() { |
| 4 | var y = String(new Date().getFullYear()); |
| 5 | var els = document.querySelectorAll('[data-pm-year]'); |
| 6 | for (var i = 0; i < els.length; i++) els[i].textContent = y; |
| 7 | } |
| 8 | if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', run); |
| 9 | else run(); |
| 10 | })(); |