您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Counts up the table rows in the work history dashboard
当前为
- // ==UserScript==
- // @name Quick and dirty job counter
- // @namespace mobiusevalon.tibbius.com
- // @version 0.1
- // @description Counts up the table rows in the work history dashboard
- // @author Mobius Evalon
- // @include /^https{0,1}:\/\/work\.crowdsurfwork\.com\/reports\/work_data\/worker.*$/
- // @grant none
- // ==/UserScript==
- function counter()
- {
- var counter = document.createElement("span");
- var script = document.createElement("script");
- var head = document.getElementsByTagName("head")[0];
- script.type = "text/javascript";
- script.innerHTML = "function count() {"+
- "var table = document.getElementsByTagName('table')[0];"+
- "if(table !== undefined) {"+
- "var tbody = table.getElementsByTagName('tbody')[0];"+
- "if(tbody !== undefined) this.innerHTML = 'Job count: '+tbody.getElementsByTagName('tr').length+' (click to refresh)'; }}";
- head.appendChild(script);
- counter.style.paddingLeft = "10px;"
- counter.innerHTML = "Job count: 0 (click to refresh)";
- if(counter.addEventListener) counter.addEventListener("click",count,false);
- else if(counter.attachEvent) counter.attachEvent("onclick",count);
- return counter;
- }
- var date_filter = document.getElementById("date_filter");
- if(date_filter !== undefined && date_filter.tagName == "SELECT") date_filter.parentNode.appendChild(counter());