InsaneJournal Full User Info

By Noxumbra Last update May 3, 2009 — Installed 84 times. Daily Installs: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1

There are 1 previous version of this script.

// InsaneJournal Full User Info User Script
//
// Copyright (c) 2007, Tom Kropf (modified by Nostariel)
// http://userscripts.org/people/23412
// Released under the GPL license
// http://www.gnu.org/copyleft/gpl.html
//
//
// ==UserScript==
// @name          InsaneJournal Full User Info
// @description   Always link to the full IJ user info. Modification of Tom Kropf's script to work with InsaneJournal.
// @attribution   Tom Kropf (http://swanky.de/greasemonkey/)
// @contributor  Noxumbra/Nostariel (http://userscripts.org/users/17843)
// @source        http://userscripts.org/scripts/show/8726
// @include       http://*.insanejournal.com/*
// @include       http://insanejournal.com/*
// @version       0.0.1
// ==/UserScript==

// "Baaaah," says Frank.

var all, element, pitas;
var ljuserinfo = /^(?:http:\/\/www\.insanejournal\.com)?\/userinfo.bml\?user=([^&]+)/i;
var userdomain = /^http:\/\/([^\.]+)\.insanejournal\.com\/info/i;
var userpage = /^(?:http:\/\/www\.insanejournal\.com)?\/(?:users|community)\/([^\/]+)\/info/i;

all = document.getElementsByTagName('a');

for (i=0; i < all.length; i++) {
	element = all[i];
        pitas = ljuserinfo.exec(element.getAttribute('href'));
    	if (pitas == null) {
      		pitas = userdomain.exec(element.getAttribute('href'));
    		}
    	if (pitas == null) {
      		pitas = userpage.exec(element.getAttribute('href'));
    		}
    	if (pitas != null) {
      		element.setAttribute('href','http://www.insanejournal.com/userinfo.bml?user=' + pitas[1] + '&mode=full');
    		}
        if (element.href.indexOf('/profile/') != -1) {
        	element.href = element.href.replace ('/profile/', '/profile?mode=full');
	        }
        else {
                if (element.href.indexOf('/profile') != -1) {
        	        element.href += '?mode=full';
	                }
                }
}

// 0.0.1	Initial release.