query string poc
This commit is contained in:
parent
744a09f1f4
commit
5ad0c547d7
1 changed files with 5 additions and 1 deletions
|
|
@ -20,7 +20,10 @@ var allowreauth = false
|
||||||
var sessionLog, sessionFooter, logDate, currentDate, myFile, errorExists
|
var sessionLog, sessionFooter, logDate, currentDate, myFile, errorExists
|
||||||
var termid // eslint-disable-line
|
var termid // eslint-disable-line
|
||||||
// change path here and in the /app/server/app.js line 115
|
// change path here and in the /app/server/app.js line 115
|
||||||
var socket = io({ path: '/ssh/socket.io' })
|
|
||||||
|
var resource = window.location.search
|
||||||
|
var c_query = resource.substring(1)
|
||||||
|
var socket = io({ path: '/ssh/socket.io', query: c_query })
|
||||||
var term = new Terminal()
|
var term = new Terminal()
|
||||||
const fitAddon = new FitAddon()
|
const fitAddon = new FitAddon()
|
||||||
// DOM properties
|
// DOM properties
|
||||||
|
|
@ -35,6 +38,7 @@ term.focus()
|
||||||
fitAddon.fit()
|
fitAddon.fit()
|
||||||
window.addEventListener('resize', resizeScreen, false)
|
window.addEventListener('resize', resizeScreen, false)
|
||||||
|
|
||||||
|
|
||||||
function resizeScreen () {
|
function resizeScreen () {
|
||||||
fitAddon.fit()
|
fitAddon.fit()
|
||||||
socket.emit('resize', { cols: term.cols, rows: term.rows })
|
socket.emit('resize', { cols: term.cols, rows: term.rows })
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue