Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions plugins/hide_offline_alert/hide_offline_alert.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module.exports = {
name: "Hide Offline Alert",
description: "Hides network offline alert (Your computer seems to be offline. We'll keep trying to reconnect)",
version: "1.0.0",
author: "xiiyuki",
context: {
renderer: "own"
},
func: () => {
"use strict";

function log(...args) {
console.log("[Hide Offline Alert]", ...args);
}

// Create new style sheet
const style = document.createElement('style');

// Use attribute selector (data-testid), to target and hide AppOfline alert
style.innerHTML = `
[data-testid="alert-AppOffline"] {
display: none !important;
}
`;

// Inject style into head section
document.head.appendChild(style);

log("Offline alert hidden");
}
}