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.

111 lines
24 KiB

// ==UserScript==
// @name chickz_nft
// @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/chickz_nft
// @icon https://www.google.com/s2/favicons?domain=moonrank.app
// @grant none
// ==/UserScript==
(function() {
'use strict';
window.AutoRefresh = 0;
window.OpacityBoolean = 1;
window.Mints =
{"Chick #1":728, "Chick #2":498, "Chick #3":310, "Chick #4":477, "Chick #5":250, "Chick #6":652, "Chick #7":773, "Chick #8":876, "Chick #9":489, "Chick #10":407, "Chick #11":542, "Chick #12":13, "Chick #13":575, "Chick #14":483, "Chick #15":802, "Chick #16":1010, "Chick #17":544, "Chick #18":294, "Chick #19":1095, "Chick #20":1020, "Chick #21":1053, "Chick #22":488, "Chick #23":1081, "Chick #24":340, "Chick #25":149, "Chick #26":1062, "Chick #27":964, "Chick #28":480, "Chick #29":3, "Chick #30":956, "Chick #31":553, "Chick #32":307, "Chick #33":847, "Chick #34":210, "Chick #35":223, "Chick #36":190, "Chick #37":1091, "Chick #38":584, "Chick #39":769, "Chick #40":677, "Chick #41":410, "Chick #42":755, "Chick #43":334, "Chick #44":363, "Chick #45":1, "Chick #46":32, "Chick #47":806, "Chick #48":1025, "Chick #49":379, "Chick #50":744, "Chick #51":433, "Chick #52":293, "Chick #53":965, "Chick #54":815, "Chick #55":399, "Chick #56":716, "Chick #57":922, "Chick #58":14, "Chick #59":1027, "Chick #60":188, "Chick #61":561, "Chick #62":236, "Chick #63":85, "Chick #64":479, "Chick #65":625, "Chick #66":1073, "Chick #67":973, "Chick #68":462, "Chick #69":534, "Chick #70":174, "Chick #71":184, "Chick #72":717, "Chick #73":893, "Chick #74":279, "Chick #75":668, "Chick #76":4, "Chick #77":585, "Chick #78":375, "Chick #79":905, "Chick #80":827, "Chick #81":368, "Chick #82":835, "Chick #83":48, "Chick #84":857, "Chick #85":328, "Chick #86":805, "Chick #87":845, "Chick #88":351, "Chick #89":1103, "Chick #90":380, "Chick #91":610, "Chick #92":107, "Chick #93":106, "Chick #94":976, "Chick #95":1037, "Chick #96":91, "Chick #97":256, "Chick #98":1023, "Chick #99":687, "Chick #100":525, "Chick #101":573, "Chick #102":924, "Chick #103":556, "Chick #104":651, "Chick #105":787, "Chick #106":69, "Chick #107":865, "Chick #108":34, "Chick #109":5, "Chick #110":254, "Chick #111":598, "Chick #112":970, "Chick #113":138, "Chick #114":704, "Chick #115":115, "Chick #116":494, "Chick #117":877, "Chick #118":30, "Chick #119":233, "Chick #120":1066, "Chick #121":955, "Chick #122":594, "Chick #123":57, "Chick #124":361, "Chick #125":878, "Chick #126":846, "Chick #127":434, "Chick #128":936, "Chick #129":850, "Chick #130":895, "Chick #131":859, "Chick #132":826, "Chick #133":671, "Chick #134":118, "Chick #135":609, "Chick #136":576, "Chick #137":142, "Chick #138":788, "Chick #139":33, "Chick #140":528, "Chick #141":469, "Chick #142":948, "Chick #143":917, "Chick #144":265, "Chick #145":590, "Chick #146":791, "Chick #147":66, "Chick #148":923, "Chick #149":914, "Chick #150":344, "Chick #151":732, "Chick #152":650, "Chick #153":141, "Chick #154":335, "Chick #155":739, "Chick #156":427, "Chick #157":612, "Chick #158":993, "Chick #159":1076, "Chick #160":740, "Chick #161":144, "Chick #162":627, "Chick #163":695, "Chick #164":92, "Chick #165":135, "Chick #166":785, "Chick #167":673, "Chick #168":874, "Chick #169":237, "Chick #170":569, "Chick #171":314, "Chick #172":1107, "Chick #173":567, "Chick #174":385, "Chick #175":442, "Chick #176":396, "Chick #177":774, "Chick #178":505, "Chick #179":1063, "Chick #180":953, "Chick #181":42, "Chick #182":395, "Chick #183":1026, "Chick #184":841, "Chick #185":127, "Chick #186":566, "Chick #187":299, "Chick #188":607, "Chick #189":438, "Chick #190":808, "Chick #191":345, "Chick #192":214, "Chick #193":247, "Chick #194":482, "Chick #195":276, "Chick #196":191, "Chick #197":78, "Chick #198":801, "Chick #199":234, "Chick #200":444, "Chick #201":449, "Chick #202":889, "Chick #203":1084, "Chick #204":630, "Chick #205":946, "Chick #206":517, "Chick #207":593, "Chick #208":882, "Chick #209":266, "Chick #210":602, "Chick #211":1036, "Chick #212":712, "Chick #213":1064, "Chick #214":79, "Chick #215":562, "Chick #216":1006, "Chick #217":759, "Chick #218":710, "Chick #219":386, "Chick #220":415, "Chick #221":996, "Chick #222":387, "Chick #223":926, "Chick #224":693, "Chick #225":730, "Chick #226":468, "Chick #227":1088, "Chick #228":291, "Chick #229":686, "Chick #230":466, "Chick #231":725, "Chick #232":1041, "Chick #233":860, "Chick #
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');
});
}
})();