Skip to content

Instantly share code, notes, and snippets.

@VinSpee
Created June 8, 2018 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save VinSpee/5927f736ed40a77b7b95cd874bd0b823 to your computer and use it in GitHub Desktop.
Save VinSpee/5927f736ed40a77b7b95cd874bd0b823 to your computer and use it in GitHub Desktop.
open in bluejeans app
// ==UserScript==
// @name BlueJeans Open In App
// @namespace https://vinspee.me
// @version 0.1
// @license MIT
// @description Open BlueJeans meetings in the app
// @author Vince Speelman <v@vinspee.me>
// @match *://bluejeans.com/*
// @grant window.close
// @require https://cdn.rawgit.com/agnoster/base32-js/91f43b82f19f467ade1270aa4b0e579b201d7efd/dist/base32.min.js
// ==/UserScript==
(function() {
'use strict';
const meetingIDFromURL = /^https?:\/\/bluejeans.com\/(\d+)\/?/; // sloppy but dumb and working
const url = window.location;
const meetingID = meetingIDFromURL.exec(url)[1]; // get the meeting ID from the URL
const context = {
ctxver: '1.0.0',
meeting_api: window.location.origin,
meeting_id: meetingID,
release_channel: 'live',
}; // set the params we'll pass to the app
const encodedContext = window.base32 && window.base32.encode(JSON.stringify(context)); // encode the options in a format BJ is ok with.
console.log({ meetingID });
const launchCommand = `bjnb://meeting/${encodedContext}?ctxver=${context.ctxver}`; // build the app link
window.location = launchCommand; // redirect to the app link
setTimeout(() => window.close(), 500); //close the bluejeans tab
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment