mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-10 00:36:34 +02:00
Move Clara download button when displaying on tablet
This commit is contained in:
parent
898372e841
commit
8ef8de7891
1 changed files with 19 additions and 0 deletions
|
@ -123,6 +123,18 @@
|
||||||
buttons.children(":nth-child(2), .btn-group , .embed-button").each(function () { this.remove(); });
|
buttons.children(":nth-child(2), .btn-group , .embed-button").each(function () { this.remove(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Move the "Download to High Fidelity" button to be more visible on tablet.
|
||||||
|
if ($("#hifi-download-container").length === 0 && window.innerWidth < 700) {
|
||||||
|
// Moving the button stops the Clara.io download from starting so instead, make a visual copy in the right place
|
||||||
|
// and wire its click event to click the original button.
|
||||||
|
var downloadContainer = $('<div id="hifi-download-container"></div>');
|
||||||
|
$(".top-title .col-sm-4").append(downloadContainer);
|
||||||
|
var downloadButton = $("a[data-extension=\'fbx\']").clone();
|
||||||
|
downloadButton[0].addEventListener("click", function () { downloadFBX.click(); });
|
||||||
|
downloadContainer.append(downloadButton);
|
||||||
|
downloadFBX.style.visibility = "hidden";
|
||||||
|
}
|
||||||
|
|
||||||
// Automatic download to High Fidelity.
|
// Automatic download to High Fidelity.
|
||||||
var downloadTimer;
|
var downloadTimer;
|
||||||
function startAutoDownload(event) {
|
function startAutoDownload(event) {
|
||||||
|
@ -176,6 +188,13 @@
|
||||||
'</style>'
|
'</style>'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Move "Download to High Fidelity" button.
|
||||||
|
$("head").append(
|
||||||
|
'<style>' +
|
||||||
|
'#hifi-download-container { position: absolute; top: 6px; right: 16px; }' +
|
||||||
|
'</style>'
|
||||||
|
);
|
||||||
|
|
||||||
// Update code injected per page displayed.
|
// Update code injected per page displayed.
|
||||||
var updateClaraCodeInterval = undefined;
|
var updateClaraCodeInterval = undefined;
|
||||||
updateClaraCode();
|
updateClaraCode();
|
||||||
|
|
Loading…
Reference in a new issue