Skip to content

Commit cb4b0cd

Browse files
committed
merge with devel
2 parents 2ab19f5 + 13974b9 commit cb4b0cd

9 files changed

+58
-50
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.33.2
2+
### Bugfix
3+
* fix scroll to bottom [#777](https://github.com/jcubic/jquery.terminal/issues/777)
4+
15
## 2.33.1
26
### Bugfix
37
* fix padding removed by minifier

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
__ / / // / // / _ / _/ // / / / _ / _/ / / \/ / _ \/ /
55
/ / / // / // / ___/ // // / / / ___/ // / / / / /\ / // / /__
66
\___/____ \\__/____/_/ \__ / /_/____/_//_/_/_/_/_/ \/\__\_\___/
7-
\/ /____/ version 2.33.1
7+
\/ /____/ version DEV
88
```
99

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

12-
[![npm](https://img.shields.io/badge/npm-2.33.1-blue.svg)](https://www.npmjs.com/package/jquery.terminal)
13-
![bower](https://img.shields.io/badge/bower-2.33.1-yellow.svg)
14-
[![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)
15-
[![Coverage Status](https://coveralls.io/repos/github/jcubic/jquery.terminal/badge.svg?branch=master&c26faa3511e82bd2d51060e7a0bab729)](https://coveralls.io/github/jcubic/jquery.terminal?branch=master)
12+
[![npm](https://img.shields.io/badge/npm-DEV-blue.svg)](https://www.npmjs.com/package/jquery.terminal)
13+
![bower](https://img.shields.io/badge/bower-DEV-yellow.svg)
14+
[![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)
15+
[![Coverage Status](https://coveralls.io/repos/github/jcubic/jquery.terminal/badge.svg?branch=devel&d6690de257147887b9c38f73c9cdd577)](https://coveralls.io/github/jcubic/jquery.terminal?branch=devel)
1616
![downloads](https://img.shields.io/npm/dm/jquery.terminal.svg?style=flat)
1717
[![Paid Support](https://data.jsdelivr.com/v1/package/npm/jquery.terminal/badge?style=rounded)](https://www.jsdelivr.com/package/npm/jquery.terminal)
1818
[![](https://img.shields.io/badge/paid-support-354465.svg)](https://support.jcubic.pl/)
@@ -91,7 +91,7 @@ You can test current version at this URL:
9191

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

94-
* [https://jcubic.github.io/jquery.terminal/?ver=2.33.1](https://jcubic.github.io/jquery.terminal/?ver=2.33.1)
94+
* [https://jcubic.github.io/jquery.terminal/?ver=DEV](https://jcubic.github.io/jquery.terminal/?ver=DEV)
9595

9696
And development version using:
9797

@@ -109,20 +109,20 @@ Include jQuery library, you can use cdn from https://jquery.com/download/
109109

110110
```
111111

112-
Then include js/jquery.terminal-2.33.1.min.js and css/jquery.terminal-2.33.1.min.css
112+
Then include js/jquery.terminal-DEV.min.js and css/jquery.terminal-DEV.min.css
113113

114114
You can grab the files from CDN:
115115

116116
```html
117-
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/2.33.1/js/jquery.terminal.min.js"></script>
118-
<link href="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/2.33.1/css/jquery.terminal.min.css" rel="stylesheet"/>
117+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/DEV/js/jquery.terminal.min.js"></script>
118+
<link href="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/DEV/css/jquery.terminal.min.css" rel="stylesheet"/>
119119
```
120120

121121
or
122122

123123
```html
124-
<script src="https://cdn.jsdelivr.net/npm/jquery.terminal@2.33.1/js/jquery.terminal.min.js"></script>
125-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jquery.terminal@2.33.1/css/jquery.terminal.min.css">
124+
<script src="https://cdn.jsdelivr.net/npm/jquery.terminal@DEV/js/jquery.terminal.min.js"></script>
125+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jquery.terminal@DEV/css/jquery.terminal.min.css">
126126
```
127127

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

__tests__/terminal.spec.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6383,15 +6383,16 @@ describe('Terminal plugin', function() {
63836383
height: 100,
63846384
numRows: 10
63856385
});
6386+
var scroller = term.find('.terminal-scroller');
63866387
it('should change scrollTop', function() {
63876388
for (var i = 0; i < 20; i++) {
63886389
term.echo('text ' + i);
63896390
}
6390-
var pos = term.prop('scrollTop');
6391+
var pos = scroller.prop('scrollTop');
63916392
term.scroll(10);
6392-
expect(term.prop('scrollTop')).toEqual(pos + 10);
6393+
expect(scroller.prop('scrollTop')).toEqual(pos + 10);
63936394
term.scroll(-10);
6394-
expect(term.prop('scrollTop')).toEqual(pos);
6395+
expect(scroller.prop('scrollTop')).toEqual(pos);
63956396
});
63966397
});
63976398
describe('logout/token', function() {

js/jquery.terminal-2.33.1.js

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ /
55
* / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__
66
* \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/
7-
* \/ /____/ version 2.33.1
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: Thu, 05 May 2022 17:12:32 +0000
44+
* Date: Fri, 13 May 2022 10:17:36 +0000
4545
*/
4646
/* global define, Map */
4747
/* eslint-disable */
@@ -5194,8 +5194,8 @@
51945194
}
51955195
// -------------------------------------------------------------------------
51965196
$.terminal = {
5197-
version: '2.33.1',
5198-
date: 'Thu, 05 May 2022 17:12:32 +0000',
5197+
version: 'DEV',
5198+
date: 'Fri, 13 May 2022 10:17:36 +0000',
51995199
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
52005200
color_names: [
52015201
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
@@ -11096,17 +11096,18 @@
1109611096
// :: ref: https://stackoverflow.com/a/18927969/387194
1109711097
// -------------------------------------------------------------
1109811098
scroll_to: function(elem) {
11099-
var scroll = self.scrollTop() - self.offset().top + $(elem).offset().top;
11100-
self.scrollTop(scroll);
11099+
var scroll = scroller.scrollTop() - self.offset().top +
11100+
$(elem).offset().top;
11101+
scroller.scrollTop(scroll);
1110111102
return self;
1110211103
},
1110311104
// -------------------------------------------------------------
1110411105
scroll_to_bottom: function() {
1110511106
var scrollHeight;
1110611107
if (self.prop) {
11107-
scrollHeight = self.prop('scrollHeight');
11108+
scrollHeight = scroller.prop('scrollHeight');
1110811109
} else {
11109-
scrollHeight = self.attr('scrollHeight');
11110+
scrollHeight = scroller.attr('scrollHeight');
1111011111
}
1111111112
scroller.scrollTop(scrollHeight);
1111211113
return self;
@@ -11122,9 +11123,9 @@
1112211123
return is_bottom_detected;
1112311124
} else {
1112411125
var scroll_height, scroll_top, height;
11125-
scroll_height = self[0].scrollHeight;
11126-
scroll_top = self[0].scrollTop;
11127-
height = self[0].offsetHeight;
11126+
scroll_height = scroller[0].scrollHeight;
11127+
scroll_top = scroller[0].scrollTop;
11128+
height = scroller[0].offsetHeight;
1112811129
var limit = scroll_height - settings.scrollBottomOffset;
1112911130
return scroll_top + height > limit;
1113011131
}

js/jquery.terminal-2.33.1.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/jquery.terminal-src.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11096,17 +11096,18 @@
1109611096
// :: ref: https://stackoverflow.com/a/18927969/387194
1109711097
// -------------------------------------------------------------
1109811098
scroll_to: function(elem) {
11099-
var scroll = self.scrollTop() - self.offset().top + $(elem).offset().top;
11100-
self.scrollTop(scroll);
11099+
var scroll = scroller.scrollTop() - self.offset().top +
11100+
$(elem).offset().top;
11101+
scroller.scrollTop(scroll);
1110111102
return self;
1110211103
},
1110311104
// -------------------------------------------------------------
1110411105
scroll_to_bottom: function() {
1110511106
var scrollHeight;
1110611107
if (self.prop) {
11107-
scrollHeight = self.prop('scrollHeight');
11108+
scrollHeight = scroller.prop('scrollHeight');
1110811109
} else {
11109-
scrollHeight = self.attr('scrollHeight');
11110+
scrollHeight = scroller.attr('scrollHeight');
1111011111
}
1111111112
scroller.scrollTop(scrollHeight);
1111211113
return self;
@@ -11122,9 +11123,9 @@
1112211123
return is_bottom_detected;
1112311124
} else {
1112411125
var scroll_height, scroll_top, height;
11125-
scroll_height = self[0].scrollHeight;
11126-
scroll_top = self[0].scrollTop;
11127-
height = self[0].offsetHeight;
11126+
scroll_height = scroller[0].scrollHeight;
11127+
scroll_top = scroller[0].scrollTop;
11128+
height = scroller[0].offsetHeight;
1112811129
var limit = scroll_height - settings.scrollBottomOffset;
1112911130
return scroll_top + height > limit;
1113011131
}

js/jquery.terminal.js

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ /
55
* / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__
66
* \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/
7-
* \/ /____/ version 2.33.1
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: Thu, 05 May 2022 17:12:32 +0000
44+
* Date: Fri, 13 May 2022 10:17:36 +0000
4545
*/
4646
/* global define, Map */
4747
/* eslint-disable */
@@ -5194,8 +5194,8 @@
51945194
}
51955195
// -------------------------------------------------------------------------
51965196
$.terminal = {
5197-
version: '2.33.1',
5198-
date: 'Thu, 05 May 2022 17:12:32 +0000',
5197+
version: 'DEV',
5198+
date: 'Fri, 13 May 2022 10:17:36 +0000',
51995199
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
52005200
color_names: [
52015201
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
@@ -11096,17 +11096,18 @@
1109611096
// :: ref: https://stackoverflow.com/a/18927969/387194
1109711097
// -------------------------------------------------------------
1109811098
scroll_to: function(elem) {
11099-
var scroll = self.scrollTop() - self.offset().top + $(elem).offset().top;
11100-
self.scrollTop(scroll);
11099+
var scroll = scroller.scrollTop() - self.offset().top +
11100+
$(elem).offset().top;
11101+
scroller.scrollTop(scroll);
1110111102
return self;
1110211103
},
1110311104
// -------------------------------------------------------------
1110411105
scroll_to_bottom: function() {
1110511106
var scrollHeight;
1110611107
if (self.prop) {
11107-
scrollHeight = self.prop('scrollHeight');
11108+
scrollHeight = scroller.prop('scrollHeight');
1110811109
} else {
11109-
scrollHeight = self.attr('scrollHeight');
11110+
scrollHeight = scroller.attr('scrollHeight');
1111011111
}
1111111112
scroller.scrollTop(scrollHeight);
1111211113
return self;
@@ -11122,9 +11123,9 @@
1112211123
return is_bottom_detected;
1112311124
} else {
1112411125
var scroll_height, scroll_top, height;
11125-
scroll_height = self[0].scrollHeight;
11126-
scroll_top = self[0].scrollTop;
11127-
height = self[0].offsetHeight;
11126+
scroll_height = scroller[0].scrollHeight;
11127+
scroll_top = scroller[0].scrollTop;
11128+
height = scroller[0].offsetHeight;
1112811129
var limit = scroll_height - settings.scrollBottomOffset;
1112911130
return scroll_top + height > limit;
1113011131
}

js/jquery.terminal.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/jquery.terminal.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)