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.
109 lines
13 KiB
109 lines
13 KiB
3 years ago
|
// ==UserScript==
|
||
|
// @name Dapper Ducks: The Hunters
|
||
|
// @namespace http://tampermonkey.net/
|
||
|
// @version 1.0.4
|
||
|
// @description Press Q to Auto-refresh
|
||
|
// @author NFTHoarder - Modified by WTMike24 and @DUCKSAUCE (@ROCKETSAUCE)
|
||
|
// @match https://magiceden.io/marketplace/dapper_ducks_the_hunters
|
||
|
// @icon https://www.google.com/s2/favicons?domain=moonrank.app
|
||
|
// @grant none
|
||
|
// ==/UserScript==
|
||
|
|
||
|
(function() {
|
||
|
'use strict';
|
||
|
window.AutoRefresh = 0;
|
||
|
window.OpacityBoolean = 1;
|
||
|
window.Mints = {
|
||
|
"Duck Hunter #1":361, "Duck Hunter #2":224, "Duck Hunter #3":295, "Duck Hunter #4":285, "Duck Hunter #5":185, "Duck Hunter #6":77, "Duck Hunter #7":17, "Duck Hunter #8":259, "Duck Hunter #9":127, "Duck Hunter #10":148, "Duck Hunter #11":239, "Duck Hunter #12":166, "Duck Hunter #13":257, "Duck Hunter #14":136, "Duck Hunter #15":329, "Duck Hunter #16":274, "Duck Hunter #17":289, "Duck Hunter #18":237, "Duck Hunter #19":103, "Duck Hunter #20":390, "Duck Hunter #21":313, "Duck Hunter #22":322, "Duck Hunter #23":320, "Duck Hunter #24":190, "Duck Hunter #25":372, "Duck Hunter #26":63, "Duck Hunter #27":170, "Duck Hunter #28":250, "Duck Hunter #29":333, "Duck Hunter #30":95, "Duck Hunter #31":393, "Duck Hunter #33":62, "Duck Hunter #34":254, "Duck Hunter #35":249, "Duck Hunter #36":269, "Duck Hunter #37":383, "Duck Hunter #38":141, "Duck Hunter #39":231, "Duck Hunter #40":396, "Duck Hunter #41":42, "Duck Hunter #42":107, "Duck Hunter #43":326, "Duck Hunter #44":111, "Duck Hunter #45":33, "Duck Hunter #46":10, "Duck Hunter #47":348, "Duck Hunter #48":153, "Duck Hunter #49":248, "Duck Hunter #50":389, "Duck Hunter #51":104, "Duck Hunter #52":206, "Duck Hunter #54":203, "Duck Hunter #55":7, "Duck Hunter #56":41, "Duck Hunter #57":298, "Duck Hunter #58":178, "Duck Hunter #59":81, "Duck Hunter #60":50, "Duck Hunter #61":256, "Duck Hunter #62":267, "Duck Hunter #63":246, "Duck Hunter #64":318, "Duck Hunter #65":121, "Duck Hunter #66":346, "Duck Hunter #67":119, "Duck Hunter #68":217, "Duck Hunter #69":120, "Duck Hunter #70":222, "Duck Hunter #71":215, "Duck Hunter #72":314, "Duck Hunter #73":204, "Duck Hunter #74":114, "Duck Hunter #75":194, "Duck Hunter #76":76, "Duck Hunter #77":167, "Duck Hunter #79":210, "Duck Hunter #80":197, "Duck Hunter #81":38, "Duck Hunter #82":18, "Duck Hunter #83":75, "Duck Hunter #84":164, "Duck Hunter #85":280, "Duck Hunter #86":48, "Duck Hunter #87":150, "Duck Hunter #88":277, "Duck Hunter #89":142, "Duck Hunter #90":263, "Duck Hunter #91":34, "Duck Hunter #92":52, "Duck Hunter #93":100, "Duck Hunter #94":149, "Duck Hunter #95":70, "Duck Hunter #96":105, "Duck Hunter #97":151, "Duck Hunter #98":332, "Duck Hunter #99":324, "Duck Hunter #100":94, "Duck Hunter #101":172, "Duck Hunter #102":321, "Duck Hunter #103":279, "Duck Hunter #104":356, "Duck Hunter #105":233, "Duck Hunter #106":54, "Duck Hunter #107":20, "Duck Hunter #108":355, "Duck Hunter #109":37, "Duck Hunter #110":71, "Duck Hunter #111":51, "Duck Hunter #112":365, "Duck Hunter #113":189, "Duck Hunter #114":251, "Duck Hunter #115":117, "Duck Hunter #116":357, "Duck Hunter #117":53, "Duck Hunter #118":225, "Duck Hunter #119":183, "Duck Hunter #120":265, "Duck Hunter #121":175, "Duck Hunter #122":180, "Duck Hunter #123":49, "Duck Hunter #124":91, "Duck Hunter #125":198, "Duck Hunter #126":138, "Duck Hunter #127":341, "Duck Hunter #129":211, "Duck Hunter #130":282, "Duck Hunter #131":391, "Duck Hunter #132":213, "Duck Hunter #133":245, "Duck Hunter #134":187, "Duck Hunter #135":19, "Duck Hunter #136":102, "Duck Hunter #137":208, "Duck Hunter #139":85, "Duck Hunter #140":284, "Duck Hunter #141":8, "Duck Hunter #142":13, "Duck Hunter #143":305, "Duck Hunter #144":366, "Duck Hunter #145":146, "Duck Hunter #146":235, "Duck Hunter #147":99, "Duck Hunter #148":179, "Duck Hunter #149":337, "Duck Hunter #150":330, "Duck Hunter #151":398, "Duck Hunter #152":362, "Duck Hunter #153":384, "Duck Hunter #154":309, "Duck Hunter #155":74, "Duck Hunter #156":134, "Duck Hunter #157":73, "Duck Hunter #158":15, "Duck Hunter #159":369, "Duck Hunter #160":30, "Duck Hunter #161":68, "Duck Hunter #162":92, "Duck Hunter #163":83, "Duck Hunter #164":82, "Duck Hunter #165":86, "Duck Hunter #166":264, "Duck Hunter #167":308, "Duck Hunter #168":16, "Duck Hunter #169":336, "Duck Hunter #170":275, "Duck Hunter #171":243, "Duck Hunter #172":35, "Duck Hunter #173":219, "Duck Hunter #174":139, "Duck Hunter #175":226, "Duck Hunter #176":160, "Duck Hunter #177":39, "Duck Hunter #178":152, "Duck Hunter #179":319, "Duck Hunter #180":132, "Duck Hunter #181":44, "Duck Hunter #182":123, "
|
||
|
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');
|
||
|
});
|
||
|
}
|
||
|
})();
|