update rip info and hide version by default

This commit is contained in:
4cuck committed 2024-06-02 02:19:42 +02:00
1 parent a25ae48d06
commit 43df834685
4 files changed
+39 -34

No files matched your search

+30 -30
View File
@@ -7,7 +7,7 @@ toggleColumnCheckboxes.forEach(checkbox => {
checkbox.addEventListener('change', function () {
const columnName = checkbox.getAttribute('data-name');
let checked = checkbox.checked;
toggleColumn(columnName,checked);
toggleColumn(columnName, checked);
saveSettings();
});
});
@@ -18,65 +18,65 @@ function saveSettings() {
const columnName = checkbox.getAttribute('data-name');
let checked = checkbox.checked;
data[columnName] = checked;
});
setCookie(COOKIE_NAME, JSON.stringify(data),30);
});
setCookie(COOKIE_NAME, JSON.stringify(data), 30);
}
// Function to toggle the visibility of a column based on its name or id
function toggleColumn(name,checked) {
function toggleColumn(name, checked) {
const cellsTd = dataTable.querySelectorAll(`td[data-name="${name}"]`);
cellsTd.forEach(cell => {
cell.style.display = checked ? '' : 'none';
});
const cells = dataTable.querySelectorAll(`th[data-name="${name}"]`);
cells.forEach(cell => {
cell.style.display = checked ? '' : 'none';
});
}
const COOKIE_NAME = "table_settings";
document.addEventListener("DOMContentLoaded", function(event) {
let val = getCookie(COOKIE_NAME);
if (val) {
let res = JSON.parse( val );
console.log(res);
for (const [key, value] of Object.entries(res)) {
console.log(key, value);
toggleColumn(key,value);
document.addEventListener("DOMContentLoaded", function (event) {
let val = getCookie(COOKIE_NAME);
if (val) {
let res = JSON.parse(val);
console.log(res);
for (const [key, value] of Object.entries(res)) {
console.log(key, value);
toggleColumn(key, value);
toggleColumnCheckboxes.forEach(checkbox => {
if (checkbox.getAttribute('data-name') == key) {
checkbox.checked = value;
}
});
}
} else {
toggleColumnCheckboxes.forEach(checkbox => {
if (checkbox.getAttribute('data-name') == key) {
checkbox.checked = value;
}
const columnName = checkbox.getAttribute('data-name');
let checked = checkbox.checked;
toggleColumn(columnName, checked);
});
}
} else {
toggleColumnCheckboxes.forEach(checkbox => {
const columnName = checkbox.getAttribute('data-name');
let checked = checkbox.checked;
toggleColumn(columnName,checked);
});
}
});
function setCookie(name,value,days) {
function setCookie(name, value, days) {
var expires = "";
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days*24*60*60*1000));
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
expires = "; expires=" + date.toUTCString();
}
document.cookie = name + "=" + (value || "") + expires + "; path=/";
document.cookie = name + "=" + (value || "") + expires + "; path=/";
}
function getCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
}
return null;
}
+1 -1
View File
@@ -30,7 +30,7 @@
<ul>
<li><code>Country</code> for the host country reported in the instance wiki.</li>
<li><code>Healthy</code> stands for hosts which are reachable and pass a content check.<br>
Known bad hosts are marked with a ❓. These instances prevent healthchecks (for example though long caching).
Known bad hosts are marked with a ❓. These instances prevent healthchecks (for example through long caching).
</li>
<li><code>Average Time</code> is the response time average over the last {{ping_avg_interval_h}} hours. This is
not a network ping.</li>
+3 -3
View File
@@ -25,10 +25,10 @@
<div class="container">
<h1>Nitter Instance Uptime & Health</h1>
<div class="alert alert-warning" role="alert">
Nitter is Dead! <a href="/rip">&gt;&gt;Read More&lt;&lt;</a>
Nitter is mostly dead! <a href="/rip">&gt;&gt;Read More&lt;&lt;</a>
</div>
<p><a href="/about">About</a></p>
<p>Please use the <a rel="nofollow" href="/about#api">API</a> for bots. Please <b>do NOT use these instances for
<p>Please <b>do NOT use these instances for
scraping</b>, host nitter yourself.</p>
<p>Last Updated {{last_updated}} <a rel="nofollow" href="https://time.is/UTC">UTC</a>.</p>
<p>Customize the visible columns <a href="#column-settings">down below</a>.</p>
@@ -155,7 +155,7 @@
</label>
</div>
<div class="form-check">
<input class="form-check-input toggle-column" data-name="version" type="checkbox" id="checkVersion" checked>
<input class="form-check-input toggle-column" data-name="version" type="checkbox" id="checkVersion">
<label class="form-check-label" for="checkVersion">
Version Column
</label>
+5
View File
@@ -42,6 +42,11 @@
<p>See <a href="https://github.com/zedeus/nitter/wiki/Guest-Account-Branch-Deployment">here</a> for setting up
Nitter if you feel brave enough and don't fear the command line.</p>
<h2>But there are some instances ?</h2>
<p>Through he thankless work of some there is a tiny amount of instances left. These will be slow and can not expose
RSS to prevent the huge volume bot attacks. The latter one also makes captchas and other anti-botting methods a
requirement.</p>
<div class="container">
<button class="btn btn-primary" id="loadGraphBtn">Show Historical Data Graph (CPU & Network Traffic)</button>
<div class="row">