// ==SiteScript== // @siteName HDPorns4U // @siteUrl https://2kporns4u.com/ // @author mayan // @authorUrl // @scriptUrl // @description // @date 2018/07/19 // @version 0.2.8 // ==/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, "/" ) .replace( /(\d+);/g, function(a,b){return String.fromCharCode(parseInt(b,10));} ) .replace( /([0-9a-f]+);/ig, function(a,b){return String.fromCharCode(parseInt(b,16));} ); } } var _G = {}; _G.priorDlUrl = false; _G.showMsg = true; function isSiteUrl( url ) { if ( url.match( /https?:\/\/(?:www\.)?2kporns4u\.com\/(?:video|shop)\/[^\/?]+/ ) ) return true; if ( url.match( /https?:\/\/(?:www\.)?2kporns4u\.com\/?(\?.+)/i ) && RegExp.$1.match( /[?&]p=\d+/ ) ) return true; if ( url.match( /https?:\/\/(?:www\.)?ohyeah1080\.com\/(?:video|shop)\/[^\/?]+/ ) ) return true; if ( url.match( /https?:\/\/(?:www\.)?ohyeah1080\.com\/?(\?.+)/i ) && RegExp.$1.match( /[?&]p=\d+/ ) ) return true; if ( url.match( /https?:\/\/(?:www\.)?javuncensored1080\.com\/(?:video|shop)\/[^\/?]+/ ) ) return true; if ( url.match( /https?:\/\/(?:www\.)?javuncensored1080\.com\/?(\?.+)/i ) && RegExp.$1.match( /[?&]p=\d+/ ) ) return true; //old if ( url.match( /https?:\/\/(?:www\.)?hdporns4u\.com\/(?:video|shop)\/[^\/?]+/ ) ) return true; if ( url.match( /https?:\/\/(?:www\.)?hdporns4u\.com\/?(\?.+)/i ) && RegExp.$1.match( /[?&]p=\d+/ ) ) return true; //iframe if ( url.match( /https?:\/\/(?:www\.)?(2kporns4u\.com|javuncensored1080\.com|ohyeah1080\.com|hdporns4u\.com)\/uembed-\d+/ ) ) return true; if ( url.match( /https?:\/\/(?:www\.)?(2kporns4u\.com|javuncensored1080\.com|ohyeah1080\.com|hdporns4u\.com)\/?(\?.+)/i ) && RegExp.$2.match( /[?&]uembed=\d+/ ) ) return true; return false; } function getVideoDetail( url ) { if ( !_G || typeof _G != "object" ) _G = {}; url = url.replace( /:\/\/(?:www\.)?hdporns4u\.com\//, "://2kporns4u.com/" ); url = url.replace( /:\/\/www\./, "://" ); url = url.replace( /^http:\/\//, "https://" ); var domain = ""; var bk_title = ""; var vid = ""; var type = ""; if ( url.match( /https?:\/\/(?:www\.)?(2kporns4u\.com|javuncensored1080\.com|ohyeah1080\.com|hdporns4u\.com)\/(?:video|shop)\/([^\/?]+)/ ) ) { domain = RegExp.$1; bk_title = RegExp.$2; try { bk_title = decodeURIComponent( bk_title ) } catch ( e ) { bk_title = "" } type = "page"; } else if ( url.match( /https?:\/\/(?:www\.)?(2kporns4u\.com|javuncensored1080\.com|ohyeah1080\.com|hdporns4u\.com)\/?(\?.+)/i ) ) { domain = RegExp.$1; var prm = RegExp.$2; if ( prm.match( /[?&]p=(\d+)/ ) ) { vid = RegExp.$1; type = "page"; } else if ( prm.match( /[?&]uembed=(\d+)/ ) ) { vid = RegExp.$1; type = "iframe"; } else { type = "unknown"; //return null; } } else if ( url.match( /https?:\/\/(?:www\.)?(2kporns4u\.com|javuncensored1080\.com|ohyeah1080\.com|hdporns4u\.com)\/uembed-(\d+)/ ) ) { domain = RegExp.$1; vid = RegExp.$2; type = "iframe"; } else { //return null; } var part = ""; if ( url.match( /[?&]tape=(\d+)/ ) ) part = RegExp.$1; if ( type == "iframe" ) url = "https://" + domain + "/?p=" + vid; var craving = new CravingSiteScript(); var objRef = { "text":"" }; try { objRef.text = craving.getResponseText( url ); } catch ( e ) { objRef.text = ""; var errno = e.number & 0xffff; } if ( errno == 5 ) { url = redirectUrl( url ); try { objRef.text = craving.getResponseText( url ); } catch ( e ) { objRef.text = ""; } } //if ( !objRef.text ) return null; if ( !vid && objRef.text.match( /]*?rel\s*=\s*('|")?shortlink\2[^>]*)>/im ) && RegExp.$1.match( /\s+href\s*=\s*('|")(.*?)\1/im ) && RegExp.$2.match( /[?&]p=(\d+)/ ) ) { vid = RegExp.$1; } var title = ""; if ( objRef.text.match( /