Toggle Dlsite language

Switch between ecchi-eng and maniax in circle, and RJ and RE

02.02.2021 itibariyledir. En son verisyonu görün.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         Toggle Dlsite language
// @namespace    zero.toogledlsitelan
// @description  Switch between ecchi-eng and maniax in circle, and RJ and RE
// @include      *://www.dlsite.com/*
// @version      1.3
// @grant        none
// @project page https://greasyfork.org/en/scripts/402452-toggle-dlsite-language
// ==/UserScript==

var url = window.location.href;

if (url.includes("maniax") || url.includes("ecchi-eng")){
  var navlink = document.getElementsByClassName("floorNavLink");

  navlink[0].innerHTML = "<div class='floorNavLink-item type-female'><a style='font-weight:bold'"
    + "id='toggle'>Toggle Site</a></div>" + navlink[0].innerHTML;
}

document.addEventListener("DOMContentLoaded", function(){
  var toggle = document.getElementById("toggle");

  if (url.includes("circle") && url.includes("maniax")){
    url = url.replace("maniax", "ecchi-eng");
    toggle.href = url;
  }else if (url.includes("circle") && url.includes("ecchi-eng")){
    url = url.replace("ecchi-eng", "maniax");  
    toggle.href = url;
  }
  
  if (url.includes("product_id") && url.includes("RJ")){
    url = url.replace("RJ", "RE"); 
    toggle.href = url;
  }else if (url.includes("product_id") && url.includes("RE")){
    url = url.replace("RE", "RJ");  
    toggle.href = url;
  }
});