Comments by 1212jtraceur on scripts

3 comments

Comment on:
Remove The "is" (facebook)

Jul 20, 2007

I can answer that one, jordex: no, it works only for people who have the script installed.

I have a slight suggestion:

var e = document.getElementById( 'profile_status' ).getElementsByTagName( 'span' )[ 0 ];
e.textContent = e.textContent.substr( 3 );

It uses the standard textContent property and removes the space after the removed 'is'.

Comment on:
XKCD Redesign

Jul 8, 2007

Another xkcd fan, great script! I modified it to not use innerHTML, here's my version.

// ==UserScript==

// @name          XKCD Redesigned

// @namespace     http://azrael.awardspace.co.uk/

// @description   A redesign of XKCD.

// @author        Peter "Azrael" Bunyan

// @include       http://xkcd.tld/*.html

// @include       http://www.xkcd.tld/*.html

// @include       http://xkcd.tld/

// @include       http://www.xkcd.tld/

// ==/UserScript==



title = document.getElementsByTagName('h1')[0];

document.title = 'xkcd - ' + title.textContent;


img = document.getElementsByTagName('img')[1];

info = document.getElementsByTagName('h3');


permalink = info[1].textContent.split(': ')[1];

subtitle = document.createElement('h3');
subtitle.textContent = '"' + img.title + '"';

title.parentNode.insertBefore(subtitle, title.nextSibling);


img.title = '';

imgLink = document.createElement('a');
imgLink.href = imgLink.textContent = img.src;
info[1].textContent = 'URL: ';
info[1].appendChild(imgLink);

permaLink = document.createElement('a');
permaLink.href = permaLink.src = permalink;
info[2].textContent = 'Permalink: ';
info[2].appendChild(permaLink);



GM_addStyle("body {font-variant:normal; font-size: 8pt; font-weight: normal; font-style: normal; background: #494e52;} h3 {font-variant: normal; font-weight: normal; font-style: italic; font-size: 8pt;} #middleContent ul{width: 440px;} #middleContent ul li a {background: #494e52;} #middleContent ul li a:hover {color: #494e52;} #topLeft a, #topLeft a:hover {font-size: 20px;} .dialog .hd, .dialog .hd .c, .dialog .bd, .dialog .bd .c, .dialog .ft, .dialog .ft .c {background: #494e52;} .dialog .bd .c .s {padding-bottom: 20px; margin-top: -10px;} a {color: #494e52;} #container {padding-bottom: 0;} a > img {display: none;} #logo a > img {display: inline;}") 

Comment on:
Google More Links

Jun 9, 2007

Thanks for this one. Now I can find Google's many services directly from their home page!