邦德提取网页广告链接

提取网页(如色情)广告链接

当前为 2021-10-12 提交的版本,查看 最新版本

// ==UserScript==
// @name         邦德提取网页广告链接
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  提取网页(如色情)广告链接
// @author       木木
// @match        htt*://*/*
// @require      https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js
// ==/UserScript==

(function() {
    'use strict';
    // Your code here...
    console.log(999);
    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>`);
    }
})();