User Pass
Home Sign Up Contact Log In
ProfessionalKop
Gangstalicious
offline
Link
 
anyone have it?
 
HighRoller74
offline
Link
 
// ==UserScript==
// @name GLB Cut CPU Players - pabst fix
// @namespace GLB
// @description Cuts CPU players to the minimum
// @author DDCUnderground
// @include http://goallineblitz.com/game/roster.pl?team_id=*
// @include http://glb.warriorgeneral.com/game/roster.pl?team_id=*
// @require http://code.jquery.com/jquery-1.4.2.min.js
// @version 14.02.26-pabst
// ==/UserScript==
//

$(document).ready(function(){

// functions
var buildobj = function(a){
var newobj = document.createElement(arguments[0]);
for (var varval = 1; varval < arguments.length; varval++) {
newobj.setAttribute(arguments[varval],arguments[varval+1]);
varval++;
};
return newobj;
};



function cutAllCPUS(){
$('#ddccutcpus').attr('value','Working');
$('#ddccutcpus').attr("disabled", "true");

$('tr[class="alternating_color1"],tr[class="alternating_color2"]').each(function(z){
//if (z<2) {
if ($('span[class="cpu"]',$(this)).length > 0) {
var playerid = $('a[href*="/game/player.pl?player_id="]',$(this)).attr('href');
playerid = playerid.substring(playerid.indexOf('player_id=')+10,playerid.length);
var upgradeData = 'action=Confirm Release&&player_id=' + playerid;
$.ajax({
async: false,
type: 'POST',
url: "/game/cut_player.pl?player_id="+playerid,
data: encodeURI(upgradeData),
success: function(returned_data) {
}
})
}
//}
})
window.location.reload();

}

var cutcpusbut = buildobj('input','type','button','id','ddccutcpus','Value','Cut CPUs');
var linebreak = buildobj('br');
$('.medium_head:first').append(linebreak);
$('.medium_head:first').append(cutcpusbut);
$('#ddccutcpus').bind('click',cutAllCPUS, false);

})
 
.spider.
Lead Mod
offline
Link
 
Thanks highroller, looking for this myself.
 
HighRoller74
offline
Link
 
No problem.
 
ProfessionalKop
Gangstalicious
offline
Link
 
Do I have to edit the highlighted parts with my own stuff or does it do it automatically when I go to different team pages
 
.spider.
Lead Mod
offline
Link
 
Originally posted by ProfessionalKop
Do I have to edit the highlighted parts with my own stuff or does it do it automatically when I go to different team pages


Do you use Tampermonkey?

If so just click on the tampermonkey icon, create new script, paste what highroller put up there, and save.
 
madmal
Prez SWO
offline
Link
 
Originally posted by .spider.
Do you use Tampermonkey?

If so just click on the tampermonkey icon, create new script, paste what highroller put up there, and save.


OK got it. Wipe out all of original new script and insert all of above.

Thanks
Edited by madmal on Jun 18, 2019 11:01:42
 
.spider.
Lead Mod
offline
Link
 
Originally posted by madmal
OK got it. Wipe out all of original new script and insert all of above.

Thanks


yeah, sorry, thought that was assumed....
 
madmal
Prez SWO
offline
Link
 
Originally posted by .spider.
yeah, sorry, thought that was assumed....


Yes at first I didn't notice the top part was duplicated.
 
ProfessionalKop
Gangstalicious
offline
Link
 
nvm. worked. im just dumb .ty
Edited by ProfessionalKop on Jun 18, 2019 20:44:08
 
.spider.
Lead Mod
offline
Link
 
Originally posted by ProfessionalKop
nvm. worked. im just dumb .ty


also assumed
 


You are not logged in. Please log in if you want to post a reply.