Skip to content

Commit

Permalink
fix local report
Browse files Browse the repository at this point in the history
  • Loading branch information
litten committed Nov 6, 2016
1 parent be66b05 commit 119f98b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
9 changes: 6 additions & 3 deletions source-src/js/main.js
Expand Up @@ -12,15 +12,18 @@ if (window.BJ_REPORT) {
uin: window.location.origin,
combo: 0,
delay: 1000,
url: "//litten.me:9005/badjs/",
url: "//litten.me/report/badjs/",
ignore: [/Script error/i],
random: 1,
repeat: 5000,
repeat: 500000,
onReport: function(id, errObj){},
ext: {}
});
// iframe不上报
(top === window) && BJ_REPORT.report("pv")
var host = window.location.host
var isNotFrame = (top === window)
var isNotLocal = !((/localhost/i.test(host) || /127.0.0.1/i.test(host)))
isNotFrame && isNotLocal && BJ_REPORT.report('yilia-' + window.location.host)
}

require('./jquery')
Expand Down

0 comments on commit 119f98b

Please sign in to comment.