jav01 markList

add marklist for jav01 by javdb

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         jav01 markList
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  add marklist for jav01 by javdb
// @author       moonwizard
// @match        https://www.av01.tv/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=av01.tv
// @grant        GM_xmlhttpRequest
// ==/UserScript==

(function () {
	'use strict';


	let fanHao = document.getElementById('id_list').children[5].innerHTML;
	console.log(fanHao);
	let myUrl = "https://javdb.com/search?q=" + fanHao;
    let trueUrl = "";

    console.log('我的脚本加载了');
	var button = document.createElement("button"); //创建一个input对象(提示框按钮)
	button.id = "mark";
	button.textContent = "收藏";


    GM_xmlhttpRequest({
      method: "GET",
      url: myUrl,
      onload: function (res) {

          let domNew = new DOMParser().parseFromString(res.responseText, "text/html");
          let tempUrl = domNew.getElementsByClassName('box')[0] + "";
          console.log(tempUrl);
          trueUrl = "https://javdb.com/v" + tempUrl.substring(tempUrl.lastIndexOf('/'),tempUrl.length);
          console.log('lalalall' + trueUrl);

      },
    });


	//绑定按键点击功能
	button.onclick = function (){
        console.log('open:' + trueUrl)
		window.open(trueUrl);
		return;
	};

    var x = document.getElementsByClassName('info_row')[0];
	x.appendChild(button);

})();