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

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==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>)');
    }
})();