thaieibvn / BG68 to VCB IB

// ==UserScript==
// @name         BG68 to VCB IB 
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Kết nối BigGame68 vào VCB EBanking
// @author       You
// @match        https://www.vietcombank.com.vn/ibanking2015/*/chuyentien/taikhoan/chuyentientronghethong*
// @grant        none
// ==/UserScript==
(function() {
    'use strict';

    var str = document.location.href;
    var res = str.split("/");
    var para = res[res.length-1].split("_"); // toAcc.outerText + "_" + sotien.outerText +"_"+ dg ;
    
    
    
    document.getElementById("SoTaiKhoanNguoiHuong").value = para[0];

    document.getElementById("NoiDungThanhToan").value = findAndReplace(para[2],'%20',' ');
    document.getElementById("SoTien").value = para[1];
   // document.getElementById("Step1").submit();

        
   // var dg = getElementByXpath1('//*[@id="NoiDungThanhToan"]');
    //dg.value = 'sasasa';//res;
    
})();

 
window.setTimeout(
    function()
    {
        
       
    },
    3000
) ;
function findAndReplace(string, target, replacement) {
 
    var i = 0, length = string.length;

    for (i; i < length; i++) {

        string = string.replace(target, replacement);

    }

    return string;
 
}
function getElementByXpath1(path) {
  return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
}