Skip to content

Commit 4735d6c

Browse files
committed
fix lint errors
1 parent eae60c1 commit 4735d6c

15 files changed

+121
-59
lines changed

Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ eslint:
114114
$(ESLINT) js/pipe.js
115115
$(ESLINT) js/autocomplete_menu.js
116116
$(ESLINT) js/echo_newline.js
117-
$(ESLINT) js/forms.js
118-
$(ESLINT) js/animation.js
119117

120118
skipped_tests:
121119
@! grep -E $(skip_re) __tests__/terminal.spec.js

README.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<h1 align="center">
2-
<img src="https://github.com/jcubic/jquery.terminal/blob/master/assets/ascii_art.svg?raw=true&ver=2.39.0"
2+
<img src="https://github.com/jcubic/jquery.terminal/blob/devel/assets/ascii_art.svg?raw=true&ver=DEV"
33
alt="ASCII Art that represent text jQuery Terminal - JavaScript Library for Web Based Terminal Emulators" />
44
</h1>
55

66
[JavaScript Library for Web Based Terminal Emulators](https://terminal.jcubic.pl)
77

8-
[![npm](https://img.shields.io/badge/npm-2.39.0-blue.svg)](https://www.npmjs.com/package/jquery.terminal)
9-
![bower](https://img.shields.io/badge/bower-2.39.0-yellow.svg)
10-
[![Build and test](https://github.com/jcubic/jquery.terminal/actions/workflows/build.yaml/badge.svg?branch=master&event=push)](https://github.com/jcubic/jquery.terminal/actions/workflows/build.yaml)
11-
[![Coverage Status](https://coveralls.io/repos/github/jcubic/jquery.terminal/badge.svg?branch=master&998c1c8b8a57dd88c9cf5a40049e8bf2)](https://coveralls.io/github/jcubic/jquery.terminal?branch=master)
8+
[![npm](https://img.shields.io/badge/npm-DEV-blue.svg)](https://www.npmjs.com/package/jquery.terminal)
9+
![bower](https://img.shields.io/badge/bower-DEV-yellow.svg)
10+
[![Build and test](https://github.com/jcubic/jquery.terminal/actions/workflows/build.yaml/badge.svg?branch=devel&event=push)](https://github.com/jcubic/jquery.terminal/actions/workflows/build.yaml)
11+
[![Coverage Status](https://coveralls.io/repos/github/jcubic/jquery.terminal/badge.svg?branch=devel&998c1c8b8a57dd88c9cf5a40049e8bf2)](https://coveralls.io/github/jcubic/jquery.terminal?branch=devel)
1212
![NPM Downloads](https://img.shields.io/npm/dm/jquery.terminal.svg?style=flat)
1313
[![jsDelivr Downloads](https://data.jsdelivr.com/v1/package/npm/jquery.terminal/badge?style=rounded&n=1)](https://www.jsdelivr.com/package/npm/jquery.terminal)
1414
[![Paid Support](https://img.shields.io/badge/paid-support-354465.svg)](https://support.jcubic.pl/)
@@ -87,7 +87,7 @@ You can test current version at this URL:
8787

8888
or if it doesn't use latest version (because of jsDelivr cache) you can force it with this URL:
8989

90-
* [https://jcubic.github.io/jquery.terminal/?ver=2.39.0](https://jcubic.github.io/jquery.terminal/?ver=2.39.0)
90+
* [https://jcubic.github.io/jquery.terminal/?ver=DEV](https://jcubic.github.io/jquery.terminal/?ver=DEV)
9191

9292
And development version using:
9393

@@ -106,20 +106,20 @@ or use jsDelivr:
106106

107107
```
108108

109-
Then include js/jquery.terminal-2.39.0.min.js and css/jquery.terminal-2.39.0.min.css
109+
Then include js/jquery.terminal-DEV.min.js and css/jquery.terminal-DEV.min.css
110110

111111
You can grab the files from CDN:
112112

113113
```html
114-
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/2.39.0/js/jquery.terminal.min.js"></script>
115-
<link href="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/2.39.0/css/jquery.terminal.min.css" rel="stylesheet"/>
114+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/DEV/js/jquery.terminal.min.js"></script>
115+
<link href="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/DEV/css/jquery.terminal.min.css" rel="stylesheet"/>
116116
```
117117

118118
or
119119

120120
```html
121-
<script src="https://cdn.jsdelivr.net/npm/jquery.terminal@2.39.0/js/jquery.terminal.min.js"></script>
122-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jquery.terminal@2.39.0/css/jquery.terminal.min.css"/>
121+
<script src="https://cdn.jsdelivr.net/npm/jquery.terminal@DEV/js/jquery.terminal.min.js"></script>
122+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jquery.terminal@DEV/css/jquery.terminal.min.css"/>
123123
```
124124

125125
If you always want latest version, you can get it from [unpkg](https://unpkg.com/) without specifying version,

css/emoji.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/jquery.terminal-2.39.0.css

+8-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Copyright (c) 2011-2023 Jakub T. Jankiewicz <https://jcubic.pl/me>
1313
* Released under the MIT license
1414
*
15-
* Date: Sat, 02 Mar 2024 17:57:52 +0000
15+
* Date: Wed, 13 Mar 2024 13:11:10 +0000
1616
*/
1717
.terminal .terminal-output .format, .cmd .format,
1818
.cmd-prompt, .cmd-prompt div {
@@ -101,6 +101,11 @@ body.terminal, body.full-screen-terminal {
101101
body.full-screen-terminal .terminal {
102102
height: 100%;
103103
}
104+
body.full-screen-terminal {
105+
height: 100%;
106+
height: 100dvh;
107+
height: calc(var(--terminal-force-height) * 1px);
108+
}
104109
.terminal > div.terminal-fill {
105110
min-height: 100%;
106111
height: 100%;
@@ -1115,17 +1120,16 @@ terminal .terminal-output > div {
11151120
display: inline-block;
11161121
}
11171122
.cmd-editable {
1118-
position: absolute;
1123+
position: fixed;
11191124
top: 0;
1120-
top: calc(var(--terminal-y, var(--cmd-y, 0)) + var(--terminal-scroll, 0) * 1px);
11211125
right: 0;
11221126
left: 0;
11231127
bottom: 0;
1124-
bottom: calc(var(--terminal-scroll, 0) * -1px);
11251128
z-index: 500;
11261129
color: transparent;
11271130
background: transparent;
11281131
opacity: 0.01;
1132+
outline: 0px solid transparent;
11291133
}
11301134
/* Scrollbar */
11311135
.terminal-scroller::-webkit-scrollbar {

css/jquery.terminal-2.39.0.min.css

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/jquery.terminal.css

+8-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Copyright (c) 2011-2023 Jakub T. Jankiewicz <https://jcubic.pl/me>
1313
* Released under the MIT license
1414
*
15-
* Date: Sat, 02 Mar 2024 17:57:52 +0000
15+
* Date: Wed, 13 Mar 2024 13:11:10 +0000
1616
*/
1717
.terminal .terminal-output .format, .cmd .format,
1818
.cmd-prompt, .cmd-prompt div {
@@ -101,6 +101,11 @@ body.terminal, body.full-screen-terminal {
101101
body.full-screen-terminal .terminal {
102102
height: 100%;
103103
}
104+
body.full-screen-terminal {
105+
height: 100%;
106+
height: 100dvh;
107+
height: calc(var(--terminal-force-height) * 1px);
108+
}
104109
.terminal > div.terminal-fill {
105110
min-height: 100%;
106111
height: 100%;
@@ -1115,17 +1120,16 @@ terminal .terminal-output > div {
11151120
display: inline-block;
11161121
}
11171122
.cmd-editable {
1118-
position: absolute;
1123+
position: fixed;
11191124
top: 0;
1120-
top: calc(var(--terminal-y, var(--cmd-y, 0)) + var(--terminal-scroll, 0) * 1px);
11211125
right: 0;
11221126
left: 0;
11231127
bottom: 0;
1124-
bottom: calc(var(--terminal-scroll, 0) * -1px);
11251128
z-index: 500;
11261129
color: transparent;
11271130
background: transparent;
11281131
opacity: 0.01;
1132+
outline: 0px solid transparent;
11291133
}
11301134
/* Scrollbar */
11311135
.terminal-scroller::-webkit-scrollbar {

css/jquery.terminal.min.css

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/jquery.terminal.min.css.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/jquery.terminal-2.39.0.js

+39-10
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ /
55
* / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__
66
* \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/
7-
* \/ /____/ version 2.39.0
7+
* \/ /____/ version DEV
88
*
99
* This file is part of jQuery Terminal. https://terminal.jcubic.pl
1010
*
@@ -41,7 +41,7 @@
4141
*
4242
* broken image by Sophia Bai from the Noun Project (CC-BY)
4343
*
44-
* Date: Tue, 13 Feb 2024 21:18:12 +0000
44+
* Date: Wed, 13 Mar 2024 13:11:10 +0000
4545
*/
4646
/* global define, Map, BigInt */
4747
/* eslint-disable */
@@ -2368,7 +2368,9 @@
23682368
}
23692369
var tmp = command;
23702370
// fix scroll the page where there is no scrollbar
2371-
clip.$node.blur();
2371+
if (!is_mobile) {
2372+
clip.$node.blur();
2373+
}
23722374
history.reset();
23732375

23742376
// for next input event on firefox/android with google keyboard
@@ -2388,7 +2390,9 @@
23882390
}
23892391
self.set('');
23902392
clip.val('');
2391-
clip.$node.focus();
2393+
if (!is_mobile) {
2394+
clip.$node.focus();
2395+
}
23922396
return false;
23932397
},
23942398
'SHIFT+ENTER': function() {
@@ -5284,9 +5288,24 @@
52845288
}
52855289
}
52865290
// -------------------------------------------------------------------------
5291+
// :: handler to trigger when window change size. The most important
5292+
// :: is that it's triggers when virtual keyboard is toggled
5293+
// -------------------------------------------------------------------------
5294+
function on_height_change(callback) {
5295+
var height = window.visualViewport.height;
5296+
callback(height);
5297+
window.visualViewport.addEventListener('resize', function() {
5298+
var newHeight = window.visualViewport.height;
5299+
if (height !== newHeight) {
5300+
height = newHeight;
5301+
callback(height);
5302+
}
5303+
});
5304+
}
5305+
// -------------------------------------------------------------------------
52875306
$.terminal = {
5288-
version: '2.39.0',
5289-
date: 'Tue, 13 Feb 2024 21:18:12 +0000',
5307+
version: 'DEV',
5308+
date: 'Wed, 13 Mar 2024 13:11:10 +0000',
52905309
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
52915310
color_names: [
52925311
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
@@ -10070,7 +10089,7 @@
1007010089
// :: Return size of the terminal instance
1007110090
// -------------------------------------------------------------
1007210091
geometry: function() {
10073-
const padding = get_padding();
10092+
var padding = get_padding();
1007410093
return {
1007510094
terminal: {
1007610095
padding: {
@@ -10630,9 +10649,9 @@
1063010649
'--terminal-height': self.height(),
1063110650
'--terminal-x': offset.left - self_offset.left,
1063210651
'--terminal-y': offset.top - self_offset.top,
10633-
'--terminal-scroll': self.prop('scrollTop')
10652+
'--terminal-scroll': scroller.prop('scrollTop')
1063410653
});
10635-
if (enabled) {
10654+
if (enabled && !is_mobile) {
1063610655
// Firefox won't reflow the cursor automatically, so
1063710656
// hide it briefly then reshow it
1063810657
cmd_cursor.hide();
@@ -12021,6 +12040,9 @@
1202112040
if (!enabled) {
1202212041
clip.focus();
1202312042
self.focus();
12043+
setTimeout(function() {
12044+
self.scroll_to_bottom();
12045+
}, 100);
1202412046
} else {
1202512047
clip.blur();
1202612048
self.disable();
@@ -12031,6 +12053,13 @@
1203112053
start = null;
1203212054
});
1203312055
})();
12056+
if ('visualViewport' in window) {
12057+
on_height_change(function(height) {
12058+
css(document.documentElement, {
12059+
'--terminal-force-height': height
12060+
});
12061+
});
12062+
}
1203412063
} else {
1203512064
// work weird on mobile
1203612065
$win.on('focus.terminal_' + self.id(), focus_terminal).
@@ -12536,7 +12565,7 @@
1253612565
ret = settings.touchscroll(event, delta, self);
1253712566
}
1253812567
css(self[0], {
12539-
'--terminal-scroll': self.prop('scrollTop')
12568+
'--terminal-scroll': scroller.prop('scrollTop')
1254012569
});
1254112570
if (ret === true) {
1254212571
return;

js/jquery.terminal-2.39.0.min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/jquery.terminal-src.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10089,7 +10089,7 @@
1008910089
// :: Return size of the terminal instance
1009010090
// -------------------------------------------------------------
1009110091
geometry: function() {
10092-
const padding = get_padding();
10092+
var padding = get_padding();
1009310093
return {
1009410094
terminal: {
1009510095
padding: {

0 commit comments

Comments
 (0)