-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmugjackpot.user.js
32 lines (25 loc) · 978 Bytes
/
mugjackpot.user.js
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
// ==UserScript==
// @name Attack Links on Casino Slots Page
// @namespace Epic
// @version 0.2
// @description Quick murder for slot jackpot winner
// @author Heasleys4hemp
// @match https://www.torn.com/loader.php?sid=viewSlotsStats
// @grant none
// ==/UserScript==
'use strict';
var observer = new MutationObserver(function(mutations) {
if ($('ul.cont-gray').length != 0) {
observer.disconnect();
dosomeshit();
}
});
observer.observe(document, {attributes: false, childList: true, characterData: false, subtree:true});
function dosomeshit() {
$('ul.cont-gray').find('li.player').find('a.user').each(function( index ) {
let href = $(this).attr('href');
let userid = href.split("=").pop();
$(this).attr('href', 'https://www.torn.com/loader.php?sid=attack&user2ID=' + userid);
$(this).attr("target","_blank");
});
}