Porndig - Auto Open Content In New Tab

Porndig - Auto Open Content In New Tab. Porndig 自动打开内容在新的标签页上

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください。
// ==UserScript==
// @name         Porndig - Auto Open Content In New Tab
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Porndig - Auto Open Content In New Tab. Porndig 自动打开内容在新的标签页上
// @author       Martin______X
// @match        https://www.porndig.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=porndig.com
// @grant        none
// @license      MIT
// ==/UserScript==

/* */
let $js_entity_container = "js_entity_container";

/* */
let $js_loader_main_wrapper = "js_loader_main_wrapper";

/* */
const newTabInterval = setInterval(() => {
    //
    let i = 0;
    let js_entity_containers = document.getElementsByClassName($js_entity_container);
    let js_loader_main_wrappers = document.getElementsByClassName($js_loader_main_wrapper);

    let a_list = [];

    for(i = 0; i< js_entity_containers.length; i++){
        a_list.push.apply(a_list, js_entity_containers[i].querySelectorAll('a'));
    }

    for(i = 0; i< js_loader_main_wrappers.length; i++){
        a_list.push.apply(a_list, js_loader_main_wrappers[i].querySelectorAll('a'));
    }

    for(i = 0; i< a_list.length; i++){
        let a = a_list[i];
        if(a){
            let target = a.getAttribute("target");
            if(!target){
                a.setAttribute("target","_blank");
            }
        }
    }
}, 1);