Merge branch 'v3' of https://github.com/zixaphir/appchan-x
This commit is contained in:
commit
0148aa32d1
@ -10433,29 +10433,9 @@
|
|||||||
},
|
},
|
||||||
errors: [],
|
errors: [],
|
||||||
logError: function(data) {
|
logError: function(data) {
|
||||||
if (!Main.errors.length) {
|
|
||||||
$.on(window, 'unload', Main.postErrors);
|
|
||||||
}
|
|
||||||
c.error(data.message, data.error.stack);
|
c.error(data.message, data.error.stack);
|
||||||
return Main.errors.push(data);
|
return Main.errors.push(data);
|
||||||
},
|
},
|
||||||
postErrors: function() {
|
|
||||||
var errors;
|
|
||||||
|
|
||||||
errors = Main.errors.map(function(d) {
|
|
||||||
return d.message + ' ' + d.error.stack;
|
|
||||||
});
|
|
||||||
return $.ajax('http://seaweedchan.github.io/4chan-x/errors', {}, {
|
|
||||||
sync: true,
|
|
||||||
form: $.formData({
|
|
||||||
n: "4chan X v" + g.VERSION,
|
|
||||||
t: 'userjs',
|
|
||||||
ua: window.navigator.userAgent,
|
|
||||||
url: window.location.href,
|
|
||||||
e: errors.join('\n')
|
|
||||||
})
|
|
||||||
});
|
|
||||||
},
|
|
||||||
isThisPageLegit: function() {
|
isThisPageLegit: function() {
|
||||||
var _ref;
|
var _ref;
|
||||||
|
|
||||||
|
|||||||
@ -10444,29 +10444,9 @@
|
|||||||
},
|
},
|
||||||
errors: [],
|
errors: [],
|
||||||
logError: function(data) {
|
logError: function(data) {
|
||||||
if (!Main.errors.length) {
|
|
||||||
$.on(window, 'unload', Main.postErrors);
|
|
||||||
}
|
|
||||||
c.error(data.message, data.error.stack);
|
c.error(data.message, data.error.stack);
|
||||||
return Main.errors.push(data);
|
return Main.errors.push(data);
|
||||||
},
|
},
|
||||||
postErrors: function() {
|
|
||||||
var errors;
|
|
||||||
|
|
||||||
errors = Main.errors.map(function(d) {
|
|
||||||
return d.message + ' ' + d.error.stack;
|
|
||||||
});
|
|
||||||
return $.ajax('http://seaweedchan.github.io/4chan-x/errors', {}, {
|
|
||||||
sync: true,
|
|
||||||
form: $.formData({
|
|
||||||
n: "4chan X v" + g.VERSION,
|
|
||||||
t: 'userscript',
|
|
||||||
ua: window.navigator.userAgent,
|
|
||||||
url: window.location.href,
|
|
||||||
e: errors.join('\n')
|
|
||||||
})
|
|
||||||
});
|
|
||||||
},
|
|
||||||
isThisPageLegit: function() {
|
isThisPageLegit: function() {
|
||||||
var _ref;
|
var _ref;
|
||||||
|
|
||||||
|
|||||||
@ -10426,29 +10426,9 @@
|
|||||||
},
|
},
|
||||||
errors: [],
|
errors: [],
|
||||||
logError: function(data) {
|
logError: function(data) {
|
||||||
if (!Main.errors.length) {
|
|
||||||
$.on(window, 'unload', Main.postErrors);
|
|
||||||
}
|
|
||||||
c.error(data.message, data.error.stack);
|
c.error(data.message, data.error.stack);
|
||||||
return Main.errors.push(data);
|
return Main.errors.push(data);
|
||||||
},
|
},
|
||||||
postErrors: function() {
|
|
||||||
var errors;
|
|
||||||
|
|
||||||
errors = Main.errors.map(function(d) {
|
|
||||||
return d.message + ' ' + d.error.stack;
|
|
||||||
});
|
|
||||||
return $.ajax('http://seaweedchan.github.io/4chan-x/errors', {}, {
|
|
||||||
sync: true,
|
|
||||||
form: $.formData({
|
|
||||||
n: "4chan X v" + g.VERSION,
|
|
||||||
t: 'crx',
|
|
||||||
ua: window.navigator.userAgent,
|
|
||||||
url: window.location.href,
|
|
||||||
e: errors.join('\n')
|
|
||||||
})
|
|
||||||
});
|
|
||||||
},
|
|
||||||
isThisPageLegit: function() {
|
isThisPageLegit: function() {
|
||||||
var _ref;
|
var _ref;
|
||||||
|
|
||||||
|
|||||||
@ -352,22 +352,9 @@ Main =
|
|||||||
|
|
||||||
errors: []
|
errors: []
|
||||||
logError: (data) ->
|
logError: (data) ->
|
||||||
unless Main.errors.length
|
|
||||||
$.on window, 'unload', Main.postErrors
|
|
||||||
c.error data.message, data.error.stack
|
c.error data.message, data.error.stack
|
||||||
Main.errors.push data
|
Main.errors.push data
|
||||||
|
|
||||||
postErrors: ->
|
|
||||||
errors = Main.errors.map (d) -> d.message + ' ' + d.error.stack
|
|
||||||
$.ajax '<%= meta.page %>errors', {},
|
|
||||||
sync: true
|
|
||||||
form: $.formData
|
|
||||||
n: "<%= meta.name %> v#{g.VERSION}"
|
|
||||||
t: '<%= type %>'
|
|
||||||
ua: window.navigator.userAgent
|
|
||||||
url: window.location.href
|
|
||||||
e: errors.join '\n'
|
|
||||||
|
|
||||||
isThisPageLegit: ->
|
isThisPageLegit: ->
|
||||||
# 404 error page or similar.
|
# 404 error page or similar.
|
||||||
unless 'thisPageIsLegit' of Main
|
unless 'thisPageIsLegit' of Main
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user