F7_Office/usr/share/coolwsd/browser/dist/branding.js
F7 Office Deploy d6a3131297 F7 Office: кастомизация брендинга, конфиги coolwsd и Apache
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-16 16:53:12 +00:00

53 lines
1.5 KiB
JavaScript

FORBION
var brandProductName = 'Collabora Online Development Edition (CODE)';
var brandProductURL = 'https://www.collaboraonline.com/code/';
var brandProductFAQURL = 'https://www.collaboraonline.com/code/#code-scalability';
var menuItems;
window.onload = function() {
// wait until the menu (and particularly the document-header) actually exists
function setLogo() {
var logoHeader = document.getElementById('document-header');
if (!logoHeader) {
// the logo does not exist in the menu yet, re-try in 250ms
setTimeout(setLogo, 250);
} else {
var logo = $('#document-header > div');
logo.get(0).setAttribute('data-cooltip', brandProductName);
logo.off('click').on('click', function() { window.open(brandProductURL, '_blank'); });
menuItems = document.querySelectorAll('#main-menu > li > a');
}
}
function setAboutImg() {
var lk = document.getElementById('lokit-version');
var aboutDialog = document.getElementById('about-dialog-info');
if (!lk || !aboutDialog) {
setTimeout(setAboutImg, 250);
}
}
function addIntegratorSidebar() {
var logoHeader = document.getElementById('document-header');
if (!logoHeader) {
// the logo does not exist in the menu yet, re-try in 250ms
setTimeout(addIntegratorSidebar, 250);
}
}
setLogo();
setAboutImg();
addIntegratorSidebar();
}
/*a::first-letter"*/
document.onkeyup = function(e) {
if (e.altKey && e.shiftKey) {
console.log('alt + shift + f');
menuItems.forEach(function(menuItem) {
menuItem.style.setProperty('text-decoration', 'underline', 'important');
});
}
};