aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/assets/js/click_interceptor.js
blob: 68dbac2b77ddb513e2a993d247b54a4c4f62934f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// generic click handler
document.onclick = function(e) {
  e = e || window.event;
  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);
  }
};