Skip to content

Commit bd8ae18

Browse files
authored
Remove notification about sponsorship (#80)
1 parent d2451b1 commit bd8ae18

File tree

1 file changed

+1
-49
lines changed

1 file changed

+1
-49
lines changed

packages/vscode-host/src/deth/notification.ts

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -5,54 +5,6 @@
55

66
import "vs/css!./notification";
77

8-
const NOTIFICATION_STORAGE_KEY = "dethcrypto:ethereum-code-viewer.notification";
9-
// Change this if a new notification should be shown
10-
const NOTIFICATION_STORAGE_VALUE = "1";
11-
12-
const notifications = [
13-
{
14-
text: "💸 Enjoy using DethCode? Consider funding development via GitCoin 💸",
15-
link: "https://gitcoin.co/grants/4038/typechain-dksth",
16-
},
17-
];
18-
19-
const notificationHtml = `${notifications.map(
20-
(notification) => `
21-
<div class="notification-main">
22-
<a href="${notification.link}" target="_blank" class="notification-content">
23-
${notification.text}
24-
</a>
25-
</div>`
26-
)}
27-
<div class="notification-footer">
28-
<button class="notification-confirm-button">Whatever</button>
29-
</div>
30-
`;
31-
328
export const renderNotification = () => {
33-
// If user has confirmed the notification and checked `don't show me again`, ignore it
34-
if (
35-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
36-
!window.localStorage ||
37-
window.localStorage.getItem(NOTIFICATION_STORAGE_KEY) ===
38-
NOTIFICATION_STORAGE_VALUE
39-
) {
40-
return;
41-
}
42-
43-
const notificationElement = document.createElement("div");
44-
notificationElement.classList.add("deth-notification");
45-
notificationElement.innerHTML = notificationHtml;
46-
document.body.appendChild(notificationElement);
47-
48-
notificationElement.querySelector<HTMLButtonElement>(
49-
".notification-confirm-button"
50-
)!.onclick = () => {
51-
// We won't show the banner again until NOTIFICATION_STORAGE_VALUE is changed.
52-
window.localStorage.setItem(
53-
NOTIFICATION_STORAGE_KEY,
54-
NOTIFICATION_STORAGE_VALUE
55-
);
56-
document.body.removeChild(notificationElement);
57-
};
9+
return;
5810
};

0 commit comments

Comments
 (0)