(function () {
  var key = 'gphoto_js_about_visits';
  try {
    var n = parseInt(localStorage.getItem(key) || '0', 10);
    n += 1;
    localStorage.setItem(key, String(n));
    var el = document.getElementById('visitCount');
    if (el) el.textContent = 'Page visits (this device): ' + n;
  } catch (e) {}
})();
