Clickable smrtPhone Links

Make Google Maps and Zillow links clickable

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name Clickable smrtPhone Links
// @description Make Google Maps and Zillow links clickable
// @include https://*
// @grant none
// @version 0.0.1.20211107015944
// @namespace https://greasyfork.org/users/832223
// ==/UserScript==

function main(where) {
  // do stuff here with  where  instead of  document
  // e.g. use  where.querySelector()  in place of  document.querySelector()
  // and add stylesheets with  where.head.appendChild(stylesheet)
}

main(document); // run it on the top level document (as normal)

waitForKeyElements("iframe, frame", function(elem) {
  elem.removeAttribute("wfke_found"); // cheat wfke's been_there, use our own
  for (let f=0; f < frames.length; f++) {
    if (!frames[f].document.body.getAttribute("tr.extra-fields-row")) {

      main(frames[f].document);

      frames[f].document.body.setAttribute("tr.extra-fields-row", 1);
    }
  }
});

var extraFields = document.querySelectorAll("tr.extra-fields-row")
extraFields.forEach(function(extraField) {
    console.log("Before If");
    if ( extraField.innerHTML.includes("https:") ) {
        console.log("Inside If");
        var xInnerHTML = ""
        xInnerHTML = extraField.innerHTML
        xInnerHTML = xInnerHTML.replace( "<span.*<\/span>", "")
        //extraField.innerHTML = xInnerHTML
        extraField.innerHTML = "found https"
    }
});