mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 00:56:48 +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(); });
|
||||
}
|
||||
|
||||
// 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.
|
||||
var downloadTimer;
|
||||
function startAutoDownload(event) {
|
||||
|
@ -176,6 +188,13 @@
|
|||
'</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.
|
||||
var updateClaraCodeInterval = undefined;
|
||||
updateClaraCode();
|
||||
|
|
Loading…
Reference in a new issue