Skip to content

Commit

Permalink
Support different authentication mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jacopo-j committed May 24, 2021
1 parent a27afff commit aee4b27
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions src/content.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
const REGEX = /^https?:\/\/(.+?)\.webex\.com\/(?:recordingservice|webappng)\/sites\/(.+?)\/.*([a-f0-9]{32})/g;
const REGEX = /^https?:\/\/(.+?)\.webex\.com\/(?:recordingservice|webappng)\/sites\/([^\/]+)\/.*?([a-f0-9]{32})(.*)/g;
const MATCH = REGEX.exec(location.href);
const SUBDOMAIN = MATCH[1];
const SITENAME = MATCH[2];
const RECORDING_ID = MATCH[3];
const API_URL = `https://${SUBDOMAIN}.webex.com/webappng/api/v1/recordings/${RECORDING_ID}/stream?siteurl=${SITENAME}`;
const AUTH_PARAMS = MATCH[4];
var API_URL = `https://${SUBDOMAIN}.webex.com/webappng/api/v1/recordings/${RECORDING_ID}/stream`;
var PASSWORD;
var API_RESPONSE = -1;

if (AUTH_PARAMS) {
API_URL += AUTH_PARAMS;
}

var observer = new MutationObserver(function(mutations) {
if (document.getElementsByClassName('buttonRightContainer').length) { // wait for this

Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"description": "Enables downloading of Webex meeting recordings",
"version": "1.2",
"version": "1.2.1",
"permissions": [
"storage",
"tabs",
Expand Down
2 changes: 1 addition & 1 deletion src/popup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const REGEX = /^https?:\/\/(.+?)\.webex\.com\/(?:recordingservice|webappng)\/sites\/(.+?)\/.*([a-f0-9]{32})/g;
const REGEX = /^https?:\/\/(.+?)\.webex\.com\/(?:recordingservice|webappng)\/sites\/([^\/]+)\/.*?([a-f0-9]{32})/g;

function copyLink() {
let text = document.getElementById("content");
Expand Down

0 comments on commit aee4b27

Please sign in to comment.