// ==SiteScript== // @siteName JUMAV.com // @siteUrl http://www.jumav.com/ // @author mayan // @authorUrl // @scriptUrl // @description // @date 2014/11/13 // @version 0.1 // ==/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 _JumAV = {}; _JumAV.showMsg = true; function isSiteUrl( url ) { if ( url.match( /http:\/\/(?:www\.)?jumav\.com\/(?:en\/)?view\d*\.php(\?.+)/ ) && RegExp.$1.match( /[?&]id=\d+/ ) ) return true; if ( url.match( /http:\/\/(?:www\.)?jumporn\.com\/jumav\/view\d*\.php(\?.+)/ ) && RegExp.$1.match( /[?&]id=\d+/ ) ) return true; if ( url.match( /http:\/\/(?:www\.)?jumporn\.com\/usergun\/view\d*\.php(\?.+)/ ) && RegExp.$1.match( /[?&]id=\d+/ ) ) return true; if ( url.match( /http:\/\/(?:www\.)?jumporn\.com\/userporn\/view\d*\.php(\?.+)/ ) && RegExp.$1.match( /[?&]vkey=[^&]+/ ) ) return true; if ( url.match( /http:\/\/(?:www\.)?jumporn\.com\/userporn\/randyhandy\d*\.php(\?.+)/ ) && RegExp.$1.match( /[?&]vkey=[^&]+/ ) ) return true; return false; } function getVideoDetail( url ) { if ( typeof _JumAV != "object" ) _JumAV = {}; var src = ""; if ( url.match( /http:\/\/(?:www\.)?jumav\.com\/(?:en\/)?view\d*\.php(\?.+)/ ) && RegExp.$1.match( /[?&]id=(\d+)/ ) ) { var vid = RegExp.$1; var type = "jumav"; var pageurl = url; } else if ( url.match( /http:\/\/(?:www\.)?jumporn\.com\/jumav\/view\d*\.php(\?.+)/ ) && RegExp.$1.match( /[?&]id=(\d+)/ ) ) { vid = RegExp.$1; type = "jumporn_jumav"; pageurl = "http://www.jumav.com/view.php?id=" + vid; } else if ( url.match( /http:\/\/(?:www\.)?jumporn\.com\/usergun\/view\d*\.php(\?.+)/ ) && RegExp.$1.match( /[?&]id=(\d+)/ ) ) { vid = RegExp.$1; type = "jumporn_usergun"; pageurl = url; } else if ( url.match( /http:\/\/(?:www\.)?jumporn\.com\/userporn\/view\d*\.php(\?.+)/ ) && RegExp.$1.match( /[?&]vkey=([^&]+)/ ) ) { vid = RegExp.$1; type = "jumporn_userporn"; src = "http://userporn.com/video/" + vid; pageurl = url; } else if ( url.match( /http:\/\/(?:www\.)?jumporn\.com\/userporn\/randyhandy\d*\.php(\?.+)/ ) && RegExp.$1.match( /[?&]vkey=([^&]+)/ ) ) { vid = RegExp.$1; type = "jumporn_randyhandy"; src = "http://randyhandy.com/video/" + vid; pageurl = url; } else { //return null; pageurl = url; type = "unknown"; } var craving = new CravingSiteScript(); var objS = {}; switch ( type ) { case "jumav": case "jumporn_jumav": case "jumporn_usergun": case "unknown": try { var text = craving.getResponseText( pageurl ); } catch ( e ) { text = ""; } if ( !text ) return null; if ( text.match( /