Add script version, web engine, line numbers to error messages.
This commit is contained in:
parent
73af23bcfb
commit
3949d8b103
@ -3,6 +3,7 @@
|
||||
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
||||
"meta": {
|
||||
"name": "4chan X",
|
||||
"fork": "ccd0",
|
||||
"version": "1.11.9.0",
|
||||
"date": "2015-08-15T18:45:44.807Z",
|
||||
"page": "https://www.4chan-x.net/",
|
||||
|
||||
@ -328,7 +328,10 @@ Main =
|
||||
textContent: data.message
|
||||
error = $.el 'div',
|
||||
textContent: "#{data.error.name or 'Error'}: #{data.error.message or 'see console for details'}"
|
||||
[message, error]
|
||||
lines = data.error.stack?.match(/\d+(?=:\d+\)?$)/mg)?.join().replace(/^/, ' at ') or ''
|
||||
context = $.el 'div',
|
||||
textContent: "(<%= meta.name %> <%= meta.fork %> v#{g.VERSION} <%= type %> on #{$.engine}#{lines})"
|
||||
[message, error, context]
|
||||
|
||||
isThisPageLegit: ->
|
||||
# 404 error page or similar.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user