获取店匠product id

xxx

// ==UserScript==
// @name         获取店匠product id
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  xxx
// @author       You
// @match        https://www.xxx.com/collections*
// @match        https://www.xxx.com/search*
// @icon         https://www.google.com/s2/favicons?domain=tasiliya.com
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Your code here...

    function getId(){
          let ps = document.querySelectorAll(".product-snippet")
          function insertP(chNode){
              var p = document.createElement("div")
              p.classList.add("hahaha")
              if (!chNode.contains(chNode.querySelector(".hahaha"))){
                  chNode.insertBefore(p, chNode.firstElementChild)
                  p.innerText = chNode.dataset.trackId
              }
          }
        ps.forEach((i)=>{
            insertP(i)})
    }

    setInterval(()=>{
      getId()
    },1000)
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址