Large Twitter images

Links to small Twitter images are changed to point to the large size of the image.

// ==UserScript==
// @name        Large Twitter images
// @author      pizzahut
// @description Links to small Twitter images are changed to point to the large size of the image.
// @license     MIT
// @match       https://*/*
// @match       http://*/*
// @namespace   https://greasyfork.org/users/1117297-pizzahut
// @grant       none
// @version     1
// ==/UserScript==

var links, thisLink, i;
links = document.evaluate("//a[ contains(@href, 'https://pbs.twimg.com/') and contains(@href, 'name=small') ]",
                          document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for (i = 0; i < links.snapshotLength; i++)
{
	thisLink = links.snapshotItem(i);
	thisLink.href = thisLink.href.replace(/name=small/,'name=large');
}