This repository has been archived by the owner on Jun 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
OPX-Nitro-Anywhere.user.js
53 lines (46 loc) · 1.94 KB
/
OPX-Nitro-Anywhere.user.js
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// ==UserScript==
// @name OPX Nitro Anywhere
// @namespace https://update.greasyfork.org/scripts/482963/OPX%20Nitro%20Anywhere.user.js
// @version 1.0.6
// @description This script allows you to get a nitro subscription code from Opera GX without having Opera GX to claim it.
// @author 104xvision
// @match https://www.opera.com/gx/discord-nitro
// @icon https://www.google.com/s2/favicons?sz=64&domain=opera.com/gx
// @run-at document-start
// @license MIT
// ==/UserScript==
(function() {
'use strict';
function getRandomUUID() {
localStorage.systemData = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,
(function(t) {
const e = 16 * Math.random() | 0;
return ("x" === t ? e : 3 & e | 8).toString(16)
}))
}
function setUserAgent(window, userAgent) {
if (window.navigator.userAgent != userAgent) {
var userAgentProp = { get: function () { return userAgent; } };
try {
Object.defineProperty(window.navigator, 'userAgent', userAgentProp);
} catch (e) {
window.navigator = Object.create(navigator, {
userAgent: userAgentProp
});
}
}
}
setUserAgent(window, navigator.userAgent + " OPX/1.0");
// opr is not defined error fix, just run this eariler
getRandomUUID();
document.addEventListener("DOMContentLoaded", () => {
document.querySelector("#claim-button").addEventListener("click", function() {
getRandomUUID();
console.log(`Generated new UUID for promotional: ${localStorage.systemData} (Claim Button #1)`);
})
document.querySelector("#claim-button-second").addEventListener("click", function() {
getRandomUUID();
console.log(`Generated new UUID for promotional: ${localStorage.systemData} (Claim Button #2)`);
})
})
})();