Sleazy Fork is available in English.

部分網站強制導向到日文版面

強制導向到日文版面

// ==UserScript==
// @name           部分網站強制導向到日文版面
// @namespace      部分網站強制導向到日文版面
// @description    強制導向到日文版面
// @version         0.1
// @homepageURL    https://greasyfork.org/scripts/487762/
// @include      /^https://supjav.com\/(?!ja).*/
// @include        /^https://tktube.com/(?!ja).*/
// @include       /^https://jable.tv/.*?/
// @exclude        /^https://supjav.com\/(?=zh).*
// @exclude        /^https://jable.tv/.*?(?=\?lang=jp)


// @license MIT
// ==/UserScript==
const url = window.location.href;
if (url.includes("https://supjav.com"))
{
window.location.href = window.location.href.replace(/^https\:\/\/supjav.com/, 'https://supjav.com/ja/');
}
else if (url.includes('https://jable.tv/'))
{
var jable = url.replace(/\?lang\=[en|zh]{2}/, '\?lang\=jp');//把結尾不為jp的改成jp
var jable1 = jable.replace(/\/$/, '\/\?lang\=jp');
//結尾是/結尾的直接硬加?lang=jp,(?<=exp)	正向(正回顾)后发断言	匹配某个位置,该位置的前面的内容应匹配表达式 exp(JS不支持),所以硬來了...
console.log(jable1);
window.location.href = jable1;
}
else if (url.includes("https://tktube.com/"))
{
var regex = /(^https\:\/\/tktube.com\/)(\w{2}\/)?(.*)/;
var match = regex.exec(url);
var tktube;
if (match[3]) {
  // match[3] 有捕獲
   tktube = match[1] + 'ja/' + match[3];
} else {
  // match[3] 沒有捕獲
    tktube = match[1] + 'ja/' + match[2];
}
  console.log(tktube);
  window.location.href = tktube;
}