Add scpexplained links to SCP wiki

Adds scpexplained links (http://scpexplained.wikidot.com/) to http://www.scp-wiki.net/ and http://www.scpwiki.com/ for ease of access. Not all SCPs have a corresponding scpexplained article

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         Add scpexplained links to SCP wiki
// @namespace    http://tampermonkey.net/
// @version      0.5
// @description  Adds scpexplained links (http://scpexplained.wikidot.com/) to http://www.scp-wiki.net/ and http://www.scpwiki.com/ for ease of access. Not all SCPs have a corresponding scpexplained article
// @author       You
// @include      *scp-wiki.net*
// @include      *scpwiki.com*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    var box = document.getElementsByClassName("list-pages-box");
    if (box != null && box.length > 1) {
        box[1].innerHTML = box[1].innerHTML.replace(/(href="(.*)">.*<\/a>)/g, '$1 (<a href="http://scpexplained.wikidot.com$2">Explained</a>)');
     }
    var title = document.getElementById("page-title")
    console.log(title)
    if (title != null) {
        title.innerHTML = title.innerHTML.replace(/(SCP-[0-9]+)/g, '$1 (<a href="http://scpexplained.wikidot.com/$1">Explained</a>)');
     }
    var content = document.getElementById("page-content")
    if (content != null) {
        content.innerHTML = content.innerHTML.replace(/(href="(\/scp-[0-9]+\/*)">SCP-[0-9]+<\/a>)/g, '$1 (<a href="http://scpexplained.wikidot.com$2">Explained</a>)');
    }
})();