[UserScript] Delete Client YouHosting
UserSCript yang berguna untuk menghapus client pada YouHosting.
Untuk menghapus client pada YouHosting, client tersebut tidak boleh ada account yang aktif.
Dengan script ini, dapat dengan cepat untuk merubah status account menjadi canceled.
// ==UserScript== // @name youhosting.com // @namespace com.youhosting // @description Created by Satria Adhi @ xtrsyz.org // @include http://www.youhosting.com/en/client // @include http://www.youhosting.com/en/client/index/page/* // @require http://code.jquery.com/jquery-1.10.2.js // @grant none // @version 1 // ==/UserScript== function set_timer() { set_checkboxes(0); t = setTimeout(function() { set_timer(); }, 10); } set_checkboxes(); function set_checkboxes(COR) { var cliid; $('tr').each(function(index) { var hostid = $(this).first().children().html(); var n = hostid.search("id") + 3; hostid = hostid.substr(n); n = hostid.search('"'); hostid = hostid.substr(0,n); if(hostid) $(this).append('<td><button class="downloadCancel" s="' + hostid + '" >Cancel client</button></td><td><button class="downloadDelete" s="' + hostid + '" >Delete client</button></td>'); }); } $(function(){ $(".downloadCancel").each(function(i, btn){ $(btn).click(function(){ var s = $(btn).attr("s"); $(btn).html("Please Wait!"); $.post( "http://www.youhosting.com/en/client/change-status/id/" + s, {status: 'canceled', change_accounts: 1, change_vps: 1, reason: 'fraud', notes: '', submit: 'Update'}, function( data ) { $(btn).html("Canceled"); }); }); }); $(".downloadDelete").each(function(i, btn){ $(btn).click(function(){ var s = $(btn).attr("s"); $(btn).html("Please Wait!"); $.post( "http://www.youhosting.com/en/client/delete/cid/8753364/id/" + s, {status: 'canceled', change_accounts: 1, change_vps: 1, reason: 'fraud', notes: '', submit: 'Update'}, function( data ) { $(btn).html("Deleted"); }); }); }); });
——————————————————
// ==UserScript== // @name youhosting.com // @namespace com.youhosting // @description Created by Satria Adhi @ xtrsyz.org // @include *.youhosting.com/* // @require http://code.jquery.com/jquery-1.10.2.js // @grant none // @version 1 // ==/UserScript== function set_timer() { set_checkboxes(0); t = setTimeout(function() { set_timer(); }, 10); } set_checkboxes(); function set_checkboxes(COR) { var cliid; $('a').each(function(index) { if ($(this).hasClass('icon-2')) { cliid = $(this).attr("href"); } if ($(this).hasClass('icon-49')) { var n = cliid.search("id") + 3; $(this).attr("href","/en/client/delete/cid/" + cliid.substr(n) + "/id/" + cliid.substr(n)); $(this).attr("onclick",""); } if ($(this).hasClass('icon-27') && $(this).hasClass('jdax')) { var hostid = $(this).attr("href"); var n = hostid.search("id") + 3; $(this).attr("href","#"); } else if ($(this).hasClass('icon-49')) { var hostid = $(this).attr("href"); var n = hostid.search("id") + 3; } }); $('td').each(function(index) { if ($(this).children().hasClass('icon-27') && $(this).children().hasClass('jdax')) { var hostid = $(this).children().attr("href"); var n = hostid.search("id") + 3; $(this).prepend('<a class="downloadActive" s="' + hostid.substr(n) + '" >Active Account</a> || <a class="downloadCancel" s="' + hostid.substr(n) + '" >Cancel Account</a>'); } }); } $(function(){ $(".downloadCancel").each(function(i, btn){ $(btn).click(function(){ var s = $(btn).attr("s"); $(btn).html("Please Wait!"); $.post( "http://www.youhosting.com/en/client-account/edit/id/" + s, {status: 'canceled', reason: 'none', notes: '', submit: 'Update'}, function( data ) { $(btn).html("Canceled"); }); }); }); $(".downloadActive").each(function(i, btn){ $(btn).click(function(){ var s = $(btn).attr("s"); $(btn).html("Please Wait!"); $.post( "http://www.youhosting.com/en/client-account/edit/id/" + s, {status: 'active', reason: 'none', notes: '', submit: 'Update'}, function( data ) { $(btn).html("Actived"); }); }); }); });
Facebook Comments
Leave a Reply