aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/assets/js/click_interceptor.js
blob: 238b31d3f9f2a158e2748139685c50fe48d693ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// generic click handler
document.on('click', function (e) {
  e = e || window.event;
  e.preventDefault();
  var element = e.target || e.srcElement;
  if (element.tagName !== 'A')
      element = element.parentNode;
  if (element.tagName === 'A') {
      var url = element.href;
      console.log('Generic Click Intercept');
      console.log(url);
      // Frost.loadUrl(url);
  }
  return false;
});