Bootstrap
博客内容搜索
Kaysama's Blog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// ==UserScript==
// @name steam批量取消关注
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @include /^https?:\/\/steamcommunity\.com\/id\/\w+\/followedgames\/?$/
// @grant GM_addStyle
// ==/UserScript==

(function () {
'use strict';
function run() {
// return alert(666)
var $btn = jQuery('<button>取消本页所有关注</button>');
$btn.addClass('btn-batch');
jQuery('#tabs_basebg').prepend($btn);
GM_addStyle(`#tabs_basebg > .btn-batch {
color: #67c1f5;
background-color: #274155;
cursor: pointer;
border: 1px solid #67c1f5;
margin-bottom: 10px;
}`)

$btn.click(function () {
const btns = jQuery('.unfollow_game_btn')
btns.each((index,ele)=>{
setTimeout(()=>{
$(ele).click()
}, index*500)
})
});
}

run();
})();