August 20, 2020 Add-ons Show & Tell

Hi all! The next add-ons show & tell is August 20, 2020 2:30 PM. Share your awesome add-ons related projects with a warm and supportive group!

Sign-ups and call-in information are available on the agenda.

This meeting will be streamed on Air Mozilla.

While watching today’s show & tell I wrote a user-script that allows you to Play/Pause the video (in Mozilla Air) with double click :slight_smile:
Enjoy!

// ==UserScript==
// @name         Mozilla Air, double-click to Play / Pause
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Play / Pause with click on video
// @author       Juraj M.
// @match        https://onlinexperiences.com/*
// @grant        none
// ==/UserScript==

(async () => {
  'use strict';
  const timeoutPromise = delay => new Promise(resolve => setTimeout(resolve, delay));

  async function getNode() {
    while (true) {
      const video = document.querySelector('video');
      if (video) return video;
      await timeoutPromise(900);
    }
  }

  const video = await getNode();

  window.addEventListener('dblclick', e => video.paused ? video.play() : video.pause());
})();

Also, any plans for changing the “onlinexperiences.com” (whatever that is) to something more user friendly? Or maybe upgrading the page so that it contains anchor links, updates adressbar url, doesn’t open pop-ups, and gets faster? :slight_smile:.