AlloyTeam/AlloyLever

Name: AlloyLever

Owner: ?? AlloyTeam

Description: 1KB js library contains development debugging, error monitoring and reporting, user problem localization features - 1KB????????????????????????

Created: 2016-05-09 03:17:27.0

Updated: 2018-05-24 03:26:49.0

Pushed: 2018-04-16 04:33:51.0

Homepage: https://alloyteam.github.io/AlloyLever/

Size: 651

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

?? | English
AlloyLever

1kb(gzip)?????????????????????????

url?????????????????????????vConsole?????????????????????vConsole?????????

??
install alloylever

CDN????????:

https://unpkg.com/alloylever@1.0.3/alloy-lever.js

????
yLever.config({
cdn:'//s.url.cn/qqun/qun/qqweb/m/qun/confession/js/vconsole.min.js',  //vconsole?CDN??
reportUrl: "//a.qq.com",  //??????
reportPrefix: 'qun',    //????msg?????????????
reportKey: 'msg',        //????msg???key???????????msg
otherReport: {              //?????????
    uin: 491862102
},
entry:"#entry"          //?????DOM??6???vConsole?//?????AlloyLever.entry('#entry2')????????????

AlloyLever???window.onerror????????????????reportUrl????????vConsole????????????? ??????CDN???://pub.idqqimg.com/qqun/qun/qqweb/m/qun/confession/js/vconsole.min.js

url??vConsole

?????????AlloyLever????????url??? vconsole=show ????vConsole????:

???log??
://localhost:63342/AlloyLever/index.html?vconsole=show
????log??
://localhost:63342/AlloyLever/index.html?vconsole=hide
?vConsole??
://localhost:63342/AlloyLever/index.html

??url???????:

????
QQ???491862102

English | ???
AlloyLever

1kb(gzip) js library contains development debugging, error monitoring and reporting, user problem localization features.

There are two purposes for URL parameter arousal, the first is to display the vConsole panel during the website development process, and the second is to send a complaint to the feedback site. The wrong user displays the vConsole panel for locating errors.

Install
install alloylever

or get it from cdn:

https://unpkg.com/alloylever@1.0.3/alloy-lever.js

Usage
yLever.config({
cdn:'//s.url.cn/qqun/qun/qqweb/m/qun/confession/js/vconsole.min.js',  //vconsole CDN address
reportUrl: "//a.qq.com",  //Error reporting address
reportPrefix: 'qun',    //An error reporting msg prefix is generally used to differentiate business types
reportKey: 'msg',        //Error reporting msg prefix key, user reporting system receives storage msg
otherReport: {              //Other information to be reported
    uin: 491862102
},
entry:"#entry"          //Please click on this DOM element to summon vConsole 6 times. You can use AlloyLever.entry('#entry2') add more entry

AlloyLever will listen to window.onerror and save the error information, and report to reportUrl, you can also call vConsole and display errors and related logs.

URL evokes vConsole

As long as your page references AlloyLever, you simply display the vConsole panel with the vconsole=show in your url. Such as:

ad and display the log panel
://localhost:63342/AlloyLever/index.html?vconsole=show
ad but don't display the log panel
://localhost:63342/AlloyLever/index.html?vconsole=hide
n't load vConsole
://localhost:63342/AlloyLever/index.html

The role of these URL is well understood:

DEMO

License

This content is released under the MIT License.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.