mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-28 23:18:46 +02:00
Customize Clara item menu
This commit is contained in:
parent
c7c3dfef3e
commit
e40b71b3dd
1 changed files with 12 additions and 1 deletions
|
@ -98,13 +98,24 @@ Rectangle {
|
||||||
|
|
||||||
// In item page:
|
// In item page:
|
||||||
// - Fix up library link URL.
|
// - Fix up library link URL.
|
||||||
|
// - Reuse FBX download button as HiFi download button.
|
||||||
|
// - Remove "Edit Online", "Get Embed Code", and other download buttons.
|
||||||
property string updateItemPage: 'if ($) {
|
property string updateItemPage: 'if ($) {
|
||||||
var element = $("a[href=\'/library\']")[0];
|
var element = $("a[href^=\'/library\']")[0];
|
||||||
var parameters = "?gameCheck=true&public=true";
|
var parameters = "?gameCheck=true&public=true";
|
||||||
var href = element.getAttribute("href");
|
var href = element.getAttribute("href");
|
||||||
if (href.slice(-parameters.length) !== parameters) {
|
if (href.slice(-parameters.length) !== parameters) {
|
||||||
element.setAttribute("href", href + parameters);
|
element.setAttribute("href", href + parameters);
|
||||||
}
|
}
|
||||||
|
var buttons = $("a.embed-button").parent("div");
|
||||||
|
if (buttons.length > 0) {
|
||||||
|
var downloadFBX = buttons.find("a[data-extension=\'fbx\']")[0];
|
||||||
|
var firstButton = buttons.children(":first-child")[0];
|
||||||
|
buttons[0].insertBefore(downloadFBX, firstButton);
|
||||||
|
downloadFBX.setAttribute("class", "btn btn-primary download");
|
||||||
|
downloadFBX.innerHTML = "<i class=\'glyphicon glyphicon-download-alt\'></i> Download to High Fidelity";
|
||||||
|
buttons.children(":nth-child(2), .btn-group , .embed-button").each(function () { this.remove(); });
|
||||||
|
}
|
||||||
}';
|
}';
|
||||||
|
|
||||||
// Overload Clara FBX download link action.
|
// Overload Clara FBX download link action.
|
||||||
|
|
Loading…
Reference in a new issue