js-tampermonkey-public-scripts/Synology_Update-FileStation-Tree-File-Lists.user.js
Unkas Amanjolov 42b29defae first commit
2024-10-07 10:25:50 +05:00

40 lines
1.4 KiB
JavaScript

// ==UserScript==
// @name Synology:Update-FileStation-Tree-File-Lists
// @namespace http://tampermonkey.net/
// @version 2024-05-20
// @description Скрипт, который добавляет новые CSS стили для элементов дерева на странице, изменяя их отображение, размеры и отступы.
// @author LukasEndigo
// @match http://10.10.5.118:5000/
// @match https://10.10.5.118:5001/
// @match http://10.10.1.17:5000/
// @icon https://www.google.com/s2/favicons?sz=64&domain=demo.synology.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Создаем новый элемент <style>
var style = document.createElement('style');
style.type = 'text/css';
// Добавляем CSS правила в элемент <style>
style.innerHTML = '.syno-ux-treepanel .x-tree-node-el {' +
'display: table;' +
'width: 100%;' +
'line-height: 14px;' +
'height: 14px;' +
'overflow: hidden;' +
'}' +
'' +
'.syno-ux-treepanel .x-tree-node .x-tree-ec-icon {' +
'height: 14px;' +
'width: 14px;' +
'margin: -2px 4px 0px 0px' +
'}'
;
// Находим элемент <head> и добавляем туда наш новый элемент <style>
document.head.appendChild(style);
})();