您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Show hidden info on Quickmatch page
当前为
// ==UserScript== // @name OkCupid Hidden Quickmatch Info // @namespace http://thlayli.detrave.net // @version 1.0 // @description Show hidden info on Quickmatch page // @author Nathan Blume // @match http://www.okcupid.com/quickmatch // @grant none // ==/UserScript== // show nonsensical attractiveness number var showAttractiveness = false; var secret_orientation; var secret_status; function updateMoreInfo(){ if(!$("enemy")){ $("match").firstElementChild.innerHTML += ' <span style="color: #949aa6; display: inline;" id="enemy"></span>'; } if(!$("more_info")){ $("left").innerHTML = "<div id=\"more_info\"></div>" + $("left").innerHTML; } switch(Quickmatch.stack[0].orientation) { case 1: secret_orientation = "Straight"; break; case 2: secret_orientation = "Gay"; break; case 3: secret_orientation = "Bisexual"; break; default: secret_orientation = Quickmatch.stack[0].orientation; } switch(Quickmatch.stack[0].status) { case 1: secret_status = "Single"; break; case 2: secret_status = "Seeing Someone"; break; case 3: secret_status = "Married"; break; case 5: secret_status = "Open Relationship"; break; case 8: secret_status = "Mostly Nonmonogamous"; break; default: secret_status = Quickmatch.stack[0].status; } $("enemy").innerHTML = '| <strong class="percent">' + Quickmatch.stack[0].epercentage + '</strong>% Enemy'; $("more_info").innerHTML = "<h3>More Info</h3>" + "<br />Screen Name: " + Quickmatch.stack[0].sn + "<br />Orientation: " + secret_orientation + "<br />Status: " + secret_status; if(Quickmatch.stack[0].attractiveness && showAttractiveness === true) $("more_info").innerHTML += "<br />Attractiveness: " + Quickmatch.stack[0].attractiveness; $("more_info").innerHTML += "<br /><br />"; } var startTracing = function (onnew) { window.ajaxRequestComplete = 'no';//Make as a global javascript variable window.ajaxRequestStarted = 'no'; XMLHttpRequest.prototype.uniqueID = function() { if (!this.uniqueIDMemo) { this.uniqueIDMemo = Math.floor(Math.random() * 1000); } return this.uniqueIDMemo; }; XMLHttpRequest.prototype.oldOpen = XMLHttpRequest.prototype.open; var newOpen = function(method, url, async, user, password) { ajaxRequestStarted = 'open'; /*alert(ajaxRequestStarted);*/ this.oldOpen(method, url, async, user, password); }; XMLHttpRequest.prototype.open = newOpen; XMLHttpRequest.prototype.oldSend = XMLHttpRequest.prototype.send; var newSend = function(a) { var xhr = this; var onload = function() { ajaxRequestComplete = 'loaded'; //print info to page updateMoreInfo(); }; var onerror = function( ) { ajaxRequestComplete = 'Err'; /*alert(ajaxRequestComplete);*/ }; xhr.addEventListener("load", onload, false); xhr.addEventListener("error", onerror, false); xhr.oldSend(a); }; XMLHttpRequest.prototype.send = newSend; }; startTracing(); updateMoreInfo();