ben25 / IMDb Hide Episodecount

// ==UserScript==
// @name         IMDb Hide Episodecount 
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Removes the actors episodecount from the characterlist to avoid Spoilers
// @author       Benjamin
// @match        http://*.imdb.com/title/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    hideEpisodeCount();
})();



function hideEpisodeCount(){
    var singleLineXpath = "//td[@class='character']/div";
    var snapResults = document.evaluate(singleLineXpath, document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
     for (var i = snapResults.snapshotLength - 1; i >= 0; i--) {
		var el = snapResults.snapshotItem(i);
                 console.log(el);
        var newTitle = el.innerHTML.split('(')[0];
        el.innerHTML = newTitle;
	}
    return;
}