Created
November 10, 2020 01:34
-
-
Save dprado75/98b9ea7d791cbd44d5aa8188bc107ff6 to your computer and use it in GitHub Desktop.
Code snippet to add custom thumbnail to a Mozilla Hubs link (works for Hubs Cloud too)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//method 1 - faster | |
//host this webpage on your server, Heroku or any other host | |
//paste your link to a Hubs Page using the format: | |
//https://yourserver.com/yourpath/link.php?img=https://yourserver.com/yourpath/yourimage.jpgorpng&url=https://anyotherserver.com/finallink | |
//this will trick Hubs to capture a snapshot of the image "img", so keep it in the 16:9 ratio for instance 1280x720 | |
?> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
function newLocation() { | |
const queryString = window.location.search; | |
const urlParams = new URLSearchParams(queryString); | |
window.location.href = urlParams.get('url'); | |
} | |
</script> | |
</head> | |
<body onload="setTimeout(newLocation, 3000)"> | |
<img src="<?= $_GET['img'] ?>" alt="" style="width:100%;" /> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This code is to customize your Mozilla Hubs environment
Microsoft Sleep issue FIX as featured in the Linus Tech Tips
if you are looking for the Autohotkey code for the sleep / hibernate fix, follow this link - https://gist.github.com/dprado75/eb317ebca12d5fea1663645039c0b6d9