mirror of
https://github.com/itsdave-de/dockercompose-guacamole-for-msp-remoteadmin.git
synced 2025-12-17 23:53:08 -03:00
init repo
This commit is contained in:
25
docker-guacamole-custom/files/inject-trigger.sh
Executable file
25
docker-guacamole-custom/files/inject-trigger.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f /home/guacamole/tomcat/webapps/guacamole/templates.js ]; then
|
||||
cat <<EOF >> /home/guacamole/tomcat/webapps/guacamole/templates.js
|
||||
\$(window).on('load', function() {
|
||||
function getHashParam(param) {
|
||||
var hash = window.location.hash.substr(1);
|
||||
var hashParams = new URLSearchParams(hash.split('?')[1]);
|
||||
return hashParams.get(param);
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
var quickconnectValue = getHashParam('quickconnect');
|
||||
if (quickconnectValue) {
|
||||
var \$field = \$('.quickconnect-field');
|
||||
\$field.val(quickconnectValue);
|
||||
\$field.trigger('input');
|
||||
\$field.trigger('change');
|
||||
\$('.quickconnect-button').click();
|
||||
}
|
||||
}, 500);
|
||||
});
|
||||
EOF
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user