Skip to content

Instantly share code, notes, and snippets.

@jonalter
Last active December 23, 2021 15:43
Show Gist options
  • Save jonalter/1eca2b1b41a792fc2c6862861f487f98 to your computer and use it in GitHub Desktop.
Save jonalter/1eca2b1b41a792fc2c6862861f487f98 to your computer and use it in GitHub Desktop.
Allow selecting videos as your background in google meet - Use with Tampermonkey
// ==UserScript==
// @name Google Meet Video Background
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Allow selecting videos as your background
// @author jonalter
// @match https://meet.google.com/*
// @icon https://www.google.com/s2/favicons?domain=google.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
// document.getElementsByTagName("input")[0].accept = "video/*, image/*";
var id = setInterval(changeAcceptedFileTypes, 3000);
function changeAcceptedFileTypes() {
console.log("Checking for input tags");
var inputs = document.getElementsByTagName("input");
if (inputs.length > 0) {
console.log("Changing input tag accepted files types");
for (var i = 0; i < inputs.length; i++) {
inputs[i].accept = "video/*, image/*";
}
clearInterval(id);
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment