全选 反选
X
`;
document.getElementsByTagName("body")[0].appendChild(div);
let a=document.createElement("a");
a.setAttribute("id", "remove_btn");
a.setAttribute("class", "menuitem supernav");
a.setAttribute("style", "cursor:pointer");
a.innerHTML="一键移除";
$(".supernav_container:first").append(a);
a.onclick=function(){
if(window.location.host=="steamcommunity.com"){
if(confirm("此功能需要在商店页面运行,是否跳转?")) window.open("https://store.steampowered.com/","_self");
}else{
let username=document.getElementsByClassName("username");
if(username.length>0){
let user=$('a[data-miniprofile]');
if(user.length>0){
userName=user[0].innerText;
$('#remove').show();
}else{
if(confirm("请先登录!")) window.open("https://store.steampowered.com/login/","_self");
}
}else{
if(confirm("请先登录!")) window.open("https://store.steampowered.com/login/","_self");
}
}
};
$("#get_fcl").click(()=>{
$("#pro").text("");
$("#selectAll").attr("checked", false);
$("#reverse").attr("checked", false);
get_curators();
});
$("#get_fgl").click(()=>{
$("#pro").text("");
$("#selectAll").attr("checked", false);
$("#reverse").attr("checked", false);
get_follow_games();
});
$("#get_wl").click(()=>{
$("#pro").text("");
$("#selectAll").attr("checked", false);
$("#reverse").attr("checked", false);
get_wishlist();
});
$("#unf_c").click(function(){
if(!$(this).hasClass("disabled")){
let curators=[];
let curatorsChecked=$("p.checkbox input:checkbox:checked");
for(let i=0;i0?unfollow_curators(curators):alert("你还没有选中要取关的鉴赏家!");
}
});
$("#unf_g").click(function(){
if(!$(this).hasClass("disabled")){
let games=[];
let gamesChecked=$("p.checkbox input:checkbox:checked");
for(let i=0;i0?unfollow_games(games):alert("你还没有选中要取关的游戏!");
}
});
$("#rem_g").click(function(){
if(!$(this).hasClass("disabled")){
let games=[];
let gamesChecked=$("p.checkbox input:checkbox:checked");
for(let i=0;i0?remove_wishlist(games):alert("你还没有选中要移除愿望单的游戏!");
}
});
//一键取关+移除愿望单
if(/https?:\/\/store.steampowered.com\/app\/[\w\W]*/.test(url)){
$("div.queue_control_button.queue_btn_ignore").after(`
一键移除
`);
$(".queue_btn_remove>.queue_btn_inactive").click(()=>{
removeWishlist();
unFollow();
});
}
let curators=[];
let unfC=0;
let unfG=0;
let remG=0;
let page=1;
let steam64ID=getCookie('steamRememberLogin')?getCookie('steamRememberLogin').slice(0,17):userName;
//获取鉴赏家列表
function get_curators(){
let p=document.createElement("p");
p.setAttribute("style", "font-size:15px");
p.innerHTML=`获取鉴赏家列表...`;
$("#info").append(p);
p.scrollIntoView();
GM_xmlhttpRequest({
method: "GET",
url: "https://store.steampowered.com/dynamicstore/userdata/?id="+userName+"&t="+new Date().getTime(),
timeout: 1000*30,
responseType: "json",
onload: function (data) {
if(data.status==200){
p.innerHTML+='成功!';
let curator=data.response.rgCurators;
let curators=[];
let checkbox='';
Object.keys(curator).forEach(function(key){
checkbox+=`