// ==UserScript== // @name soldout2查询物品均价 // @namespace http://tampermonkey.net/ // @version 0.3 // @description try to take over the world! // @author You // @match https://so2.mutoys.com/ // @require https://cdn.jsdelivr.net/npm/jquery@2.2.4/dist/jquery.min.js // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; var ref = ""; var datetime=getNowFormatDate(); function showprice(){ var allitem2=document.querySelectorAll('.icon-item2x'); var check_res=""; $.ajax({ type: "GET", dataType:"json", async:false, url: "https://s3-ap-northeast-1.amazonaws.com/so2-api.mutoys.com/json/report/buy"+datetime+".json", success: function(data){ check_res=data; }, error:function(e){ } }); for (var i=0;i"+ "NPC---数量-" +systemunit+",均价-"+systemprice+"
"+ "玩家---数量-"+userunit+",均价-"+userprice+"" ); document.querySelectorAll("."+classlist)[0].classList.add("flag") } } } ref = setInterval(function(){ showprice(); },2000); function getNowFormatDate(){ var day = new Date(); var Year = 0; var Month = 0; var Day = 0; var CurrentDate = ""; Year= day.getFullYear();//支持IE和火狐浏览器. Month= day.getMonth()+1; Day = day.getDate(); CurrentDate += Year; if (Month >= 10 ){ CurrentDate += Month; } else{ CurrentDate += "0" + Month; } if (Day >= 10 ){ CurrentDate += Day ; } else{ CurrentDate += "0" + Day ; } return CurrentDate; } })();