lalala

某网站的游客三次播放限制,需禁用cookie

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         lalala
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  某网站的游客三次播放限制,需禁用cookie
// @author       You
// @match        http://www.mitaozhi.net/**
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    XMLHttpRequest.prototype.realOpen = XMLHttpRequest.prototype.open;


    $(".index-integral-container").remove();
    var myOpen = function(method, url, async, user, password) {
        //do whatever mucking around you want here, e.g.
        //changing the onload callback to your own version

        // "http://www.mitaozhi.net/v/video_v_href/24463?flag=0&fingerprint=sdfz"
        if(url.indexOf("fingerprint")==-1){
            this.realOpen (method, url, async, user, password);
            console.log("yes",url);
            return;
        };
        var url1=url.substring(0,url.indexOf("fingerprint"))+"fingerprint="+uuid();
        var url2=url.substring(url.indexOf("fingerprint"))+"fingerprint="+uuid();
        this.realOpen (method, url1, async, user, password);
        //call original

    };


   var uuid = (function (uuidRegEx, uuidReplacer) {
        return function () {
            return "xxxxxxxxxxxxxxxxxxxxxxxx4xyxxxxx".replace(uuidRegEx, uuidReplacer).toUpperCase();
        };
    })(/[xy]/g, function (c) {
        var r = Math.random() * 16 | 0,
            v = c == "x" ? r : (r & 3 | 8);
        return v.toString(16);
    });

    //ensure all XMLHttpRequests use our custom open method
    XMLHttpRequest.prototype.open = myOpen ;
})();