diff options
author | Sacha Chua <sacha@sachachua.com> | 2024-11-28 14:25:47 -0500 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2024-11-28 14:25:47 -0500 |
commit | 0db62fffd9fa0c10cad508db70aeaa19bbf8217e (patch) | |
tree | 2659b6be6641d20c5097c23b8ee68265182126aa /README.org | |
parent | f4083224e1da8a5a5abe7751e2a5df587290c5f7 (diff) | |
download | emacsconf-ansible-0db62fffd9fa0c10cad508db70aeaa19bbf8217e.tar.xz emacsconf-ansible-0db62fffd9fa0c10cad508db70aeaa19bbf8217e.zip |
update tampermonkey script for Greenlight v3
Diffstat (limited to 'README.org')
-rw-r--r-- | README.org | 45 |
1 files changed, 35 insertions, 10 deletions
@@ -114,6 +114,7 @@ ssh ikiwiki@localhost -p 2222 ikiwiki --setup /home/ikiwiki/emacsconf.setup -v 3. Export the talks.json with =M-x emacsconf-ansible-export-talks=. 4. ansible-playbook -i inventory.yml prod-playbook.yml --tags prerec 5. ansible-playbook -i inventory.yml prod-playbook.yml --tags caption +6. ansible-playbook -i inventory.yml local-playbook.yml When you receive a file, create a directory for it named =~/current/files/$slug=. Copy the uploaded file as =$video_slug--original.$extension=, or use =rename-original.sh $slug $file=. @@ -302,9 +303,9 @@ For each track: // ==UserScript== // @name Emacsconf BBB setup // @namespace https://emacsconf.org/ - // @version 0.1 + // @version 0.2 // @description Join BBB and set things up - // @author You + // @author Sacha Chua // @match https://bbb.emacsverse.org/* // @icon https://www.google.com/s2/favicons?sz=64&domain=emacsverse.org // @grant none @@ -332,14 +333,34 @@ For each track: }, interval); }); } - if (document.querySelector('input.join-form')) { - document.querySelector('input.join-form').value = NAME; - document.querySelector('#room-join').click(); - return; - } - await waitUntil(() => document.querySelector('.icon-bbb-listen')).then((e) => e.closest('button').click()); - await waitUntil(() => document.querySelector('.icon-bbb-user')).then((e) => e.closest('button').click()); - })(); + // https://stackoverflow.com/questions/66536154/changing-input-text-of-a-react-app-using-javascript + function setNativeValue(element, value) { + const valueSetter = Object.getOwnPropertyDescriptor(element, 'value').set; + const prototype = Object.getPrototypeOf(element); + const prototypeValueSetter = Object.getOwnPropertyDescriptor(prototype, 'value').set; + + if (valueSetter && valueSetter !== prototypeValueSetter) { + prototypeValueSetter.call(element, value); + } else { + valueSetter.call(element, value); + } + } + setTimeout(function() { + if (document.querySelector('input#joinFormName')) { + setNativeValue(document.querySelector('input#joinFormName'), NAME); + document.querySelector('input#joinFormName').dispatchEvent(new Event('input', { bubbles: true })); + document.querySelector('input#consentCheck').click() + document.querySelector('button[type="submit"]').click(); + return; + } + if (document.querySelector('.icon-bbb-listen')) { + document.querySelector('.icon-bbb-listen').closest('button').click(); + } + if (document.querySelector('.icon-bbb-user')) { + document.querySelector('.icon-bbb-user').closest('button').click(); + } + }, 2000); + })(); #+end_src Press =Ctrl+s= to save. @@ -380,6 +401,8 @@ ansible-playbook -i inventory.yml prod-playbook.yml --tags obs-scene * Media ansible-playbook -i inventory.yml prod-playbook.yml --tags media + + * Captioning Set up whisper: @@ -438,3 +461,5 @@ restreaming_platforms: #+end_src It doesn't get automatically started, so you'll also need to call ~screen -S restream-$TRACK_ID-youtube~ and ~screen -S restream-$TRACK_ID-toobnix~. +* BBB +ansible-playbook -i inventory.yml prod-playbook.yml --tags bbb |