aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/assets/js/menu_click.js
blob: 3e23617acd7c610c49cb2f0bece38a81a093291e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// we will handle click events
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('Click Intercept');
    console.log(url);
    if (url !== "https://m.facebook.com/settings" && url !== "https://m.facebook.com/settings#" && url !== "https://m.facebook.com/settings#!/settings?soft=bookmarks") {
      Frost.loadUrl(url);
      Frost.reloadBaseUrl(false); //reinject base view
    }
  }
};