Greasy Fork is available in English.

测试点击图片复制图片地址

快速复制图片路径

// ==UserScript==
// @name         测试点击图片复制图片地址
// @icon            http://weibo.com/favicon.
// @namespace       [url=mailto:nanqyzh@163.com]nanqyzh@163.com[/url]
// @author          南墙一枝花
// @description     快速复制图片路径
// @match           *://weibo.com/tv/v/*
// @version         0.0.1
// @grant           GM_addStyle
// ==/UserScript==

(function() {
  

 setTimeout(function ()  {
     alert("点击图片复制图片地址")
    var img = document.getElementsByTagName('img')
    var body = document.querySelector('body');
     var newipt=document.createElement("input");

      newipt.style.display="none"
      body.appendChild(newipt)

    for (var i = 0; i < img.length; i++) {
      img[i].onclick = function () {
          newipt.value = this.src
          newipt.select();
        if (document.execCommand('copy')) {
          document.execCommand('copy');
          alert('复制成功', this.src);
        }
      }
    }
  }, 300);


    // Your code here...
})();