Files
SharepointToolbox-Web/wwwroot/js/app.js
T
2026-06-02 10:56:03 +02:00

17 lines
533 B
JavaScript

window.sptb = {
downloadFile: function(fileName, contentType, base64) {
var link = document.createElement('a');
link.download = fileName;
link.href = 'data:' + contentType + ';base64,' + base64;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
},
setTheme: function(theme) {
document.documentElement.setAttribute('data-theme', theme);
},
scrollToBottom: function(el) {
if (el) el.scrollTop = el.scrollHeight;
}
};