JavCommon

JavCommonDESC

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.sleazyfork.org/scripts/455040/1278411/JavCommon.js

function getLinks(idCode){
     return {
           'Jav Trailers' : `https://javtrailers.com/search/${idCode}`,
           'Jav Lib' : `http://www.javlibrary.com/en/vl_searchbyid.php?keyword=${idCode}`,
           'Arc Jav' : `https://arcjav.com/?s=${idCode}`,
           'JavGG' : `https://javx357.com/?s=${idCode}`,
           'Missav' : `https://missav.com/en/search/${idCode}`,
           'Original' : `https://sukebei.nyaa.si/?f=0&c=0_0&q=${idCode}`,
           'SUPJAV' : `https://supjav.com/?s=${idCode}`,
           'One Jav' : `https://onejav.com/search/${idCode}`,
           'FF Jav' : `https://ffjav.com/?s=${idCode}`,
           'SXTB' : `https://sextb.net/search/${idCode}`,
           'CATSUB' : `https://www.subtitlecat.com/index.php?search=${idCode}`,
           'STORE' : `https://javstore.net/search/${idCode}.html`,
           'PRELEECH' : 'https://leechpremium.net/',
           'TORSITEHD' : 'https://www.b9m4w.com/'
     }
}

function getLinkTags(idCode,className){
   isSeperateNeeded = className ? true: false;
   const links = getLinks(idCode);
   let link = isSeperateNeeded ? '<ul>' : '';
   Object.keys(links).map(val=>{
       link += `${isSeperateNeeded ? '<li>' : ''}<a class='${className}' target='_blank' href='${links[val]}'>${val}</a>${isSeperateNeeded ? '</li>' : ''}`;
   });
   return link;
}