You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
112 lines
60 KiB
112 lines
60 KiB
3 years ago
|
// ==UserScript==
|
||
|
// @name Little Noots
|
||
|
// @namespace http://tampermonkey.net/
|
||
|
// @version 1.0.3
|
||
|
// @description Press Q to Auto-refresh
|
||
|
// @author NFTHoarder - Modified by WTMike24 and @DUCKSAUCE (@ROCKETSAUCE)
|
||
|
// @match https://magiceden.io/marketplace/little_noots
|
||
|
// @icon https://www.google.com/s2/favicons?domain=moonrank.app
|
||
|
// @grant none
|
||
|
// ==/UserScript==
|
||
|
|
||
|
(function() {
|
||
|
'use strict';
|
||
|
window.AutoRefresh = 0;
|
||
|
window.OpacityBoolean = 1;
|
||
|
window.Mints = {
|
||
|
"Little Noots #0":2153, "Little Noots #1":686, "Little Noots #2":1125, "Little Noots #3":987, "Little Noots #4":1024, "Little Noots #5":409, "Little Noots #6":721, "Little Noots #7":700, "Little Noots #8":937, "Little Noots #9":625, "Little Noots #10":1377, "Little Noots #11":1278, "Little Noots #12":2040, "Little Noots #13":1519, "Little Noots #14":679, "Little Noots #15":511, "Little Noots #16":1211, "Little Noots #17":1183, "Little Noots #18":1163, "Little Noots #19":1568, "Little Noots #20":665, "Little Noots #21":1143, "Little Noots #22":9, "Little Noots #23":1933, "Little Noots #24":2155, "Little Noots #25":1303, "Little Noots #26":1661, "Little Noots #27":2214, "Little Noots #28":1923, "Little Noots #29":779, "Little Noots #30":1853, "Little Noots #31":1988, "Little Noots #32":363, "Little Noots #33":1238, "Little Noots #34":1409, "Little Noots #35":1747, "Little Noots #36":1656, "Little Noots #37":222, "Little Noots #38":1404, "Little Noots #39":607, "Little Noots #40":1415, "Little Noots #41":707, "Little Noots #42":906, "Little Noots #43":510, "Little Noots #44":1522, "Little Noots #45":706, "Little Noots #46":2147, "Little Noots #47":531, "Little Noots #48":730, "Little Noots #49":942, "Little Noots #50":1133, "Little Noots #51":27, "Little Noots #52":966, "Little Noots #53":439, "Little Noots #54":941, "Little Noots #55":1712, "Little Noots #56":601, "Little Noots #57":1427, "Little Noots #58":359, "Little Noots #59":158, "Little Noots #60":157, "Little Noots #61":873, "Little Noots #62":1044, "Little Noots #63":2007, "Little Noots #64":1079, "Little Noots #65":116, "Little Noots #66":1364, "Little Noots #67":358, "Little Noots #68":1611, "Little Noots #69":1515, "Little Noots #70":1035, "Little Noots #71":1030, "Little Noots #72":313, "Little Noots #73":1242, "Little Noots #74":1441, "Little Noots #75":431, "Little Noots #76":24, "Little Noots #77":1880, "Little Noots #78":1083, "Little Noots #79":539, "Little Noots #80":1895, "Little Noots #81":215, "Little Noots #82":2149, "Little Noots #83":1493, "Little Noots #84":1390, "Little Noots #85":1934, "Little Noots #86":1733, "Little Noots #87":1703, "Little Noots #88":1537, "Little Noots #89":1276, "Little Noots #90":1239, "Little Noots #91":1494, "Little Noots #92":2024, "Little Noots #93":737, "Little Noots #94":1206, "Little Noots #95":1037, "Little Noots #96":2205, "Little Noots #97":716, "Little Noots #98":1605, "Little Noots #99":967, "Little Noots #100":1094, "Little Noots #101":617, "Little Noots #102":867, "Little Noots #103":1089, "Little Noots #104":2087, "Little Noots #105":1609, "Little Noots #106":1349, "Little Noots #107":131, "Little Noots #108":267, "Little Noots #109":1190, "Little Noots #110":876, "Little Noots #111":1306, "Little Noots #112":1704, "Little Noots #113":1180, "Little Noots #114":77, "Little Noots #115":1865, "Little Noots #116":2195, "Little Noots #117":423, "Little Noots #118":22, "Little Noots #119":1323, "Little Noots #120":1120, "Little Noots #121":2213, "Little Noots #122":576, "Little Noots #123":2008, "Little Noots #124":256, "Little Noots #125":1816, "Little Noots #126":1111, "Little Noots #127":1356, "Little Noots #128":259, "Little Noots #129":414, "Little Noots #130":935, "Little Noots #131":1281, "Little Noots #132":277, "Little Noots #133":1666, "Little Noots #134":1542, "Little Noots #135":633, "Little Noots #136":1637, "Little Noots #137":994, "Little Noots #138":660, "Little Noots #139":893, "Little Noots #140":1799, "Little Noots #141":656, "Little Noots #142":1652, "Little Noots #143":574, "Little Noots #144":1540, "Little Noots #145":627, "Little Noots #146":2046, "Little Noots #147":241, "Little Noots #148":600, "Little Noots #149":1591, "Little Noots #150":319, "Little Noots #151":844, "Little Noots #152":1061, "Little Noots #153":1627, "Little Noots #154":58, "Little Noots #155":2186, "Little Noots #156":1755, "Little Noots #157":197, "Little Noots #158":1370, "Little Noots #159":437, "Little Noots #160":1407, "Little Noots #161":309, "Little Noots #162":667, "Little Noots #163":795, "Little Noots #164":
|
||
|
|
||
|
|
||
|
|
||
|
window.MintSize = Object.keys(window.Mints).length;
|
||
|
var i = document.createElement('iframe');
|
||
|
i.style.display = 'none';
|
||
|
document.body.appendChild(i);
|
||
|
window.console = i.contentWindow.console;
|
||
|
|
||
|
var script = document.createElement('script');
|
||
|
script.src = 'https://code.jquery.com/jquery-3.4.1.min.js';
|
||
|
script.type = 'text/javascript';
|
||
|
document.getElementsByTagName('head')[0].appendChild(script);
|
||
|
setTimeout(function() {
|
||
|
const newDiv = document.createElement("div");
|
||
|
newDiv.setAttribute("id", "jquery_loaded");
|
||
|
const currentDiv = document.getElementById("root");
|
||
|
document.body.insertBefore(newDiv, currentDiv);
|
||
|
}, 1000);
|
||
|
|
||
|
(new MutationObserver(checkForJquery)).observe(document, {childList: true, subtree: true});
|
||
|
|
||
|
function checkForJquery(changes, observer) {
|
||
|
if(document.querySelector('#jquery_loaded')) {
|
||
|
observer.disconnect();
|
||
|
var oldFetch = fetch;
|
||
|
$('#root').css({ background: "black"});
|
||
|
$('body').keydown(function (e){
|
||
|
console.log(e.keyCode);
|
||
|
if(e.keyCode == 81){
|
||
|
toggleAutoRefresh();
|
||
|
}
|
||
|
if(e.keyCode == 82){
|
||
|
buyQuick();
|
||
|
}
|
||
|
});
|
||
|
|
||
|
setInterval(function() {
|
||
|
quackWithOffers();
|
||
|
}, 50);
|
||
|
|
||
|
setInterval(function() {
|
||
|
autoRefresh();
|
||
|
}, 5000);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function buyQuick() {
|
||
|
$(".content").find("button")[3].click();
|
||
|
}
|
||
|
|
||
|
function autoRefresh() {
|
||
|
$(".d-flex").css({ display: "flex"});
|
||
|
//$(".pt-2").css({ padding: ".5rem"});
|
||
|
if(window.AutoRefresh == 1) {
|
||
|
$(".me-refresh-btn")[0].click()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function toggleAutoRefresh() {
|
||
|
if(window.AutoRefresh == 0) {
|
||
|
window.AutoRefresh = 1;
|
||
|
} else {
|
||
|
window.AutoRefresh = 0;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function quackWithOffers() {
|
||
|
$(".grid-card__title").each(function( index ) {
|
||
|
var text = $( this ).text();
|
||
|
var split = text.split(" #");
|
||
|
var mint = parseInt(split[1]);
|
||
|
var rarityRank = 0;
|
||
|
var opacity = 1;
|
||
|
|
||
|
rarityRank = parseInt(window.Mints[text]);
|
||
|
//opacity = (window.MintSize - rarityRank) / window.MintSize + 0.5;
|
||
|
opacity=1;
|
||
|
$(this).text("#"+mint+"; Rank: "+rarityRank)
|
||
|
$(this).parent().parent().parent().parent().css({ opacity: opacity });
|
||
|
|
||
|
if(rarityRank <= window.MintSize/80) {
|
||
|
$(this).parent().parent().parent().parent().css({ border: '5px solid crimson' });
|
||
|
} else if(rarityRank <= window.MintSize/10) {
|
||
|
$(this).parent().parent().parent().parent().css({ border: '5px solid yellow' });
|
||
|
} else if(rarityRank <= window.MintSize/5) {
|
||
|
$(this).parent().parent().parent().parent().css({ border: '5px solid silver' });
|
||
|
}
|
||
|
$(this).removeClass('grid-card__title');
|
||
|
$(this).removeClass('grid-card__title');
|
||
|
$(this).removeClass('grid-card__title');
|
||
|
});
|
||
|
}
|
||
|
})();
|