您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Puts the remaining HIT time in the titlebar.
// ==UserScript== // @name TimerInTitlebar // @namespace https://greasyfork.org/en/users/6503-turk05022014 // @description Puts the remaining HIT time in the titlebar. // @match https://*.mturk.com/projects/*/tasks/* // @grant none // @require http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js // @version 1.3.20180405 // ==/UserScript== this.$ = this.jQuery = jQuery.noConflict(true); var originalTitle = document.title; $(document).ready(function () { setInterval(function () { var otime = $(".completion-timer").parent().filter(":first").data().reactProps.originalTimeToCompleteInSeconds; var ct = $(".completion-timer").text().split(" ")[0].split(":").reverse(); var s = (otime - (parseInt(ct[0]) + (parseInt(ct[1])*60) + (ct[2]?parseInt(ct[2])*60*60:0))) * 1000; var d = new Date(s).toUTCString().replace(/:/g, " ").split(" "); if (d[1] > 1) { document.title = [d[1]-1,d[4],d[5],d[6]].join(":") } else if (d[4] > 0) { document.title = [d[4],d[5],d[6]].join(":") } else { document.title = [d[5],d[6]].join(":") } document.title += " " + originalTitle; }, 1000); });