您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
提取网页(如色情)广告链接
当前为
// ==UserScript== // @name 邦德提取网页广告链接 // @namespace http://tampermonkey.net/ // @version 0.2 // @description 提取网页(如色情)广告链接 // @author 木木 // @match * // @require https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js // ==/UserScript== (function() { 'use strict'; // Your code here... // console.log(333); //添加提取按钮到屏幕右上角 // console.log(222, document.querySelector('iframe').src); // iframe = document.querySelector('iframe'); // if (iframe) { // location.href = iframe.src; // } // if ($x) { // console.log($x("//img[not(@title)]/ancestor::a[not(@title)]/@href")); // } console.log(111, $("img:not([title])").parents("a")); var alist = $("img:not([title])").parents("a:not([title]"); var ahref = []; for (var index in alist) { if (alist[index].href) { ahref.push(alist[index].href); } } console.log(ahref); var ahref_content = ahref.join("\r\n") if (ahref_content !== '') { $("body").append(`<textarea id="textarea_getad" style="position:fixed;top:5px;right:5px;z-index:10000;width: 500px;height:500px;">${ahref_content}</textarea>`); } // $(document).on('click', '#btn_getad', function() { //提取网页中广告地址 // //如果有iframe 则在新标签页打开 // if ($("iframe")) { // console.log($("iframe").src); // location.href = $("iframe").src; // } // //alist = $x("//img[not(@title)]/ancestor::a[not(@title)]/@href"); // }) })();