- Enables Chromecast support for casting web apps (like Netflix, YouTube or BBC iPlayer), HTML5 video and screen/tab sharing. + Enables Chromecast support for casting web apps (like Netflix, YouTube or BBC iPlayer), HTML5 video and screen/tab sharing.

Requires a native bridge app to connect with receiver devices. Currently supported on Windows, macOS and Linux. -

- No public full release yet! +

+

+ No full public release yet! Pre-release beta version is incomplete and likely buggy.

- + Firefox Extension diff --git a/docs/index.js b/docs/index.js new file mode 100644 index 0000000..515a078 --- /dev/null +++ b/docs/index.js @@ -0,0 +1,56 @@ +"use strict"; + +const ENDPOINT_URL = "https://api.github.com/repos/hensm/fx_cast/releases/14720978"; + +fetch(ENDPOINT_URL) + .then(res => res.json()) + .then(onResponse) + .catch(onError); + +function onResponse (res) { + for (const asset of res.assets) { + const { browser_download_url } = asset; + + // Ext download button + const downloadExtBtn = document.querySelector(".download__ext"); + + // App download buttons + const appListMacBtn = document.querySelector(".app-list__mac"); + const appListDebBtn = document.querySelector(".app-list__deb"); + const appListRpmBtn = document.querySelector(".app-list__rpm"); + + + switch (asset.name.match(/.*\.(.*)$/).pop()) { + case "xpi": + downloadExtBtn.href = browser_download_url; + downloadExtBtn.removeAttribute("disabled"); + downloadExtBtn.removeAttribute("title"); + break; + + case "exe": + appListWinBtn.href = browser_download_url; + appListWinBtn.removeAttribute("disabled"); + appListWinBtn.removeAttribute("title"); + break; + case "pkg": + appListMacBtn.href = browser_download_url; + appListMacBtn.removeAttribute("disabled"); + appListMacBtn.removeAttribute("title"); + break; + case "deb": + appListDebBtn.href = browser_download_url; + appListDebBtn.removeAttribute("disabled"); + appListDebBtn.removeAttribute("title"); + break; + case "rpm": + appListRpmBtn.href = browser_download_url; + appListRpmBtn.removeAttribute("disabled"); + appListRpmBtn.removeAttribute("title"); + break; + } + } +} + +function onError (err) { + console.error("Failed to fetch download links"); +} diff --git a/docs/photon.css b/docs/photon.css index e766a8a..8dd45cb 100755 --- a/docs/photon.css +++ b/docs/photon.css @@ -71,6 +71,7 @@ select.btn:-moz-focusring { .btn[disabled] { background-color: var(--btn-bg) !important; box-shadow: initial; + cursor: default; opacity: 0.4; }