3cx 20
This commit is contained in:
parent
505bab6d34
commit
d107b1a49f
@ -9,8 +9,8 @@ module.exports = {
|
|||||||
source: pkg.repository.url,
|
source: pkg.repository.url,
|
||||||
downloadURL: 'https://source.cp-austria.at/git/CPATRD/3cx_tapi/raw/branch/master/3CX_TAPI.user.js',
|
downloadURL: 'https://source.cp-austria.at/git/CPATRD/3cx_tapi/raw/branch/master/3CX_TAPI.user.js',
|
||||||
match: [
|
match: [
|
||||||
'https://192.168.0.154:5001/webclient*',
|
'https://192.168.0.154:5001/*',
|
||||||
'https://cpsolution.my3cx.at:5001/webclient*'
|
'https://cpsolution.my3cx.at:5001/*'
|
||||||
],
|
],
|
||||||
require: [
|
require: [
|
||||||
'https://cdn.jsdelivr.net/gh/CoeJoder/waitForKeyElements.js@v1.2/waitForKeyElements.js',
|
'https://cdn.jsdelivr.net/gh/CoeJoder/waitForKeyElements.js@v1.2/waitForKeyElements.js',
|
||||||
|
@ -33,9 +33,12 @@ export class Status {
|
|||||||
if (this._currentStatus !== status.loggedIn) {
|
if (this._currentStatus !== status.loggedIn) {
|
||||||
this._currentStatus = status.loggedIn;
|
this._currentStatus = status.loggedIn;
|
||||||
console.log('New status, loggedIn', this._currentStatus);
|
console.log('New status, loggedIn', this._currentStatus);
|
||||||
(document.getElementsByTagName("wcavatar")[0] as HTMLAnchorElement).click();
|
var accMenu = document.getElementsByTagName("wc-account-menu")[0];
|
||||||
|
var avatar = accMenu.getElementsByTagName("app-avatar")[0] as HTMLAnchorElement;
|
||||||
|
avatar.click();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
var statusId = this._currentStatus ? this._statusOn : this._statusOff;
|
var statusId = this._currentStatus ? this._statusOn : this._statusOff;
|
||||||
|
console.log('Clicking status', statusId);
|
||||||
(document.getElementById(statusId) as HTMLSpanElement).click();
|
(document.getElementById(statusId) as HTMLSpanElement).click();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
@ -70,7 +73,7 @@ export class Status {
|
|||||||
'<div role="document" class="modal-dialog">' +
|
'<div role="document" class="modal-dialog">' +
|
||||||
' <div class="modal-content">' +
|
' <div class="modal-content">' +
|
||||||
' <div class="modal-header">' +
|
' <div class="modal-header">' +
|
||||||
' <h4 class="modal-title float-left">ZeitConsens Status</h4><button id="zc-btnClose" type="button" aria-label="Close" class="close float-right"><span aria-hidden="true">×</span></button>' +
|
' <h4 class="modal-title">ZeitConsens Status</h4><button id="zc-btnClose" type="button" aria-label="Close" class="btn-close" data-qa="modal-cross"></button>' +
|
||||||
' </div>' +
|
' </div>' +
|
||||||
' <div class="modal-body">' +
|
' <div class="modal-body">' +
|
||||||
' <div class="form-group">' +
|
' <div class="form-group">' +
|
||||||
@ -96,13 +99,13 @@ export class Status {
|
|||||||
' <label class="i-checks" for="tapi-zc-enabled">' +
|
' <label class="i-checks" for="tapi-zc-enabled">' +
|
||||||
' <input type="checkbox" id="tapi-zc-enabled">' +
|
' <input type="checkbox" id="tapi-zc-enabled">' +
|
||||||
' <i></i><span>Enabled</span>' +
|
' <i></i><span>Enabled</span>' +
|
||||||
' </label>'
|
' </label>' +
|
||||||
' </div>';
|
' </div>' +
|
||||||
' </div>' +
|
|
||||||
' <div class="modal-footer">' +
|
|
||||||
' <button id="zc-btnOk" type="button" class="btn btn-primary">OK </button>' +
|
|
||||||
' <button id="zc-btnCancel" type="button" class="btn btn-light">Cancel </button>' +
|
|
||||||
' </div>' +
|
' </div>' +
|
||||||
|
//' <div class="modal-footer">' +
|
||||||
|
//' <button id="zc-btnOk" type="button" class="btn btn-primary" data-qa="modal-ok">OK </button>' +
|
||||||
|
//' <button id="zc-btnCancel" type="button" class="btn btn-border" data-qa="modal-close">Cancel </button>' +
|
||||||
|
//' </div>' +
|
||||||
' </div>' +
|
' </div>' +
|
||||||
'</div>';
|
'</div>';
|
||||||
var modal = document.createElement('modal-container');
|
var modal = document.createElement('modal-container');
|
||||||
@ -110,7 +113,7 @@ export class Status {
|
|||||||
modal.classList.add('modal');
|
modal.classList.add('modal');
|
||||||
modal.classList.add('fade');
|
modal.classList.add('fade');
|
||||||
modal.innerHTML = html;
|
modal.innerHTML = html;
|
||||||
var body = document.getElementsByTagName('body')[0].appendChild(modal);
|
document.getElementsByTagName('body')[0].appendChild(modal);
|
||||||
|
|
||||||
var btnClose = document.getElementById('zc-btnClose');
|
var btnClose = document.getElementById('zc-btnClose');
|
||||||
btnClose.onclick = () => {
|
btnClose.onclick = () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user