Lending Club

Auto expand things on lending club

目前为 2015-06-10 提交的版本,查看 最新版本

// ==UserScript==
// @name       Lending Club
// @namespace  http://geekminute.com/
// @version    0.1
// @description  Auto expand things on lending club
// @match      https://www.lendingclub.com/*
// @copyright  2015+, Jon Heizer
// ==/UserScript==

setTimeout(function() {  
    
    //Expand loan performance
    if (document.getElementById("showLoanPerf") !== null)
    {
       document.getElementById("showLoanPerf").getElementsByTagName("a")[0].click();
    }

    //Expand payment history
    if (document.getElementById("showPayments") !== null)
    {
        document.getElementById("showPayments").getElementsByTagName("a")[0].click();
    }
    
    //Account Activity
    if (document.getElementById("submitAccountDates") !== null && document.getElementById("lender-activity-div") === null)
    {
        document.getElementById("submitAccountDates").click();
    }
    
    //All Notes
    var sel = document.getElementById("yui-pg0-0-rpp41");
    
    //Portfolios
    if (sel === null)
    {
        sel = document.getElementById("yui-pg0-0-rpp34");
    }
    
    if (sel !== null)
    {
        sel.value = 10000;
    
        if ('fireEvent' in sel)
            sel.fireEvent("onchange");
        else {
            var evt = document.createEvent("HTMLEvents");
            evt.initEvent("change", false, true);
            sel.dispatchEvent(evt);
        }
    }
       
 
},500);