Created
July 17, 2025 16:46
-
-
Save EsEnZeT/268716673fe770e7b0d02aead11f44d6 to your computer and use it in GitHub Desktop.
Fix NS1 Frontend, because IBM doesn't know how to handle exceptions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Unfuck NS1 Frontend (Prevent Crashes on JS Errors) | |
| // @namespace unfuck.ns1.frontend | |
| // @description Fixes NS1 FE API key generation and more. Clearly IBM doesn't know how to handle exceptions. | |
| // @match https://my.nsone.net/* | |
| // @grant none | |
| // @version 1.0 | |
| // @author AI slop | |
| // ==/UserScript== | |
| (function() { | |
| 'use strict'; | |
| const originalKeys = Object.keys; | |
| Object.keys = function(obj) { | |
| if (obj == null) { | |
| console.warn('[Patch] Object.keys called on', obj); | |
| return []; | |
| } | |
| return originalKeys.call(Object, obj); | |
| }; | |
| const originalEntries = Object.entries; | |
| Object.entries = function(obj) { | |
| if (obj == null) { | |
| console.warn('[Patch] Object.entries called on', obj); | |
| return []; | |
| } | |
| return originalEntries.call(Object, obj); | |
| }; | |
| })(); |
Comments are disabled for this gist.