Ghost Trappers Display Companion Name

A simple, minimalistic script that adds Companion Name to the Ghost Trappers companion page.

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 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==
// @author         pbcmatthew
// @name           Ghost Trappers Display Companion Name
// @description    A simple, minimalistic script that adds Companion Name to the Ghost Trappers companion page.
// @version        1.0
// @changes        
// @include        http://www.ghost-trappers.com/fb/setup.php?type=companion*
// @include        http://gt-1.diviad.com/fb/setup.php?type=companion*
// @include        http://www.ghost-trappers.com/fb/setup.php?action=changeSortFilter&type=companion*
// @include        http://gt-1.diviad.com/fb/setup.php?action=changeSortFilter&type=companion*
// @namespace https://greasyfork.org/users/13142
// ==/UserScript==
$(window).load(function(){ 
for (var i = 0; i<300; i++) {
	var petimglink = document.getElementsByClassName("smallImage")[i].src;
	var petimgpng = petimglink.split("/")[6];
	var petimgname = petimgpng.split(".")[0];

	var nickname =  document.getElementsByClassName("smallName")[i];
	petname = document.createElement("div"); 

	var mapObj = {
		icon:"",
		png:"",
		_:" "

	};
		petimgname = petimgname.replace(/icon|png|_/gi, function(matched){
		return mapObj[matched];
		});

petname.innerHTML = petimgname; 
nickname.appendChild(petname);
}

})