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.

110 lines
27 KiB

// ==UserScript==
// @name Solana Samos
// @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/solsamo
// @icon https://www.google.com/s2/favicons?domain=moonrank.app
// @grant none
// ==/UserScript==
(function() {
'use strict';
window.AutoRefresh = 0;
window.OpacityBoolean = 1;
window.Mints = {
"SolSamos #0":644, "SolSamos #1":815, "SolSamos #2":1014, "SolSamos #3":543, "SolSamos #4":445, "SolSamos #5":753, "SolSamos #6":1040, "SolSamos #7":162, "SolSamos #8":202, "SolSamos #9":757, "SolSamos #10":872, "SolSamos #11":435, "SolSamos #12":939, "SolSamos #13":1110, "SolSamos #14":113, "SolSamos #15":556, "SolSamos #16":461, "SolSamos #17":259, "SolSamos #18":1069, "SolSamos #19":406, "SolSamos #20":1100, "SolSamos #21":1080, "SolSamos #22":197, "SolSamos #23":1032, "SolSamos #24":1072, "SolSamos #25":828, "SolSamos #26":766, "SolSamos #27":933, "SolSamos #28":899, "SolSamos #29":614, "SolSamos #30":716, "SolSamos #31":416, "SolSamos #32":895, "SolSamos #33":954, "SolSamos #34":707, "SolSamos #35":814, "SolSamos #36":32, "SolSamos #37":376, "SolSamos #38":817, "SolSamos #39":235, "SolSamos #40":144, "SolSamos #41":321, "SolSamos #42":649, "SolSamos #43":680, "SolSamos #44":635, "SolSamos #45":914, "SolSamos #46":497, "SolSamos #47":396, "SolSamos #48":102, "SolSamos #49":820, "SolSamos #50":1017, "SolSamos #51":234, "SolSamos #52":641, "SolSamos #53":1070, "SolSamos #54":866, "SolSamos #55":953, "SolSamos #56":764, "SolSamos #57":470, "SolSamos #58":627, "SolSamos #59":986, "SolSamos #60":573, "SolSamos #61":363, "SolSamos #62":871, "SolSamos #63":684, "SolSamos #64":365, "SolSamos #65":364, "SolSamos #66":867, "SolSamos #67":754, "SolSamos #68":608, "SolSamos #69":1030, "SolSamos #70":692, "SolSamos #71":694, "SolSamos #72":403, "SolSamos #73":611, "SolSamos #74":101, "SolSamos #75":383, "SolSamos #76":1029, "SolSamos #77":316, "SolSamos #78":179, "SolSamos #79":1111, "SolSamos #80":674, "SolSamos #81":431, "SolSamos #82":293, "SolSamos #83":155, "SolSamos #84":1024, "SolSamos #85":1107, "SolSamos #86":848, "SolSamos #87":829, "SolSamos #88":315, "SolSamos #89":990, "SolSamos #90":198, "SolSamos #91":440, "SolSamos #92":1057, "SolSamos #93":75, "SolSamos #94":844, "SolSamos #95":44, "SolSamos #96":683, "SolSamos #97":1076, "SolSamos #98":658, "SolSamos #99":95, "SolSamos #100":518, "SolSamos #101":141, "SolSamos #102":839, "SolSamos #103":498, "SolSamos #104":758, "SolSamos #105":991, "SolSamos #106":1106, "SolSamos #107":909, "SolSamos #108":1079, "SolSamos #109":277, "SolSamos #110":823, "SolSamos #111":1092, "SolSamos #112":826, "SolSamos #113":940, "SolSamos #114":1009, "SolSamos #115":983, "SolSamos #116":226, "SolSamos #117":1044, "SolSamos #118":790, "SolSamos #119":136, "SolSamos #120":381, "SolSamos #121":94, "SolSamos #122":18, "SolSamos #123":483, "SolSamos #124":994, "SolSamos #125":22, "SolSamos #126":1042, "SolSamos #127":200, "SolSamos #128":355, "SolSamos #129":35, "SolSamos #130":239, "SolSamos #131":751, "SolSamos #132":784, "SolSamos #133":923, "SolSamos #134":1068, "SolSamos #135":27, "SolSamos #136":318, "SolSamos #137":581, "SolSamos #138":825, "SolSamos #139":38, "SolSamos #140":845, "SolSamos #141":287, "SolSamos #142":952, "SolSamos #143":878, "SolSamos #144":434, "SolSamos #145":1074, "SolSamos #146":467, "SolSamos #147":50, "SolSamos #148":932, "SolSamos #149":339, "SolSamos #150":699, "SolSamos #151":185, "SolSamos #152":589, "SolSamos #153":980, "SolSamos #154":326, "SolSamos #155":965, "SolSamos #156":1109, "SolSamos #157":657, "SolSamos #158":605, "SolSamos #159":728, "SolSamos #160":912, "SolSamos #161":177, "SolSamos #162":150, "SolSamos #163":1002, "SolSamos #164":989, "SolSamos #165":473, "SolSamos #166":824, "SolSamos #167":832, "SolSamos #168":851, "SolSamos #169":504, "SolSamos #170":869, "SolSamos #171":541, "SolSamos #172":268, "SolSamos #173":298, "SolSamos #174":126, "SolSamos #175":664, "SolSamos #176":171, "SolSamos #177":629, "SolSamos #178":34, "SolSamos #179":571, "SolSamos #180":33, "SolSamos #181":238, "SolSamos #182":71, "SolSamos #183":654, "SolSamos #184":693, "SolSamos #185":598, "SolSamos #186":988, "SolSamos #187":12, "SolSamos #188":460, "SolSamos #189":574, "SolSamos #190":665, "SolSamos #191":417, "SolSamos #192":613, "SolSamos #193":539, "SolSamos #194":240, "SolSamos #195":362, "SolSamos #196":1098, "SolSamos #197":6, "SolSamos #198":775, "SolSamos #199"
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');
});
}
})();