[UserScript] OrderBox Domains Pricing
UserScript untuk update harga domain
// ==UserScript==
// @name OrderBox
// @namespace com.myorderbox
// @description Created by Satria Adhi @ xtrsyz.org
// @include */servlet/ManageTldPricingServlet?*
// @require http://code.jquery.com/jquery-1.10.2.js
// @version 1
// @grant none
// ==/UserScript==
var priceAsFloat = function (price) {
var harga = parseFloat(price.replace(/,/g,'.').replace(/[^\d\.]/g,''));
harga = parseFloat(harga + (harga * 12/100));
return harga.toFixed(2);
}
function set_timer() {
set_checkboxes(0);
t = setTimeout(function() {
set_timer();
}, 10);
}
set_checkboxes();
function set_checkboxes(COR) {
var price = $('#reseller_cp_addnewdomain').children( ".parent-currency" ).html();
var restore = $('#reseller_cp_restoredomain').children( ".parent-currency" ).html();
price = priceAsFloat(price);
restore = priceAsFloat(restore);
var myKey = /restore/;
$('.prices-reseller').each(function(index) {
var myStringVar = $(this).attr('name');
var myMatch = myStringVar.search(myKey);
if(myMatch != -1)
{
$(this).val(restore);
}
else
{
$(this).val(price);
}
});
}
Facebook Comments
Leave a Reply