|
3 | 3 | <head> |
4 | 4 | <meta charset="UTF-8"> |
5 | 5 | <style> |
6 | | - html, body {margin:0; padding:0; height:100%; background:#f4f4f4; font-family:sans-serif} |
7 | | - #pagina {display:flex; flex-direction:column; align-items:center; padding:20px; gap:10px} |
8 | | - #planilha-wrapper {max-width:90vw; max-height:80vh; overflow:auto; border:1px solid #ccc; background:white; box-shadow:0 2px 10px rgba(0,0,0,0.1)} |
9 | | - table {border-collapse:collapse; table-layout:fixed} |
10 | | - th, td {padding:8px; border:1px solid #ccc; overflow:hidden; word-break:break-word} |
11 | | - th {background:#444; color:#fff; position:sticky; top:0; z-index:2} |
12 | | - .th-wrapper {position:relative; width:100%; height:100%; cursor:pointer} |
13 | | - .resizer {position:absolute; top:0; width:20px; height:100%; cursor:col-resize; z-index:10; user-select:none} |
| 6 | + html, body { |
| 7 | + margin: 0; |
| 8 | + padding: 0; |
| 9 | + height: 100%; |
| 10 | + background: #f4f4f4; |
| 11 | + font-family: sans-serif; |
| 12 | + } |
| 13 | + #pagina { |
| 14 | + display: flex; |
| 15 | + flex-direction: column; |
| 16 | + height: 100%; |
| 17 | + } |
| 18 | + #planilha-topo { |
| 19 | + padding: 20px; |
| 20 | + text-align: center; |
| 21 | + } |
| 22 | + #planilha-wrapper { |
| 23 | + flex-grow: 1; |
| 24 | + display: flex; |
| 25 | + justify-content: center; |
| 26 | + overflow: auto; |
| 27 | + } |
| 28 | + #planilha-container { |
| 29 | + max-width: 90vw; |
| 30 | + border: 1px solid #ccc; |
| 31 | + background: white; |
| 32 | + box-shadow: 0 2px 10px rgba(0,0,0,0.1); |
| 33 | + } |
| 34 | + table { |
| 35 | + border-collapse: collapse; |
| 36 | + table-layout: fixed; |
| 37 | + } |
| 38 | + th, td { |
| 39 | + padding: 8px; |
| 40 | + border: 1px solid #ccc; |
| 41 | + overflow: hidden; |
| 42 | + word-break: break-word; |
| 43 | + } |
| 44 | + th { |
| 45 | + background: #444; |
| 46 | + color: #fff; |
| 47 | + position: sticky; |
| 48 | + top: 0; |
| 49 | + z-index: 2; |
| 50 | + } |
| 51 | + .th-wrapper { |
| 52 | + position: relative; |
| 53 | + width: 100%; |
| 54 | + height: 100%; |
| 55 | + cursor: pointer; |
| 56 | + } |
| 57 | + .resizer { |
| 58 | + position: absolute; |
| 59 | + top: 0; |
| 60 | + width: 20px; |
| 61 | + height: 100%; |
| 62 | + cursor: col-resize; |
| 63 | + z-index: 10; |
| 64 | + user-select: none; |
| 65 | + } |
| 66 | + #planilha-rodape { |
| 67 | + padding: 10px; |
| 68 | + text-align: center; |
| 69 | + font-size: 13px; |
| 70 | + color: #666; |
| 71 | + } |
14 | 72 | </style> |
15 | 73 | </head> |
16 | 74 | <body> |
|
19 | 77 | <div id="planilha-wrapper"> |
20 | 78 | <div id="planilha-container"><noscript>Enable JavaScript!</noscript></div> |
21 | 79 | </div> |
| 80 | + <div id="planilha-rodape">v1.1 - by <a target=_blank href="https://t.me/VD_Priv8">@VD_Priv8</a> - <a target=_blank href="https://t.me/RootDetected">Join @RootDetected</a></div> |
22 | 81 | </div> |
23 | | - |
24 | 82 | <script> |
25 | 83 | const path = (location.hash && location.hash !== "#") ? location.hash.slice(1) : "Empty"; |
26 | 84 | const script = document.createElement("script"); |
27 | 85 | script.src = `tables/${path}.js`; |
28 | 86 | script.onload = () => initPlanilha(); |
29 | 87 | script.onerror = () => alert("Table not found: " + path + "."); |
30 | 88 | document.head.appendChild(script); |
31 | | - |
32 | 89 | function initPlanilha(){ |
33 | 90 | document.getElementById("planilha-topo").innerHTML = info; |
34 | 91 | document.title = title; |
35 | | - |
36 | 92 | let colRefs = [], ordemCrescente = {}; |
37 | | - |
38 | 93 | function renderTabela(){ |
39 | 94 | const tabela = document.createElement("table"); |
40 | 95 | const colgroup = document.createElement("colgroup"); |
|
45 | 100 | return col; |
46 | 101 | }); |
47 | 102 | tabela.appendChild(colgroup); |
48 | | - |
49 | 103 | const thead = document.createElement("thead"); |
50 | 104 | const trHead = document.createElement("tr"); |
51 | 105 | columns.forEach((titulo, i) => { |
|
76 | 130 | }); |
77 | 131 | thead.appendChild(trHead); |
78 | 132 | tabela.appendChild(thead); |
79 | | - |
80 | 133 | const tbody = document.createElement("tbody"); |
81 | 134 | data.forEach(linha => { |
82 | 135 | const tr = document.createElement("tr"); |
|
103 | 156 | tbody.appendChild(tr); |
104 | 157 | }); |
105 | 158 | tabela.appendChild(tbody); |
106 | | - |
107 | 159 | const container = document.getElementById("planilha-container"); |
108 | 160 | container.innerHTML = ""; |
109 | 161 | container.appendChild(tabela); |
110 | 162 | } |
111 | | - |
112 | 163 | function ordenarPorColuna(indice){ |
113 | 164 | ordemCrescente = {[indice]: !(ordemCrescente[indice] ?? false)}; |
114 | 165 | data.sort((a, b) => { |
|
120 | 171 | }); |
121 | 172 | renderTabela(); |
122 | 173 | } |
123 | | - |
124 | 174 | function iniciarResize(index){ |
125 | 175 | return function(e){ |
126 | 176 | e.preventDefault(); |
|
139 | 189 | document.addEventListener("mouseup", onMouseUp); |
140 | 190 | } |
141 | 191 | } |
142 | | - |
143 | 192 | renderTabela(); |
144 | 193 | } |
145 | 194 | </script> |
|
0 commit comments