Fix WebEx

Improve WebEx Browser Events!

  1. // ==UserScript==
  2. // @name Fix WebEx
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description Improve WebEx Browser Events!
  6. // @author You
  7. // @match https://*.webex.com/ec3300/*
  8. // @grant GM_addStyle
  9. // @require https://cdn.jsdelivr.net/gh/jonlabelle/cookie-js@0164446481bebb3bb283024f3b1aea1fe80a9d9b/Cookie.min.js
  10. // @require https://cdnjs.cloudflare.com/ajax/libs/arrive/2.4.1/arrive.min.js
  11. // ==/UserScript==
  12. GM_addStyle ( `
  13. #dockdomid {
  14. opacity: 0;
  15. }
  16. #dockdomid:hover {
  17. opacity: 1;
  18. transition: opacity .1s ease-in-out .0s; } .share-header-message-CkhKQ {
  19. display: none;
  20. }
  21. button[aria-label="Event information"] {
  22. display: none;
  23. }
  24. ` );
  25.  
  26. (function() {
  27. 'use strict';
  28.  
  29. let firstName = "firstName";
  30. let lastName = "lastName";
  31. let email = "email";
  32.  
  33. window.onload = () => {
  34. document.getElementById("ec-btn-joinnow-thin-client").type = "submit";
  35. document.getElementById("_submit").remove();
  36. document.getElementsByName(firstName)[0].value = Cookie.get(firstName);
  37. document.getElementsByName(lastName)[0].value = Cookie.get(lastName);
  38. document.getElementsByName(email)[0].value = Cookie.get(email);
  39.  
  40. document.getElementsByName("JoinActionForm")[0].addEventListener("submit", (e) => {
  41. Cookie.set(firstName, document.getElementsByName(firstName)[0].value, { expires: 365, sameSite: 'Strict', secure: true });
  42. Cookie.set(lastName, document.getElementsByName(lastName)[0].value, { expires: 365, sameSite: 'Strict', secure: true });
  43. Cookie.set(email, document.getElementsByName(email)[0].value, { expires: 365, sameSite: 'Strict', secure: true });
  44. });
  45.  
  46. /*if (allfilled) {
  47. document.getElementsByName("JoinActionForm")[0].submit();
  48. }*/
  49. }
  50.  
  51. //Connect to Audio
  52. let audioSelector = 'button[aria-label="Audio"]';
  53. let connectSelector = 'button[datadoi="AUDIO:VOIP:MENU_AUDIO"]';
  54. let fullscreenSelector = 'button.fullscreen';
  55. document.arrive(audioSelector, function() {
  56. document.querySelector(audioSelector).click();
  57. });
  58. document.arrive(connectSelector, function() {
  59. setTimeout(function () { //wait for connection
  60. document.querySelector(connectSelector).click();
  61. if (window.getComputedStyle(document.querySelector('.share-share-box-5GNZl')).display != "none") { //is screen shared?
  62. document.querySelector(fullscreenSelector).click();
  63. }
  64. }, 2000);
  65. Arrive.unbindAllArrive(); //free up memory
  66. });
  67.  
  68.  
  69. })();