-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathuserScript.js
More file actions
37 lines (32 loc) · 1.28 KB
/
userScript.js
File metadata and controls
37 lines (32 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// ==UserScript==
// @name QuilBot Premium
// @namespace https://github.com/xettrialeen
// @version 0.1
// @description Note this is just for educational purpose
// @match https://quillbot.com/*
// @grant none
// @author Xettri Aleen
// @run-at document-idle
// ==/UserScript==
(function() {
var origOpen = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function() {
var url = arguments[1];
// Check if the URL contains "get-account-details"
if (url && url.includes("get-account-details")) {
var self = this;
this.addEventListener('load', function() {
// Intercept the response
var originalResponse = self.responseText;
var modifiedResponse = originalResponse.replace(`"accepted_premium_modes_tnc":false`, `"accepted_premium_modes_tnc":true`);
modifiedResponse = modifiedResponse.replace(`"premium":false`, `"premium":true`);
// Override the response with the modified content
Object.defineProperty(self, 'responseText', {
writable: true,
value: modifiedResponse
});
});
}
origOpen.apply(this, arguments);
};
})();