aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/assets/js/menu_click.js
blob: 65c1c401433472be8b78ef85a2c88e25e186e1d6 (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(); //temporary workaround
    }
  }
};