Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42150dc7c3 | ||
|
|
97122c86db | ||
|
|
8a200d45e6 | ||
|
|
7d9b8c4e8b | ||
|
|
6d3122c991 | ||
|
|
572917e2de | ||
|
|
df55c668d1 | ||
|
|
a1a75efa5e | ||
|
|
e24e304c92 | ||
|
|
05da2498af | ||
|
|
bbb38ba088 |
@@ -1,3 +1,9 @@
|
||||
## 3.0.1 (18 JUL 2023)
|
||||
|
||||
* fix: can not print string with %o [#336](https://github.com/liriliri/eruda/issues/336)
|
||||
* fix: mouse event on touch device [#302](https://github.com/liriliri/eruda/issues/302)
|
||||
* fix: unable to remove snippets [#349](https://github.com/liriliri/eruda/issues/349)
|
||||
|
||||
## 3.0.0 (2 Apr 2023)
|
||||
|
||||
* feat: replace fps and memory with monitor plugin
|
||||
|
||||
@@ -27,7 +27,7 @@ Console for Mobile Browsers.
|
||||
[license-image]: https://img.shields.io/npm/l/eruda?style=flat-square
|
||||
[donate-image]: https://img.shields.io/badge/$-donate-0070ba.svg?style=flat-square
|
||||
|
||||
<img src="https://eruda.liriliri.io/img/screenshot.jpg" style="width:100%">
|
||||
<img src="https://eruda.liriliri.io/img/screenshot-v3.jpg" style="width:100%">
|
||||
|
||||
[中文](README_CN.md)
|
||||
|
||||
@@ -40,7 +40,7 @@ Browse it on your phone: [https://eruda.liriliri.io/](https://eruda.liriliri.io/
|
||||
In order to try it for different sites, execute the script below on browser address bar.
|
||||
|
||||
```javascript
|
||||
javascript:(function () { var script = document.createElement('script'); script.src="//cdn.jsdelivr.net/npm/eruda"; document.body.appendChild(script); script.onload = function () { eruda.init() } })();
|
||||
javascript:(function () { var script = document.createElement('script'); script.src="https://cdn.jsdelivr.net/npm/eruda"; document.body.append(script); script.onload = function () { eruda.init(); } })();
|
||||
```
|
||||
|
||||
## Features
|
||||
@@ -138,4 +138,4 @@ If you want to create a plugin yourself, follow the guides [here](./doc/PLUGIN.m
|
||||
|
||||
## Contribution
|
||||
|
||||
Read [Contributing Guide](.github/CONTRIBUTING.md) for development setup instructions.
|
||||
Read [Contributing Guide](.github/CONTRIBUTING.md) for development setup instructions.
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
[license-image]: https://img.shields.io/npm/l/eruda?style=flat-square
|
||||
[donate-image]: https://img.shields.io/badge/$-donate-0070ba.svg?style=flat-square
|
||||
|
||||
<img src="https://eruda.liriliri.io/img/screenshot.jpg" style="width:100%">
|
||||
<img src="https://eruda.liriliri.io/img/screenshot-v3.jpg" style="width:100%">
|
||||
|
||||
## Demo
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
如果想在其它页面尝试,请在浏览器地址栏上输入以下代码。
|
||||
|
||||
```javascript
|
||||
javascript:(function () { var script = document.createElement('script'); script.src="//cdn.jsdelivr.net/npm/eruda"; document.body.appendChild(script); script.onload = function () { eruda.init() } })();
|
||||
javascript:(function () { var script = document.createElement('script'); script.src="https://cdn.jsdelivr.net/npm/eruda"; document.body.append(script); script.onload = function () { eruda.init(); } })();
|
||||
```
|
||||
|
||||
## 功能清单
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
|
||||
.BundleAnalyzerPlugin
|
||||
const BundleAnalyzerPlugin =
|
||||
require('webpack-bundle-analyzer').BundleAnalyzerPlugin
|
||||
|
||||
exports = require('./webpack.prod')
|
||||
|
||||
|
||||
@@ -86,6 +86,8 @@ Add tool.
|
||||
eruda.add(new (eruda.Tool.extend({
|
||||
name: 'test'
|
||||
})));
|
||||
|
||||
eruda.add(eruda.Network);
|
||||
```
|
||||
|
||||
## remove
|
||||
@@ -111,4 +113,4 @@ Hide eruda panel.
|
||||
|
||||
```javascript
|
||||
eruda.hide();
|
||||
```
|
||||
```
|
||||
|
||||
14
package.json
14
package.json
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "eruda",
|
||||
"version": "3.0.0",
|
||||
"version": "3.0.1",
|
||||
"description": "Console for Mobile Browsers",
|
||||
"main": "eruda.js",
|
||||
"browserslist": [
|
||||
"> 0.25%",
|
||||
"since 2015",
|
||||
"not dead"
|
||||
],
|
||||
"scripts": {
|
||||
@@ -16,9 +16,9 @@
|
||||
"format": "lsla prettier \"*.{js,ts}\" \"src/**/*.{js,scss,css}\" \"build/*.js\" \"test/*.{js,html}\" --write",
|
||||
"lint": "eslint src/**/*.js",
|
||||
"lint:fix": "npm run lint -- --fix",
|
||||
"es5": "es-check es5 dist/eruda.js",
|
||||
"es5": "es-check es5 dist/eruda.js dist/eruda-polyfill.js",
|
||||
"setup": "lsla shx mkdir -p test/lib && lsla shx cp node_modules/jasmine-core/lib/jasmine-core/{jasmine.css,jasmine.js,jasmine-html.js,boot.js} test/lib && lsla shx cp node_modules/jasmine-jquery/lib/jasmine-jquery.js test/lib && lsla shx cp node_modules/jquery/dist/jquery.js test/lib",
|
||||
"genIcon": "lsla genIcon --input src/style/icon --output src/style/icon.css --name eruda-icon && prettier src/**/*.css --write"
|
||||
"genIcon": "lsla genIcon --input src/style/icon --output src/style/icon.css --name eruda-icon && lsla prettier src/**/*.css --write"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -62,10 +62,10 @@
|
||||
"karma-jquery": "^0.2.4",
|
||||
"karma-sourcemap-loader": "^0.3.7",
|
||||
"karma-webpack": "^5.0.0",
|
||||
"licia": "^1.38.0",
|
||||
"licia": "^1.38.2",
|
||||
"luna-box-model": "^0.1.0",
|
||||
"luna-console": "^1.3.0",
|
||||
"luna-data-grid": "^0.4.3",
|
||||
"luna-console": "^1.3.3",
|
||||
"luna-data-grid": "^0.5.1",
|
||||
"luna-dom-viewer": "^1.2.3",
|
||||
"luna-modal": "^1.0.0",
|
||||
"luna-notification": "^0.1.4",
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
.resizer {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
touch-action: none;
|
||||
left: 0;
|
||||
top: -8px;
|
||||
cursor: row-resize;
|
||||
|
||||
@@ -101,6 +101,10 @@ export default class Detail extends Emitter {
|
||||
const detailData = this._detailData
|
||||
|
||||
let data = `${detailData.method} ${detailData.url} ${detailData.status}\n`
|
||||
if (!isEmpty(detailData.data)) {
|
||||
data += '\nRequest Data\n\n'
|
||||
data += `${detailData.data}\n`
|
||||
}
|
||||
if (!isEmpty(detailData.reqHeaders)) {
|
||||
data += '\nRequest Headers\n\n'
|
||||
each(detailData.reqHeaders, (val, key) => (data += `${key}: ${val}\n`))
|
||||
|
||||
@@ -4,6 +4,7 @@ import $ from 'licia/$'
|
||||
import each from 'licia/each'
|
||||
import escape from 'licia/escape'
|
||||
import map from 'licia/map'
|
||||
import remove from 'licia/remove'
|
||||
import evalCss from '../lib/evalCss'
|
||||
import { classPrefix as c } from '../lib/util'
|
||||
|
||||
@@ -36,11 +37,7 @@ export default class Snippets extends Tool {
|
||||
return this
|
||||
}
|
||||
remove(name) {
|
||||
const snippets = this._snippets
|
||||
|
||||
for (let i = 0, len = snippets.length; i < len; i++) {
|
||||
if (snippets[i].name === name) snippets.splice(i, 1)
|
||||
}
|
||||
remove(this._snippets, (snippet) => snippet.name === name)
|
||||
|
||||
this._render()
|
||||
|
||||
|
||||
@@ -151,6 +151,7 @@ function processClass(str) {
|
||||
}
|
||||
|
||||
const hasTouchSupport = 'ontouchstart' in root
|
||||
const hasPointerSupport = 'PointerEvent' in root
|
||||
const touchEvents = {
|
||||
start: 'touchstart',
|
||||
move: 'touchmove',
|
||||
@@ -161,8 +162,17 @@ const mouseEvents = {
|
||||
move: 'mousemove',
|
||||
end: 'mouseup',
|
||||
}
|
||||
const pointerEvents = {
|
||||
start: 'pointerdown',
|
||||
move: 'pointermove',
|
||||
end: 'pointerup',
|
||||
}
|
||||
|
||||
export function drag(name) {
|
||||
if (hasPointerSupport) {
|
||||
return pointerEvents[name]
|
||||
}
|
||||
|
||||
return hasTouchSupport ? touchEvents[name] : mouseEvents[name]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user