Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rumisle/3d421aabe789b6adfa8a5fae34b75674 to your computer and use it in GitHub Desktop.
Save rumisle/3d421aabe789b6adfa8a5fae34b75674 to your computer and use it in GitHub Desktop.
Blocks ChatGPT explicit & implicit message feedback
// ==UserScript==
// @name Block ChatGPT Feedback and Paragen Tracking
// @namespace http://tampermonkey.net/
// @version 1.1
// @description Block implicit_message_feedback and paragen_submission requests on ChatGPT
// @author ChatGPT-4o
// @match https://chatgpt.com/*
// @grant none
// @run-at document-start
// ==/UserScript==
(function() {
'use strict';
const blockedEndpoints = [
"/backend-api/conversation/implicit_message_feedback",
"/backend-api/paragen_submission"
];
const isBlocked = url => blockedEndpoints.some(endpoint => url.includes(endpoint));
const originalFetch = window.fetch;
window.fetch = function(...args) {
const url = (args[0] && args[0].url) || args[0];
if (url && isBlocked(url)) {
console.log("[Userscript] Blocked fetch request:", url);
return new Promise(() => {}); // Never resolves, effectively blocks
}
return originalFetch.apply(this, args);
};
const originalOpen = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function(method, url, ...rest) {
if (url && isBlocked(url)) {
console.log("[Userscript] Blocked XHR request:", url);
return; // Cancel this request
}
return originalOpen.call(this, method, url, ...rest);
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment