Sleazy Fork is available in English.

222号巴士通票

巴士通票,一票在手,天下我有。无论是VIP限制,还是两个小时限制,统统无视。

ของเมื่อวันที่ 04-02-2017 ดู เวอร์ชันล่าสุด

// ==UserScript==
// @name         222号巴士通票
// @namespace    undefined
// @version      0.1.5
// @description  巴士通票,一票在手,天下我有。无论是VIP限制,还是两个小时限制,统统无视。
// @author       c.c.木头
// @homepage     https://sleazyfork.org/zh-CN/scripts/26927
// @include      *://*bus222.com/*op=view*
// @include      *://*avbus77.com/*op=view*
// @include      *://*kkk551.com/*op=view*
// @include      *://88xx.me/*op=view*
// @grant        none
// @run-at       document-end
// @license      MIT License
// @compatible   safari
// @compatible   chrome
// @compatible   firefox 未测试
// @compatible   opera 未测试
// @require      http://cdn.bootcss.com/jquery/2.1.4/jquery.min.js
// ==/UserScript==

(function() {
    'use strict';

    $(function(){
        if(has_flash()){
            get_flash();
        }
        else{
            get_mp4();
        }
    });

    function has_flash(){
        var isIE = !-[1,];
        if(isIE){
            try{
                return !!new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
            }
            catch(e){
            }
        }
        else {
            try{
                return !!navigator.plugins['Shockwave Flash'];
            }
            catch(e){
            }
        }
        return false;
    }

    function get_flash(){
        var reg = new RegExp('p2ps_embed\((.*)?\);');
        var html = document.getElementsByTagName('html')[0].innerHTML;
        var match = html.match(reg)[0];
        match = match.replace('data.onepwd', '""');

        var play_view = $('#play_view');
        if(play_view.length === 0){
            play_view = $('#playvideo');
        }
        play_view.attr({width: "694px", height: "434px"});
        var phtml = '<div id="p2ps_video"><h1>我们需要Flash player 10.1或以上版本来播放。</h1><p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="安装最新的Flash player" /></a></p></div>';
        play_view.html(phtml);
        eval(match);
    }

    function get_mp4(){
        var rnd_ip = $("#rnd_ip").val();
        var reg = new RegExp(":8080(.*)?.m3u8");
        var html = document.getElementsByTagName('html')[0].innerHTML;
        var match = html.match(reg)[0];
        var m3u8 = rnd_ip + match;
        var play_view = $('#play_view');
        if(play_view.length === 0){
            play_view = $('#playvideo');
        }
        play_view.attr({width: "694px", height: "434px"});
        play_view.css("background-image", "url('')");
        var phtml = '<video width="694px" height="434px" controls><source src="' + m3u8 + '" type="application/x-mpegURL">Your browser does not support the video tag.</video>';
        play_view.html(phtml);
    }

})();