Narrow One LeaderBoard
< Părere la script-ul Narrow One LB
// ==UserScript==
// @name Narrow One LB
// @namespace http://tampermonkey.net/
// @version 2024-02-21
// @description Narrow One LeaderBoard
// @author N1 Lb Team
// @match https://narrow.one/*
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAPHAAADxwFRnd3lAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAEpxJREFUeJztnXt8VNW1x39rn5nwDGEeKZWH4uOq10e9WKtYPvX9qu+Pt6G1XriQx/SChCToFe21MkWltVDyArEhCVGvLZKP0lofLb7wilzUK9pioSoqBeSZmUkCIZnMnL3uHwmWQjJzzpnzisz3P5Kz11rh/M4+5+yz1tpAlixZsmTJkuV4hJwOwDLCYU8wtv1UEJ3GTKcC8lQCjWLgawAFGTyMwMMB8vaOYAZaCegC4yAIewBsB2EXMf6mgj6MdYotqKtLOPlnmc1XRgDB8tAJzMmrAboIwPkAnQfwEJPddDNhCzFvBNPrUBKvRSqf+MJkH7YyYAWQP3PmcM6JXwqmqxh8NYCzHQmE8TERXpCSVkVr698GwI7EYZCBJYBQyBscpl7HKk8F0U0ABjkd0lFsZ8IqIcTylsXLP3Y6GC0MCAH4K0rOJimnAJgGYJTD4WiBwfQqE9dFfeNWIxxOOh1Qf7hZABQsL7oejPsYmOR0MBnwETHCLf5xqxAOS6eDORr3CaCgQAmeMKJACtxLjPOcDsc8aBOIH4hUNfzW6UiOxE0CoGB58Q+YeT6A05wOxjKYXiEP3emWZwRXCCBYVngGE9WAcY3TsdhEAsDi3DY1vK2pqcvJQBwVwKi7pwxTk4P+k5nvA5DjZCwOsUVI3LG/tuF9pwJQnHIcLCu8WUrPGgA3OhmHw+QzYdqQiycc7Nzw/ttOBGD7DHBaaemgmOj4BUClTvh3K0S0SvHEC/cuerLDVr92OgvOKTmdVbkSwAQ7/Q4caJOa5Jtalzb8zS6Pwi5HgdlFU1iV7yF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F+C1LSNP+uCrfsKPxp0COArf3FAedaoXC+JzwXS6BM4ggRPBCAIYlmJoN4B9AL4AsBuMLSRoE4G25KmDt2ytrY3b8ge4mAEhgFSMDoWGdijKICiJkYO9kgCgE9Q6vEPp2lVXd8jp+LJkyZIlS5YsWbJkyZIlSxYX8f+eN6DQ/+bW7QAAAABJRU5ErkJggg==
// @grant none
// @license Mozilla Public License 2.0
// ==/UserScript==
//let debug = true;
let debug = false;
function debugLog(...args) {
if (debug) console.log("[N1 LB]", ...args);
}
async function getData() {
// Open the IndexedDB database
await new Promise((r) => setTimeout(r, 2000));
var request = indexedDB.open("keyValuesDb");
request.onerror = function (event) {
console.error("Failed to open the database:", event.target.errorCode);
};
request.onsuccess = function (event) {
var db = event.target.result;
var transaction = db.transaction(["keyValues"], "readwrite");
var objectStore = transaction.objectStore("keyValues");
// Get the value by key ("cachedProfileState")
var request = objectStore.get("cachedProfileState");
request.onsuccess = function (event) {
// Access the data
var cachedProfileState = event.target.result;
// Do something with cachedProfileState
debugLog("Cached Profile State:",cachedProfileState)
// debugLog("Json Format for api test :) :", JSON.stringify(cachedProfileState))
// The URL where you want to send the POST request
const apiUrl = "https://n1-api.vercel.app/api/post";
debugLog(`Sending POST request to: ${apiUrl}`);
// send the POST request
fetch(apiUrl, {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(cachedProfileState),
})
.then((response) => {
if (!response.ok) {
throw new Error("Network response was not ok");
}
// console.log({ success: true });
debugLog("POST request was successful");
})
.catch((error) => {
// console.error("Error:", error.message);
debugLog("POST request failed");
console.log(
debug ? { success: false, error: error.message } : ""
);
});
};
request.onerror = function (event) {
console.error("Error retrieving data:", event.target.errorCode);
};
};
}
getData();