// ==SiteScript== // @siteName Jav68 // @siteUrl http://v1.javgo.me/ // @author mayan // @authorUrl // @scriptUrl // @description // @date 2017/04/09 // @version 0.1.6 // ==/SiteScript== function CravingSiteScript() { this._initialize(); } CravingSiteScript.prototype = { _xhr: null, _initialize: function() {}, _getXmlHttpRequest: function() { if ( this._xhr != null ) { return this._xhr; } var xhr = null; var these = [ function() { return new XMLHttpRequest(); } , function() { return new ActiveXObject( "Msxml2.XMLHTTP" ); } , function() { return new ActiveXObject( "Microsoft.XMLHTTP" ); } , function() { return new ActiveXObject( "Msxml2.XMLHTTP.4.0" ); } ]; for ( var i = 0, length = these.length; i < length; i++ ) { var func = these[ i ]; try { xhr = func(); break; } catch( e ) {} } this._xhr = xhr; return this._xhr; }, _load: function( url, data, method ) { var req = this._getXmlHttpRequest(); var mtd = ( method == null ) ? "GET" : "POST"; req.open( mtd, url, false ); if ( mtd == "POST" ) { req.setRequestHeader( "Content-Type", "application/x-www-form-urlencoded" ); } req.send( data ); return req.responseText; }, getResponseText: function( url, data, method ) { return this._load( url, data, method ); }, getResponseJSON: function( url, data, method ) { var text = this._load( url, data, method ); return eval( "("+text+")" ); }, /// Math random: function( limit ) { return Math.floor( Math.random() * limit ); }, /// String decodeHtml: function( str ) { return str.replace( /&(quot|#0*34);/ig, "\"" ) .replace( /&(amp|#0*38);/ig, "&" ) .replace( /&(apos|#0*39);/ig, "'" ) .replace( /&(lt|#0*60);/ig, "<" ) .replace( /&(gt|#0*62);/ig, ">" ) .replace( /&(nbsp|#0*160);/ig, " " ) .replace( /&(frasl|#8260);/ig, "/" ); } } var _JAV68 = {}; _JAV68.showMsg = true; function isSiteUrl( url ) { if ( url.match( /http:\/\/(?:[^\/?]+\.)?javgo\.me\/(?:watch|video)\/[^\/?]*-\d+/ ) ) return true; //if ( url.match( /http:\/\/(?:[^\/?]+\.)?jav68\.tv\/(?:watch|video)\/[^\/?]*-\d+/ ) ) return true; //if ( url.match( /http:\/\/(?:[^\/?]+\.)?jav68\.me\/(?:watch|video)\/[^\/?]*-\d+/ ) ) return true; //if ( url.match( /http:\/\/(?:[^\/?]+\.)?jav68\.com\/(?:watch|video)\/[^\/?]*-\d+/ ) ) return true; if ( url.match( /http:\/\/(?:[^\/?]+\.)?javpub\.me\/(?:watch|video)\/[^\/?]*-\d+/ ) ) return true; if ( url.match( /http:\/\/(?:[^\/?]+\.)?javpub\.com\/(?:watch|video)\/[^\/?]*-\d+/ ) ) return true; if ( url.match( /http:\/\/(?:[^\/?]+\.)?javpub\.vip\/(?:watch|video)\/[^\/?]*-\d+/ ) ) return true; if ( url.match( /http:\/\/(?:[^\/?]+\.)?javuncen\.me\/(?:watch|video)\/[^\/?]*-\d+/ ) ) return true; if ( url.match( /http:\/\/(?:[^\/?]+\.)?javuncen\.com\/(?:watch|video)\/[^\/?]*-\d+/ ) ) return true; if ( url.match( /http:\/\/(?:[^\/?]+\.)?javuncen\.vip\/(?:watch|video)\/[^\/?]*-\d+/ ) ) return true; if ( url.match( /http:\/\/(?:[^\/?]+\.)?javthai\.com\/(?:watch|video)\/[^\/?]*-\d+/ ) ) return true; if ( url.match( /http:\/\/(?:[^\/?]+\.)?javthai\.me\/(?:watch|video)\/[^\/?]*-\d+/ ) ) return true; //if ( url.match( /http:\/\/(?:[^\/?]+\.)?jav68vip\.com\/(?:watch|video)\/[^\/?]*-\d+/ ) ) return true; //if ( url.match( /http:\/\/(?:[^\/?]+\.)?jav68pro\.com\/(?:watch|video)\/[^\/?]*-\d+/ ) ) return true; //if ( url.match( /http:\/\/(?:[^\/?]+\.)?jav68free\.com\/(?:watch|video)\/[^\/?]*-\d+/ ) ) return true; return false; } function getVideoDetail( url ) { if ( typeof _JAV68 != "object" ) _JAV68 = {}; url = url.replace( /^http:\/\/www\./, "http://" ); //url = url.replace( /^http:\/\/(?:[^\/?]+\.)?jav68\.(?:me|com|tv)\//, "http://javgo.me/" ); url = url.replace( /^http:\/\/(?:[^\/?]+\.)?javpub\.(?:com|me)\//, "http://javpub.vip/" ); url = url.replace( /^http:\/\/(?:[^\/?]+\.)?javuncen\.(?:com|me)\//, "http://javuncen.vip/" ); url = url.replace( /^http:\/\/(?:[^\/?]+\.)?javthai\.com\//, "http://javthai.me/" ); if ( url.match( /http:\/\/(?:[^\/?]+\.)?(javgo\.me|jav68\.tv|jav68\.me|javpub\.vip|javuncen\.vip|javthai\.me|jav68vip\.com|jav68pro\.com|jav68free\.com)\/(?:watch|video)\/[^\/?]*-(\d+)/ ) ) { var domain = RegExp.$1.toLowerCase(); var vid = RegExp.$2; } else { //return null; } var craving = new CravingSiteScript(); var objRef = { "text":"" }; try { objRef.text = craving.getResponseText( url ); } catch ( e ) { var errno = e.number & 0xffff; objRef.text = ""; } if ( errno == 5 ) { url = redirectUrl( url ); try { objRef.text = craving.getResponseText( url ); } catch ( e ) { objRef.text = ""; } } if ( !objRef.text ) return null; var title = ""; if ( objRef.text.match( /]*?name\s*=\s*("|')?title\2[^>]*)>/im ) && RegExp.$1.match( /\s+content\s*=\s*("|')(.*?)\1/im ) ) { title = craving.decodeHtml( RegExp.$2 ).replace( /^\s*Watch\s+/i,"" ).replace( /\s*-[^-]*$/,"" ); } if ( !title && objRef.text.match( /]*?property\s*=\s*("|')?og:title\2[^>]*)>/im ) && RegExp.$1.match( /\s+content\s*=\s*("|')(.*?)\1/im ) ) { title = craving.decodeHtml( RegExp.$2 ).replace( /^\s*Watch\s+/i,"" ).replace( /\s*-[^-]*$/,"" ); } if ( !title && objRef.text.match( /