OneJAVOneWeb

老司机开车带你飞,一个插件畅览几大JAV网站

Fra og med 29.06.2022. Se den nyeste version.

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

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.

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

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

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!)

/* globals       $ */
// ==UserScript==
// @name         OneJAVOneWeb
// @namespace    https://sleazyfork.org/zh-CN/scripts/428639-onejavoneweb
// @version      2022.0629.2100
// @description  老司机开车带你飞,一个插件畅览几大JAV网站
// @author       匿名老司机
// @license      GPL
// @icon         data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAAAAAAAAQCEeRdzAAAC1klEQVR4nK1V/U+NYRg+/4kxHylUxsx8bD4yH7PxAxmzMfO9qemkcyo5NX1wyEhD6WSpOSXmGG1+UBZJ0rA5FErIGbIoSowu9/1e7znvOfNbvNuznef+uO7rvp/reY4N9f7VWFLQjbh0YHrG6JbmKoZg2ZBQEEB0Kh3xowTUNVkwBMtmoMc6gakOc6Uhgq3+jkljTNCmMVNkxadbMWqTfBti9gEOL/D4NdDaCTS/AFYeAaaZBZYeApqeA2tPEESTL9wFqu8RUGOWHQYedAEpVQI4yQ5U3kHEt70MxhjihNXFFtqKbsCIVabtAdq02MQUYE8F9/k+AdSA5VLBc4vGknpg9gG2sDgPGPpB+/WHnFOUnQz123wGGJsMHK3jfuMpAdQZaOX1J2nc6WGSzm3TaYu1v4ctqi+zhjbXJWBMEnC1DRj+CSw4aALqHLeUMCj5vLQr+yhhk3sF+PUb6JAWv34HFuaSZWIRYytuAxP2Ak+l2LN3xjgswK2lfwNebgUCfUBpA30bigk4NxvoHwIa24FZWcC3YaC2xWBvAW47awFqkp6yVm7qkGKmL6OGhfRkH3UDXR+BdSbbrFojj4DKaIfHAtSZzs8BBqTNm09EDpX0nWvkDHV5m8UvLN3X6DNlZQHuKrcAx8tcEiVgZCRSTtqiHpay1ANRf9sr4EO/KMNlaJSyUUZJppZ2l1MKTi/32raKfVDk8+YTZ6YERCKhr8HPsQk5m1xqXp8yU4c6k3HJbE+/FW5Kw9dm7RVwkWj0yyBtx+o4BgNQgXoH6Ah8pqg14X4nT3JONqVRWBem01Qy7emjTfUaYhhsTb88H4NnZALdvSLmt7x+0WEqcFZzRAr48j1ZzssJPR42I9lexcpq1Nugz9iqQrmSbj4Gup+5H1hzXBi7GKOFEvLlhhVbr44BGGsyMClbT5SDWgzuNSn8ydKluWoLe+oiH9h/WdHBB/Y//wX8ASlYtkPZ5uteAAAAAElFTkSuQmCC
// @match        *://*.javlibrary.com/*
// @match        *://*.n53i.com/*
// @match        *://onejav.com/*
// @match        *://*.141jav.com/*
// @match        *://*.jav321.com/*
// @match        *://*.javbus.com/*
// @match        *://hpjav.tv/*
// @match        *://hpav.tv/*
// @match        *://*.jav321.com/*
// @match        *://jable.tv/*
// @match        *://javdb.com/*
// @include      /^.*://.*?(busjav|buscdn|busdmm|dmmbus|seedmm|dmmsee).*?\..+$/
// @include      /^.*://.*?avmoo.*?\..+$/
// @include      /^.*://javdb3\d+\.com.+$/
// @exclude      *://*.javlibrary.com/*/login.php
// @exclude      *://*.javlibrary.com/login.php
// @exclude      *://*.n53i.com/*/login.php
// @exclude      *://*.n53i.com/login.php
// @require      https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js#sha256=668b046d12db350ccba6728890476b3efee53b2f42dbb84743e5e9f1ae0cc404
// @connect      pics.dmm.co.jp
// @connect      jp.netcdn.space
// @run-at       document-end
// @grant        window.close
// @grant        window.onurlchange
// @grant        GM_openInTab
// @grant        GM_xmlhttpRequest
// @grant        GM_registerMenuCommand
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        GM_deleteValue
// @grant        GM_notification
// @grant        GM_getResourceURL
// @grant        GM_getResourceText
// @grant        GM_addStyle
// @grant        GM_info
// ==/UserScript==
(() => {
 'use strict';
 // console.clear();
 console.time('JAV');
 console.info('老司机开车带你飞');
 console.info('%c ', "background:url('data:image/webp;base64,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') no-repeat;padding:98px 125px;");
 console.info('%cOneJAV插件使用了“思源黑体”字,请确保你的计算机安装了该字体\nhttps://github.com/adobe-fonts/source-han-sans/tree/release/OTF/SimplifiedChinese', 'margin:1px;border:3px solid orange;border-radius:5px;padding:3px;line-height:1.8;');
 //@ts-ignore
 if (GM_getValue('data', '') == '') {
  //@ts-ignore
  GM_setValue('data', [
   { name: 'JAV目錄大全', color: '#fe1773', website: 'https://freejavbt.com', path: '/{{fanHao}}' },
   { name: 'JAVMOVS', color: '#79c142', website: 'https://javmovs.com', path: '/{{fanHao}}' },
   { name: 'Javfree', color: '#df6e05', website: 'https://javfree.sh', path: '/search/movie/{{fanHao}}' },
   { name: 'HPJAV', color: '#f96364', website: 'https://hpjav.tv', path: '/?s={{fanHao}}' },
   { name: 'JAVHD', color: '#cb000d', website: 'https://javhd.today', path: '/search/video/?s={{fanHao}}' },
   { name: 'JAVTRUST', color: '#e38a5a', website: 'https://javtrust.com', path: '/search/movie/{{fanHao}}.html' },
   { name: 'JAVFUN', color: '#79c142', website: 'https://www3.javfun.me', path: '/search/{{fanHao}}' },
   { name: 'BEJAV', color: '#fd6500', website: 'https://bejav.net', path: '/search/{{fanHao}}' },
   { name: 'SEXTOP', color: '#c20001', website: 'https://sextop.net', path: '/?s={{fanHao}}&search=Search' },
   { name: 'JAVDISK', color: '#fe121e', website: 'https://javdisk.com', path: '/search.html?q={{fanHao}}' },
   { name: 'SUPJAV', color: '#d8201d', website: 'https://supjav.com', path: '/?s={{fanHao}}' },
   { name: 'SVJAV', color: '#cc2748', website: 'https://svjav.com', path: '/{{fanHao}}/' },
   { name: 'FBJAV', color: '#365899', website: 'https://fbjav.com', path: '/{{fanHao}}/' },
   { name: 'JAVUSA', color: '#0f0f0f', website: 'https://javusa.com', path: '/jav/{{fanHao}}/' },
   { name: 'JAVHDPorn', color: '#fa9f22', website: 'https://www2.javhdporn.net', path: '/video/{{fanHao}}/' },
   { name: 'JAVHHH', color: '#da2657', website: 'https://javhhh.com', path: '/video/{{fanHao}}/' },
   { name: 'KISSJAV', color: '#00a2e8', website: 'https://kissjav.com', path: '/search/video/?s={{fanHao}}' },
   { name: 'JAVSKY', color: '#ca6e00', website: 'https://javsky.tv', path: '/search/movie/{{fanHao}}' },
   { name: 'JavDragon', color: '#ec4caf', website: 'https://javdragon.com', path: '/{{bango}}/' },
   { name: 'JAVBEL', color: '#ff5b15', website: 'https://javbel.com', path: '/search.php?q={{fanHao}}' },
   { name: 'Javmix', color: '#f7c54c', website: 'https://javmix.tv', path: '/video/{{fanHao}}/' },
   { name: 'JAV-FOR', color: '#f0542e', website: 'https://jav-for.me', path: '/' },
   { name: 'av-Drive', color: '#8ce1f5', website: 'https://av-drive.blogspot.com', path: '/' },
   { name: 'GGJAV', color: '#2287f0', website: 'https://ggjav.com', path: '/ja/main/search?string={{fanHao}}' },
   { name: 'WideAV', color: '#3e7bee', website: 'https://wideav.com', path: '/search?keyword={{fanHao}}' },
   { name: 'JAVCL', color: '#ffcc00', website: 'https://javcl.com', path: '/search/{{fanHao}}/' },
   { name: 'JAV321', color: '#777', website: 'https://www.jav321.com', path: '/?bango={{fanHao}}' },
   { name: 'Jable', color: '#0077ac', website: 'https://jable.tv', path: '/search/{{fanHao}}/' },
   { name: 'JavDB', color: '#0a0a0a', website: 'https://javdb.com', path: '/search?q={{fanHao}}' },
   { name: 'OneJAV', color: '#f5da47', website: 'https://onejav.com', path: '/search/{{bango}}' },
   { name: 'AVMOO', color: '#cc0000', website: 'https://avmoo.click', path: '/cn/search/{{fanHao}}' },
   { name: 'JavBus', color: '#febe00', website: 'https://www.javbus.com', path: '/search/{{fanHao}}' },
   {
    name: 'JAVLibrary',
    color: '#f908bb',
    website: 'https://www.javlibrary.com',
    path: '/cn/vl_searchbyid.php?keyword={{fanHao}}'
   },
   { name: 'SEXTB', color: '#f5c823', website: 'https://sextb.net', path: '/{{fanHao}}' },
   { name: 'JAVGG', color: '#151515', website: 'https://javgg.net', path: '/jav/{{fanHao}}/' }
  ]);
  //@ts-ignore
  if (GM_getValue('version')) {
   //@ts-ignore
   GM_deleteValue('version');
  }
 }
 //@ts-ignore
 GM_registerMenuCommand('更新', () => {
  //@ts-ignore
  GM_openInTab('https://sleazyfork.org/zh-CN/scripts/428639-onejavoneweb', {
   active: true,
   insert: true,
   setParent: true
  });
 });
 //@ts-ignore
 GM_registerMenuCommand('下载思源黑体字体', () => {
  //@ts-ignore
  GM_openInTab('https://cdn.jsdelivr.net/gh/adobe-fonts/source-han-sans@release/OTF/SimplifiedChinese/SourceHanSansSC-Regular.otf', { active: true, insert: true, setParent: true });
 });
 // @ts-ignore basic style
 GM_addStyle(`.absolute{position:absolute}.relative{position:relative}.jav_tab{overflow:auto;width:410px;max-height:300px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:wrap;flex-wrap:wrap;text-align:start;font-family:'思源黑体';font-weight:700;font-size:18px;z-index:9999;background-color:#fff}.jav_tab .jav_web{line-height:1.6;cursor:pointer;border:1px solid #eee}.jav_mask{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;background-color:rgba(0,0,0,0.8)}.jav_mask .jav_setting_panel{width:760px;max-height:700px;padding:20px 0 20px 10px;background-color:#fff;color:#000;border-radius:20px;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);position:fixed;top:50%;left:50%;overflow-y:auto;font-family:'思源黑体';font-size:16px;line-height:1.6;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;text-align:start}.jav_mask .jav_setting_panel .table{max-height:400px;overflow-y:auto}.jav_mask .jav_setting_panel .table table{border-collapse:collapse}.jav_mask .jav_setting_panel .table table tr{border:0;margin:0;padding:0}.jav_mask .jav_setting_panel .table table tr td{border:0;margin:0;padding:0 3px}.jav_mask .jav_setting_panel .table table tr td:last-child{text-align:center}.jav_mask .jav_setting_panel .table .remove{cursor:pointer}.jav_mask .jav_setting_panel .table .remove::after{content:'➖';background-color:red}.jav_mask .jav_setting_panel .table .add{cursor:pointer}.jav_mask .jav_setting_panel .table .add::after{content:'➕';background-color:greenyellow}.jav_mask .jav_setting_panel button{font-weight:500;text-decoration:none;text-align:center;display:inline-block;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;border:none;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:0.3s;transition-duration:0.3s;background-color:#1b9af7;border-color:#1b9af7;border-radius:4px;font-size:16px;height:30px;line-height:30px;padding:0 30px;margin:5px;color:#fff}`);
 class JAV {
  constructor(i) {
   [this.bango, this.fanHao] = (() => {
    const o = i.trim().replace(/ +/, '-');
    let t = o.match(/FC2-?PPV-?(\d+)/i);
    if ((t = o.match(/FC2-?PPV-?(\d+)/i))) {
     return [`FC2PPV${t[1]}`, `FC2PPV-${t[1]}`];
    }
    else if ((t = o.match(/([a-zA-Z]+)-?(\d+)/i))) {
     return [`${t[1].toUpperCase()}${t[2]}`, `${t[1].toUpperCase()}-${t[2]}`];
    }
    else {
     console.info(`JAV:${i}处理失败,反馈给作者修复bug`);
     return [i, i];
    }
   })();
   // @ts-ignore
   this.data = GM_getValue('data');
  }
  render(i) {
   return i.replace('{{fanHao}}', this.fanHao).replace('{{bango}}', this.bango);
  }
  create_table(position = 0) {
   let html = ``;
   for (let index in this.data) {
    let i = Number(index);
    this.data[i].url = `${this.data[i].website}${this.render(this.data[i].path)}`;
    html += `<div class="jav_web"><a style="text-decoration:none;color:${this.data[i].color};" target="_blank" href="${this.data[i].url}">${this.data[i].name}</a></div>`;
   }
   html += `<div id="jav_setting_button" class="jav_web">🛠设置</div>`;
   if (position == 0) {
    // absolute
    html = `<div id="jav_table" class="jav_tab absolute">${html}</div>`;
   }
   else {
    // inherit
    html = `<div id="jav_table" class="jav_tab">${html}</div>`;
   }
   return html;
  }
  setting_init() { }
 }
 $('body').on('click', '#jav_setting_button', () => {
  let settingHtml = `<div id="jav_mask" class="jav_mask">
      <div id="jav_setting_panel" class="jav_setting_panel">
        <div class="table">
          <table>
            <tr>
              <th>名称</th>
              <th>颜色</th>
              <th>网站</th>
              <th>路径</th>
              <th>操作</th>
            </tr>
          </table>
        </div>
      <div>
        <label for="auto_jump">自动跳转</label>
        <input type="radio" name="auto_jump" value="true">开
        <input type="radio" name="auto_jump" value="false">关
      </div>
      <div>
        <button id="jav_setting_save">保存并退出</button>
      </div>
      </div>
    </div>`;
  $('body').append(settingHtml);
  // @ts-ignore
  let auto_jump = GM_getValue('auto_jump', true);
  $('input[name="auto_jump"]')
   .eq(0)
   .prop('checked', auto_jump ? true : false);
  $('input[name="auto_jump"]')
   .eq(1)
   .prop('checked', auto_jump ? false : true);
  // @ts-ignore
  let data = GM_getValue('data');
  for (let row of data) {
   $('#jav_setting_panel>.table>table').append(`<tr data>
        <td name><input type="text" value="${row.name}"></td>
        <td color><input type="text" value="${row.color}"></td>
        <td website><input type="text" value="${row.website}"></td>
        <td path><input type="text" value="${row.path}"></td>
        <td class="remove" remove></td>
      </tr>`);
  }
  $('#jav_setting_panel>.table>table').append(`<tr add>
      <td name><input type="text" placeholder="name"></td>
      <td color><input type="text" placeholder="color"></td>
      <td website><input type="text" placeholder="website"></td>
      <td path><input type="text" placeholder="path"></td>
      <td class="add" add></td>
    </tr>`);
 });
 $('body').on('click', 'td[remove]', function () {
  $(this).parent().remove();
 });
 $('body').on('click', 'td[add]', function () {
  let name = $(this).siblings('td[name]').find('input').eq(0).val().toString().trim();
  let color = $(this).siblings('td[color]').find('input').eq(0).val().toString().trim();
  let website = $(this).siblings('td[website]').find('input').eq(0).val().toString().trim();
  let path = $(this).siblings('td[path]').find('input').eq(0).val().toString().trim();
  if (name == '' || color == '' || website == '' || path == '') {
   alert('填入内容不能为空');
   return false;
  }
  let htmlString = `<tr data>
      <td name><input type="text" value="${name}"></td>
      <td color><input type="text" value="${color}"></td>
      <td website><input type="text" value="${website}"></td>
      <td path><input type="text" value="${path}"></td>
      <td class="remove" remove></td>
    </tr>`;
  $('tr[add]').before(htmlString);
  $('tr[add]').find('input').val('');
 });
 $('body').on('click', '#jav_setting_save', () => {
  let data = new Array();
  for (let e of $('tr[data]')) {
   let name = $(e).find('input[type="text"]').eq(0).val().toString();
   let color = $(e).find('input[type="text"]').eq(1).val().toString();
   let website = $(e).find('input[type="text"]').eq(2).val().toString();
   let path = $(e).find('input[type="text"]').eq(3).val().toString();
   data.push({ name, color, website, path });
  }
  let auto_jump = $('input[name="auto_jump"]:checked').val() == 'true' ? true : false;
  $('#jav_mask').remove();
  // @ts-ignore save configuration
  GM_setValue('data', data);
  // @ts-ignore save configuration
  GM_setValue('auto_jump', auto_jump);
 });
 /* OneJAV 141jav */
 if (null != location.hostname.match(/onejav.com|141jav.com/)) {
  (() => {
   $('body').on('mouseenter', '.card.mb-3>.container>.columns>.column:even', function () {
    const bango = $(this).parents('.columns').find('.title.is-spaced>a').text().trim();
    const jav = new JAV(bango);
    $(this).prepend(jav.create_table());
    jav.setting_init();
    return false;
   });
   $('body').on('mouseleave', '.card.mb-3>.container>.columns>.column:even', function () {
    $(this).find('#jav_table').remove();
    return false;
   });
   // Show a table without no search reasult
   if (null != location.pathname.match(/\/search\/[a-zA-Z0-9-]/) && 0 == $('div.card.mb-3').length) {
    const jav = new JAV(location.pathname.substr(8));
    $('body>div.container').append(jav.create_table(1));
   }
  })();
 }
 /* avmoo javbus */
 if (null != location.hostname.match(/avmoo|javbus|busjav|buscdn|busdmm|dmmbus|seedmm|dmmsee/)) {
  (() => {
   const showBoxes = $('.movie-box');
   // @ts-ignore
   if (showBoxes.length == 1 && Number(GM_getValue('auto_jump', '1'))) {
    location.href = showBoxes[0].href;
   }
   $('body').on('mouseenter', '.col-md-9.screencap', function () {
    const bango = $('body > div.container > h3').text().trim().split(' ')[0];
    const jav = new JAV(bango);
    $(this).prepend(jav.create_table());
    jav.setting_init();
    return false;
   });
   $('body').on('mouseleave', '.col-md-9.screencap', function () {
    $(this).find('#jav_table').remove();
    return false;
   });
   $('#sample-waterfall > a').each((_, a) => {
    // @ts-ignore
    GM_xmlhttpRequest({
     method: 'GET',
     url: a.href,
     responseType: 'blob',
     onload: (res) => {
      const blob = new Blob([res.response], { type: 'image/jpeg' });
      a.href = URL.createObjectURL(blob);
     }
    });
   });
  })();
 }
 /* javlibarary */
 if (null != location.hostname.match(/javlibrary|n53i/)) {
  (() => {
   const style = `.pointer,#onejav_modal *{cursor:pointer}#onejav_modal{color:#dcdcdc;font-size:64px;font-weight:700;font-family:'思源黑体';background-color:rgba(0,0,0,0.8);position:fixed;top:0;right:0;bottom:0;left:0;z-index:99}#onejav_modal img{cursor:default;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);position:absolute;top:50%;right:auto;bottom:auto;left:50%}#onejav_modal #left{-webkit-transform:translateY(-50%);transform:translateY(-50%);position:absolute;top:50%;right:auto;bottom:auto;left:10px}#onejav_modal #left::after{content:"◀"}#onejav_modal #left:hover{color:#fff}#onejav_modal #right{-webkit-transform:translateY(-50%);transform:translateY(-50%);position:absolute;top:50%;right:10px;bottom:auto;left:auto}#onejav_modal #right::after{content:"▶"}#onejav_modal #right:hover{color:#fff}#onejav_modal #close{position:absolute;top:0;right:10px;bottom:auto;left:auto}#onejav_modal #close::after{content:"✖"}#onejav_modal #close:hover{color:#fff}`;
   $('head').append(`<style>${style}</style>`);
   const sourceArr = $('#rightcolumn > div.previewthumbs > img').map((_, img) => img.src);
   const srcArr = sourceArr.map((_, source) => {
    const match = source.match(/digital\/video\/(\w+)\/\1-(\d+.jpg)/i);
    const src = source.replace(match[0], `digital/video/${match[1]}/${match[1]}jp-${match[2]}`);
    return src;
   });
   srcArr.each((index, src) => {
    // @ts-ignore
    GM_xmlhttpRequest({
     method: 'GET',
     url: src,
     responseType: 'blob',
     onload: (res) => {
      const blob = new Blob([res.response], { type: 'image/jpeg' });
      srcArr[index] = URL.createObjectURL(blob);
     }
    });
   });
   const modal = $(`<div id="onejav_modal"><img src="" alt="预览大图"/><div id="left"></div><div id="right"></div><div id="close"></div></div>`);
   $('#rightcolumn > div.previewthumbs > img').each(function (index, img) {
    $(img).addClass('pointer');
    $(img).on('click', () => {
     modal.find('img')[0].src = srcArr[index];
     $('body').append(modal);
     let i = 0;
     $('body').on('click', '#onejav_modal>#left', () => {
      i -= 1;
      if (i < 0) {
       i = srcArr.length - 1;
      }
      $('#onejav_modal>img')[0].src = srcArr[i];
      return false;
     });
     $('body').on('click', '#onejav_modal>#right', () => {
      i += 1;
      if (i > srcArr.length - 1) {
       i = 0;
      }
      $('#onejav_modal>img')[0].src = srcArr[i];
      return false;
     });
     $('body').on('click', '#onejav_modal>img', () => {
      return false;
     });
     $('body').on('click', '#onejav_modal', () => {
      $('#onejav_modal').remove();
      $('body').off('keydown.onejav');
      return false;
     });
     $('body').on('keydown.onejav', (event) => {
      if (event.key == 'ArrowLeft') {
       $('#onejav_modal>#left').trigger('click');
      }
      else if (event.key == 'ArrowRight') {
       $('#onejav_modal>#right').trigger('click');
      }
      else if (event.key == 'Escape') {
       $('#onejav_modal').trigger('click');
      }
      return false;
     });
     return false;
    });
   });
   $('body').on('mouseenter', '.video', function () {
    const bango = $(this).find('.id').text().trim().split(' ')[0];
    const jav = new JAV(bango);
    const html = `<div class="newBox" style="position:absolute;z-index:9999;top:0;right:0;"><button style="display:block;" link="${jav.data[29].url}">${jav.data[29].name}</button><button style="display:block;" link="${jav.data[30].url}">${jav.data[30].name}</button><button style="display:block;" link="${jav.data[27].url}">${jav.data[27].name}</button></div>`;
    $(this).prepend(html);
    $('.newBox>button').on('click', function () {
     window.open($(this).attr('link'));
     return false;
    });
   });
   $('body').on('mouseleave', '.video', function () {
    $(this).find('.newBox').remove();
    return false;
   });
   $('body').on('mouseenter', '#video_jacket', function () {
    const bango = $('#video_title > h3').text().trim().split(' ')[0];
    const jav = new JAV(bango);
    $(this).prepend(jav.create_table());
    jav.setting_init();
    return false;
   });
   $('body').on('mouseleave', '#video_jacket', function () {
    $(this).find('#jav_table').remove();
    return false;
   });
  })();
 }
 /* jav321 */
 if (null != location.hostname.match(/jav321/)) {
  (() => {
   if (location.pathname.match(/\/video\/[a-zA-Z0-9-]+/i)) {
    const hinban = $('body > div:nth-child(3) > div.col-md-7.col-md-offset-1.col-xs-12 > div:nth-child(1) > div.panel-body > div:nth-child(1) > div.col-md-9')
     .text()
     .match(/品番: ([a-zA-Z0-9-]+)/i);
    const jav = new JAV(hinban[1]);
    $('body > div:nth-child(3) > div.col-md-7.col-md-offset-1.col-xs-12 > div:nth-child(1) > div.panel-body').append(jav.create_table(1));
   }
   const searchParams = new URLSearchParams(location.search.substr(1));
   if (undefined != searchParams.get('bango')) {
    $('body > div:nth-child(2) > div > nav > div > form:nth-child(2) > div > input')[0].value =
     searchParams.get('bango');
    $('body > div:nth-child(2) > div > nav > div > form:nth-child(2) > div > span > button')[0].click();
    window.close();
   }
  })();
 }
 /* hpjav */
 if (null != location.hostname.match(/hpj?av/)) {
  (() => {
   $('body > div.video-box-ather.container > div:nth-child(1) > div > div.col-md-5').on('mouseenter', function () {
    const bango = location.pathname.slice(location.pathname.lastIndexOf('/') + 1).toUpperCase();
    const jav = new JAV(bango);
    $(this).prepend(jav.create_table());
    jav.setting_init();
    return false;
   });
   $('body > div.video-box-ather.container > div:nth-child(1) > div > div.col-md-5').on('mouseleave', function () {
    $(this).find('#jav_table').remove();
    return false;
   });
  })();
 }
 /* jable */
 if (null != location.hostname.match(/jable/i)) {
  (() => {
   const matches = location.pathname.match(/\/videos\/([a-zA-Z0-9-]+)\//i);
   if (matches) {
    const jav = new JAV(matches[1]);
    $('#site-content > div > div > div:nth-child(1) > section.video-info.pb-3').append(jav.create_table(1));
    jav.setting_init();
   }
  })();
 }
 /* javdb */
 if (null != location.hostname.match(/javdb/i)) {
  const bango = $('div.panel-block.first-block > span').text().trim().split(' ')[0];
  const jav = new JAV(bango);
  $('div.video-meta-panel').after(jav.create_table(1));
  jav.setting_init();
 }
 console.timeEnd('JAV');
})();