您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Auto expand things on lending club
当前为
- // ==UserScript==
- // @name Lending Club
- // @namespace http://geekminute.com/
- // @version 0.6
- // @description Auto expand things on lending club
- // @match https://www.lendingclub.com/*
- // @copyright 2015+, Jon Heizer
- // ==/UserScript==
- setTimeout(function() {
- //If there are any errors on the screen, jump out
- if (document.querySelectorAll("#master_message-list > *").length > 0 && document.documentElement.innerHTML.indexOf('There was no activity during this period') > -1 )
- {
- return;
- }
- //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)
- {
- var yest = new Date();
- yest.setDate(yest.getDate()-1);
- document.getElementById("start-date").value = (yest.getMonth() + 1).toString() + "/" + yest.getDate().toString() + "/" + yest.getFullYear().toString();
- document.getElementById("submitAccountDates").click();
- }
- setTimeout(function (){
- //If there are any errors on the screen, jump out
- if (document.querySelectorAll("#master_message-list > *").length > 0 && document.documentElement.innerHTML.indexOf('There was no activity during this period') > -1)
- {
- return;
- }
- //Any resizing combo
- var sel = document.querySelector("select[id^='yui-pg0-0']");
- 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);
- }
- }
- },200);
- //Add totals to detail tables
- setTimeout(function (){
- TableTotals();
- },1000);
- },500);
- function TableTotals(){
- if (document.querySelectorAll("#detailPanel-div").length > 0)
- {
- //Give the table a moment to fill before calculating
- setTimeout(function (){
- var totalLine = document.querySelectorAll("div.bd div")[0];
- //Principal
- var prin = document.querySelectorAll("td.yui-dt-col-principal div");
- var ptotal = 0;
- for (i = 0; i < prin.length; ++i) {
- ptotal += parseFloat(prin[i].title.substr(1));
- }
- totalLine.innerHTML+= " <em>Principal:</em> <strong>$" + ptotal.toFixed(2).toString() + "</strong>";
- //Interest
- prin = document.querySelectorAll("td.yui-dt-col-interest div");
- ptotal = 0;
- for (i = 0; i < prin.length; ++i) {
- ptotal += parseFloat(prin[i].title.substr(1));
- }
- totalLine.innerHTML+= " <em>Interest:</em> <strong>$" + ptotal.toFixed(2).toString() + "</strong>";
- totalLine.innerHTML+= " <em>Count:</em> <strong>" + (prin.length).toString() + "</strong>";
- },1000);
- }else{
- setTimeout(function (){
- TableTotals();
- },1000);
- }
- }