Skip to content

Instantly share code, notes, and snippets.

@EsEnZeT
Created July 17, 2025 16:46
Show Gist options
  • Select an option

  • Save EsEnZeT/268716673fe770e7b0d02aead11f44d6 to your computer and use it in GitHub Desktop.

Select an option

Save EsEnZeT/268716673fe770e7b0d02aead11f44d6 to your computer and use it in GitHub Desktop.
Fix NS1 Frontend, because IBM doesn't know how to handle exceptions
// ==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.