Sleazy Fork is available in English.

javlibrary_preview

preview from r18.com

Version vom 20.09.2018. Aktuellste Version

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         javlibrary_preview
// @version      0.0.12
// @include      http*://*javlibrary.com/*/?v=*
// @description  preview from r18.com
// @grant        GM_xmlhttpRequest
// @grant        GM_download
// @namespace    https://greasyfork.org/users/164996a
// ==/UserScript==
// r18.com
// insert position, no need to wait
const $position = document.querySelector('#video_favorite_edit')
if (!$position) return
// GM_xmlhttpRequest promise wrapper
const gmFetch = url => new Promise((resolve, reject) => {
	GM_xmlhttpRequest({ url: url, method: 'GET', onload: resolve, onerror: reject })
})

const parseHTML = str => {
	const tmp = document.implementation.createHTMLDocument()
	tmp.body.innerHTML = str
	return tmp
}

const avid = document.title.replace(/([^-]+)-([^ ]+) .*/,'$1 $2')

const addToDoc = video_url => {
	const text = video_url
		? `<video id=jav_r18 style='postiton:absolute;z-order:1' src=${video_url} controls autoplay></video>`
		: '<div id=jav_r18 class=header style="text-align:center;padding-top:1rem;">preview not found</div>'
	$position.insertAdjacentHTML('afterend', text)
}

const r18 = async () => {
	const res = await gmFetch(`http://www.r18.com/common/search/order=match/searchword=${avid}`)
	let video_url = ''
	try {
		const video_tag = parseHTML(res.responseText).querySelector('.js-view-sample')
		video_url = ['high', 'med', 'low'].map(i => video_tag.getAttribute('data-video-' + i)).find(i => i)
	} catch (err) { } finally {
		addToDoc(video_url)
	}
}
r18()
// google
const num=6
const baseUrl = `https://www.google.com/search?tbm=vid&num=${num}&safe=images&pws=0&lr=lang_en\
&as_eq=youtube.com+javlibrary.com+pron.tv&q=`
const fetchList = async () => {
	const parser = new DOMParser()
	const res = await gmFetch(baseUrl + avid)
	const doc = parseHTML(res.responseText)
	const url = [...doc.querySelectorAll('.g .r a')].map(i => i.href)
	url.forEach(src => {
		requestAnimationFrame(() => {
			(document.getElementById('jav_r18')||$position).insertAdjacentHTML('afterend', `
			<div style='display:flex'>
			<a href='${src}' target='_blank' style='display:block;width:40em;text-overflow:ellipsis;overflow: hidden;white-space: nowrap'>${src}</a>
			</div>`)
		})
	})
}
fetchList()