jitsi-hacks icon indicating copy to clipboard operation
jitsi-hacks copied to clipboard

How to add it to a server?

Open timowevel1 opened this issue 5 years ago • 4 comments

Hey!

First thank you for those amazing hacks. I especially love the emoji one and wondered how to add it to an existing jitsi server so everyone can use them. Can you help me there?

Thanks!

timowevel1 avatar Dec 05 '20 11:12 timowevel1

Replace all occurrences of jitsi.example.com with your Jitsi host name.

  1. Create the directory /usr/share/jitsi-hacks/emoji-reaction
  2. Download the following files and save them to the newly created directory:
    • https://jitsi-hacks.cketti.eu/emoji-reaction.js
    • https://jitsi-hacks.cketti.eu/thumbs_up.png
    • https://jitsi-hacks.cketti.eu/thumbs_down.png
    • https://jitsi-hacks.cketti.eu/zipper_mouth_face.png
    • https://jitsi-hacks.cketti.eu/raising_hands.png
    • https://jitsi-hacks.cketti.eu/hourglass.png
    • https://jitsi-hacks.cketti.eu/framed_picture.png
    • https://jitsi-hacks.cketti.eu/clapping_hands.png
    • https://jitsi-hacks.cketti.eu/waving_hand.png
  3. Edit /usr/share/jitsi-hacks/emoji-reaction/emoji-reaction.js and replace
    const emojiBaseUrl = 'https://jitsi-hacks.cketti.eu/';
    
    with
    const emojiBaseUrl = 'https://jitsi.example.com/jitsi-hacks/emoji-reaction/';
    
  4. Edit your web server configuration and point the web path /jitsi-hacks/ to the directory /usr/share/jitsi-hacks/. E.g. for Apache add the following to /etc/apache2/sites-available/jitsi.example.com.conf:
    Alias "/jitsi-hacks/" "/usr/share/jitsi-hacks/"
    <Location /jitsi-hacks/>
      Require all granted
    </Location>
    
  5. Reload your webserver and make sure the JavaScript file and the images are available under e.g. https://jitsi.example.com/jitsi-hacks/emoji-reaction/emoji-reaction.js
  6. To load the script in Jitsi Meet edit /etc/jitsi/meet/jitsi.example.com-config.js and add the following lines at the top (or bottom; shouldn't really matter):
    function addScript(src) {
        const script = document.createElement('script');
        script.setAttribute('src', src);
        document.body.appendChild(script);
    }
    
    window.addEventListener('DOMContentLoaded', function() {
        addScript('/jitsi-hacks/emoji-reaction/emoji-reaction.js');
    });
    
    Note: This config file is loaded by clients other than the Jitsi Meet web app. I don't know if they can deal with the modification. Maybe you'll have to find another way to inject the script.
  7. Reload Jitsi Meet in your browser. You should now be good to go.

cketti avatar Dec 05 '20 18:12 cketti

Thank you so much!


From: cketti [email protected] Sent: Saturday, December 5, 2020 7:35:48 PM To: cketti/jitsi-hacks [email protected] Cc: timololipop [email protected]; Author [email protected] Subject: Re: [cketti/jitsi-hacks] How to add it to a server? (#3)

Replace all occurrences of jitsi.example.com with your Jitsi host name.

  1. Create the directory /usr/share/jitsi-hacks/emoji-reaction
  2. Download the following files and save them to the newly created directory: * https://jitsi-hacks.cketti.eu/emoji-reaction.js * https://jitsi-hacks.cketti.eu/thumbs_up.png * https://jitsi-hacks.cketti.eu/thumbs_down.png * https://jitsi-hacks.cketti.eu/zipper_mouth_face.png * https://jitsi-hacks.cketti.eu/raising_hands.png * https://jitsi-hacks.cketti.eu/hourglass.png * https://jitsi-hacks.cketti.eu/framed_picture.png * https://jitsi-hacks.cketti.eu/clapping_hands.png * https://jitsi-hacks.cketti.eu/waving_hand.png
  3. Edit /usr/share/jitsi-hacks/emoji-reaction/emoji-reaction.js and replace

const emojiBaseUrl = 'https://jitsi-hacks.cketti.eu/';

with

const emojiBaseUrl = 'https://jitsi.example.com/jitsi-hacks/emoji-reaction/';

  1. Edit your web server configuration and point the web path /jitsi-hacks/ to the directory /usr/share/jitsi-hacks/. E.g. for Apache add the following to /etc/apache2/sites-available/jitsi.example.com.conf:

Alias "/jitsi-hacks/" "/usr/share/jitsi-hacks/" <Location /jitsi-hacks/> Require all granted </Location>

  1. Reload your webserver and make sure the JavaScript file and the images are available under e.g. https://jitsi.example.com/jitsi-hacks/emoji-reaction/emoji-reaction.js
  2. To load the script in Jitsi Meet edit /etc/jitsi/meet/jitsi.example.com-config.js and add the following lines at the top (or bottom; shouldn't really matter):

function addScript(src) { const script = document.createElement('script'); script.setAttribute('src', src); document.body.appendChild(script); }

window.addEventListener('DOMContentLoaded', function() { addScript('/jitsi-hacks/emoji-reaction/emoji-reaction.js'); });

Note: This config file is loaded by clients other than the Jitsi Meet web app. I don't know if they can deal with the modification. Maybe you'll have to find another way to inject the script. 7. Reload Jitsi Meet in your browser. You should now be good to go.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/cketti/jitsi-hacks/issues/3#issuecomment-739332293, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGA5FLYCNLQRNLSFX47KI3TSTJ4QJANCNFSM4UOPMUNQ.

timowevel1 avatar Dec 05 '20 19:12 timowevel1

This doesn't work anymore :(

0xnor0 avatar Apr 21 '21 18:04 0xnor0

"This doesn't work anymore" is not a very useful error description. If it's because the Jitsi Meet web user interface has changed, see https://jitsi-hacks.cketti.eu/2021/04/26/updates-to-support-new-jitsi-ui/

cketti avatar Apr 27 '21 12:04 cketti