您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Fix quick people search for Fellowshipone to intelligently handle phone #, email, or address searches. This also appends search links to the address and
// ==UserScript== // @name FellowshipOne Smart Quick Search // @namespace [email protected] // @version 0.8 // @description Fix quick people search for Fellowshipone to intelligently handle phone #, email, or address searches. This also appends search links to the address and // @author Tony Visconti // @match https://portal.fellowshipone.com/Search/List.aspx?* // @grant none // ==/UserScript== var searchTerm = document.getElementById("txtName").value; //window.alert(searchTerm); // if there is an @ in the search term or a 10 digit phone numeber resubmit the search as an email address search if(searchTerm.indexOf("@")>-1 || searchTerm.match(/\d{10}/)) { document.getElementById("txtCommunication").value = searchTerm; document.getElementById("txtName").value = ""; document.getElementById("submitQuery").click(); } //if the search starts of with numbers follow by a space and alpha charters then resubmit search as an address search if(searchTerm.match(/\d+\s[A-Za-z].*/) !== null) { document.getElementById("txtAddress").value = searchTerm; document.getElementById("txtName").value = ""; document.getElementById("submitQuery").click(); } var addressElem = document.querySelector("div.street-address"); if(addressElem != null) { var address = addressElem.innerHTML; addressElem.innerHTML += '<a href="https://portal.fellowshipone.com/Search/List.aspx'+ '?inactivePreferencePresent=1&btnSearchIndividual=Search&searchFor=&address=' + address + '&communication=&includeInactive=showInactive">[s]</a>'; } var emailAddressElem = document.querySelector("div.email a.value"); if(emailAddressElem != null) { var emailAddress = emailAddressElem.innerText; emailAddressElem.innerHTML += '<a href="https://portal.fellowshipone.com/Search/List.aspx?inactivePreferencePresent=1'+ '&btnSearchIndividual=Search&searchFor=&address=&communication=' + emailAddress + '&includeInactive=showInactive"> [s]</a>'; } var phoneNumElem = document.querySelector("div.tel span.value"); if(phoneNumElem != null) { var phoneNum = phoneNumElem.innerText; phoneNumElem.innerHTML += '<a href="https://portal.fellowshipone.com/Search/List.aspx?inactivePreferencePresent=1'+ '&btnSearchIndividual=Search&searchFor=&address=&communication=' + phoneNum + '&includeInactive=showInactive">[s]</a>'; }