Derpibooru Account Locker

Automatically redirects you to the Derpibooru domain of your choice when linked to a different domain.

Από την 25/03/2016. Δείτε την τελευταία έκδοση.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name        Derpibooru Account Locker
// @namespace   Derpibooru Account Locker
// @description Automatically redirects you to the Derpibooru domain of your choice when linked to a different domain. 
// @author      DanielTepesKraus | https://www.derpibooru.org/profiles/DanielTepesKraus
// @include     https://derpibooru.org/*
// @include     https://www.derpibooru.org/*
// @include     https://derpiboo.ru/*
// @include     https://www.derpiboo.ru/*
// @include     https://trixiebooru.org*
// @include     https://www.trixiebooru.org*
// @version     1
// @grant       none
// @run-at document-start
// ==/UserScript==
'use strict';

//////////////////////////////////////////////////////////
//THIS IS WHERE YOU SET WHAT DOMAIN YOU WOULD LIKE TO USE.

var Domain = 3;
//0 = Derpibooru.org
//1 = Derpiboo.ru
//2 = Trixiebooru.org
//3 = Krausbooru.org (see note)

//Note:
//Krausbooru is an experimental version of Derpibooru.
//Uses "derpibooru.org" with a vastly improved 
//and more aesthetically pleasing GUI.
//Use at your own risk.

//DON'T TOUCH ANYTHING BELOW THIS LINE.
//////////////////////////////////////////////////////////

var Location = window.location.href;
var ORG = Location.indexOf("derpibooru.org");
var RU = Location.indexOf("derpiboo.ru");
var TRX = Location.indexOf("trixiebooru.org");

window.addEventListener('focus', function() {
  if (Domain == 3){
    var NewName = document.getElementsByClassName("home hide-mobile-t");
    NewName[0].innerHTML = "<img src='http://i.imgur.com/yHTYOEq.png'><a href='/'>Krausbooru</a>";
  }
}, false);

if (TRX > -1){
  if (Domain == 0){
    window.location.replace(Location.replace("trixiebooru.org","derpibooru.org"));
  }else if (Domain == 1){
    window.location.replace(Location.replace("trixiebooru.org","derpiboo.ru"));
  }else if (Domain == 3){
    window.location.replace(Location.replace("trixiebooru.org","derpibooru.org"));
  }
}else if (ORG > -1){
  if (Domain == 1){
    window.location.replace(Location.replace("derpibooru.org","derpiboo.ru"));
  }else if (Domain == 2){
    window.location.replace(Location.replace("derpibooru.org","trixiebooru.org"));
  }
}else if (RU > -1){
  if (Domain == 0){
    window.location.replace(Location.replace("derpiboo.ru","derpibooru.org"));
  }else if (Domain == 2){
    window.location.replace(Location.replace("derpiboo.ru","trixiebooru.org"));
  }else if (Domain == 3){
    window.location.replace(Location.replace("derpiboo.ru","derpibooru.org"));
  }
}