[Greasemonkey] sidebar replace

Greg B googlinggreg at gmail.com
Fri Jun 17 21:10:59 EDT 2005


On 6/17/05, chris feldmann <cfeldmann at gmail.com> wrote:
> It's hard to tell exactly what you're doing without knowing anything more
> about the actual page you're attempting to script against, and
> somethingelse.com does not appear to be an actual live URL. Can you link the
> actual page so it's possible to see where you're going wrong? It's obvious
> that some things are probably wrong, but it's impossible to tell how wrong
> they are and in which direction they err.

:\ I didn't want to reveal it yet, but;
I'm working on a script for my kid brother for neopets.com, here's the
whole script so far:

// CustomNeopetsSidebar
// version 1.0
// DATE
// COPYRIGHT
//
// NOTE: In order to make this script work properly, you must read through
// this and follow the directions that come after the "//" slash marks .
//
// --------------------------------------------------------------------
//
// This is a Greasemonkey user script.
//
// To install, you need Greasemonkey: http://greasemonkey.mozdev.org/
// Then restart Firefox and revisit this script.
// Under Tools, there will be a new menu item to "Install User Script".
// Accept the default configuration and install.
// 
// To uninstall, go to Tools/Manage User Scripts,
// select "CustomNeopetsSidebar", and click Uninstall.
//
// --------------------------------------------------------------------
//
// WHAT IT DOES:
//
// Lets you create your own Neopets (c) sidebar with your favorite
// paint program, (The sidebar you create will not affect anything
// on neopets.com except itself) and use it on neopets.com.  This
// script is set up to work for three different Neopets (c) accounts.
//
// If you have questions or problems, feel free to email me at
// googlinggreg at gmail.com .
//
// --------------------------------------------------------------------
//
// ==UserScript==
// @name           CustomNeopetsSidebar
// @namespace http://www.
// @description  Lets you make your own sidebar for neopets.com
// @include         http://neopets.com/*
// @include         http://www.neopets.com/*
// ==/UserScript==

 var userIdentity1, sidebarA1;
// replace username1 with the first account that you want a sidebar for.
 userIdentity1 = if
(document.body.innerHTML(/randomfriend.phtml?user=username1) != null)
{
     sidebarA1 = document.getElementById('a');
// replace image1FileName with the filename for the part of the
sidebar that will
// appear at the top of the page
     sidebarA1[0].src = "image1FileName"
}

-- 
Gmail isn't even out yet, and half the world is using it!


More information about the Greasemonkey mailing list