ykm_leshi

支持乐视视频网页版观看会员视频等

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

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

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

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

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

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

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

Advertisement:

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

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

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

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

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

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

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

Advertisement:

// ==UserScript==
// @name         ykm_leshi
// @namespace    乐视视频
// @version      0.1
// @description  支持乐视视频网页版观看会员视频等
// @author       ykm
// @match        http://www.le.com/ptv/vplay/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=youku.com
// @grant        GM_download
// @grant        GM_addStyle
// @license MIT
// @run-at document-end
// ==/UserScript==

(function() {
    'use strict';
    let css = `
     #download_video1{
      position: fixed;
      top: 5px;
      right: 8px;
      font-size:14px;
      color:#ffffff;
      z-index: 99999;
      background: #2c26f4;
      padding: 15px 22px;
      border-radius: 5px;
    }
     #download_video2{
      position: fixed;
      top: 5px;
      right: 8px;
      font-size:18px;
      color:#ffffff;
      z-index: 99999;
      background:#f6a20a;
      padding: 15px 40px;
      border-radius: 5px;
    }
    .Card css-oyqdpg{
        display:none;
    }
    `
    GM_addStyle(css)
    var jk ='https://jx.we-vip.com/?url='
    var name_title = document.querySelector("title")
    var patt=new RegExp('电影','i') ;
    var title_jic1 = name_title.innerText;
    var result=patt.test(title_jic1);
    if(result == true){
        var name_titles = name_title.innerText
        var atitle_jie =name_titles.indexOf(" - 在线观看")
        var name_mz = name_titles.substring(0, atitle_jie);
        let DIV = document.createElement('div');
        DIV.id = 'download_video1';
        DIV.innerHTML ='点击播放  《'+ name_mz+'》'
        document.body.appendChild(DIV);
        document.getElementById('download_video1').addEventListener('click',function(e){
            var url = jk + window.location.href
            console.log(url)
            var name = name_mz
            var features = 0
            var location = 0
            window.open (url, name, features,location)
        })
    }else if(result == false){

        let DIV1 = document.createElement('div');
        DIV1.id = 'download_video2';
        DIV1.innerHTML ='点击播放 '
        document.body.appendChild(DIV1);
        document.getElementById('download_video2').addEventListener('click',function(e){
            var url = jk + window.location.href
            console.log(url)
            var name = '0'
            var features = 0
            var location = 0
            window.open (url, name, features,location)

        })
    }else {
        console.log("333333333333333");
    }
    // Your code here...
})();