Not Logged In Log In   Sign Up   Points Leaders
Follow Us    8:28 AM

Message Forum - Read Message

Category: Talk back to us! > Topics Add to favorite topics   Post new topicPost New Topic
Author Topic: Greasemonkey script for GasBuddy Topic is locked Back to Topics
ScroogeMcPump

Champion Author
Philadelphia

Posts:6,742
Points:1,211,850
Joined:Sep 2005
Message Posted: May 24, 2008 7:57:15 PM

As many of you already know, I've written a script that modifies the appearance of the GasBuddy Web sites. To use it:

- First, you'll need a compatible browser, which means either Firefox or Opera. You should download and install at least one of these, if you haven't done so already.
- Second, if you use Firefox, you'll need to get the Greasemonkey extension for it; if you use Opera, you'll need to set up a user scripts folder for it. This is what makes the modifications possible.
- Finally, you'll need to get my script - either the Firefox version or the Opera version, as appropriate for the browser you're using.

I'll be using this topic to keep everyone advised of changes and updates to the script; likewise, if anyone has questions, comments, problems, or suggestions regarding it, please post them here.

[Edited by: CC at 8/13/2008 7:10:25 PM EST]
REPLIES (newest first)
Profile Pic
ScroogeMcPump
Champion Author Philadelphia

Posts:6,742
Points:1,211,850
Joined:Sep 2005
Message Posted: Dec 15, 2008 11:44:42 PM

I don't know what they did, but given the other strangeness going on, I'll leave it for tomorrow, just in case there are more changes in the offing.
Profile Pic
mapcat
Champion Author Ohio

Posts:11,134
Points:1,786,700
Joined:Sep 2005
Message Posted: Dec 15, 2008 10:26:55 PM

I got the same thing No1 is getting, using FF3 in Vista.

[Edited by: mapcat at 12/15/2008 10:27:16 PM EST]
Profile Pic
no1lakersfam
Champion Author Virginia Beach

Posts:8,983
Points:1,643,835
Joined:Aug 2004
Message Posted: Dec 15, 2008 7:41:05 PM

For some reason now with the script enabled it is causing GB's new "Search for gas prices" thing to go off in a weird direction in the middle of the menu at the top. This happens on almost every page where this new search box appears. The My Activity is pushed off to the side as well, almost on top of the ads. I only noticed it sometime this afternoon, so I do not know what might cause it.

Also, I don't see your Google search thing anymore, either.

On the main page they have also done away with that "We have made changes" bar, so maybe that has something to do with it?

[Edited by: no1lakersfam at 12/15/2008 7:46:35 PM EST]
Profile Pic
jasilva
Champion Author Boston

Posts:1,300
Points:678,905
Joined:Jun 2004
Message Posted: Dec 15, 2008 8:56:51 AM

FYI: If you use 'Windows Explorer' and browse to your C:\Windows\Fonts directory it will show you a list of fonts you have installed on your PC. If you double-click on one of the fonts (font files) it will bring up a window with a sample of what the font looks like. [You can also see this from Control Panel -> Fonts.]

ScMp writes:
> Most Webmasters just pick a font that's known to be widely installed (like Verdana) along with a couple of alternates (like Arial and Helvetica) and hope for the best.

I think as jrsva pointed out; a better approach is to ALSO include the symbolic font names, e.g. serif or sans-serif, rather than a specific font face (e.g. Verdana or Arial) so you can be sure that the user's browser has some reasonable default. This is another reason why it is NOT 'productive' to try to do 'absolute sizing and positioning' with web pages. Besides font size and availability issues is the issue of screen size and browser window size. [This is one of the reasons the GB fixed-width window size doesn't work very well for what ScMp is trying to do.]
Profile Pic
ScroogeMcPump
Champion Author Philadelphia

Posts:6,742
Points:1,211,850
Joined:Sep 2005
Message Posted: Dec 13, 2008 11:47:05 PM

Yes, Verdana only looks like Verdana if you have Verdana installed. ;-)

And FYI, Verdana didn't come with Windows until XP, so it's not too surprising your Win2K system doesn't have it - but that probably means you don't have Office, either, since it did come with Office 2000. As for why you have Helvetica (or any other font): any program you install might choose to add one or more fonts to your machine, and it's unlikely that anyone else has the exact same set of programs installed on their computer as you do on yours, so it's impossible to predict which fonts might be available - which is what makes Web typography so darn difficult. Most Webmasters just pick a font that's known to be widely installed (like Verdana) along with a couple of alternates (like Arial and Helvetica) and hope for the best.
Profile Pic
jrsva
Champion Author Virginia

Posts:3,942
Points:634,850
Joined:Jan 2006
Message Posted: Dec 13, 2008 8:04:16 PM

Hi Scrooge, I'm not enough of a geek to understand a lot of what you are talking about here but it has been interesting and I've learned some stuff. That's what these forums are for I think.   ;-)

Reading [msgid=44816371, 12/12] about the Verdana font led me to wonder – This looks a lot like Times Roman to me. I used the link to Wikipedia and read about Verdana there, how it is a specially designed sans-serif font for computers, and looked at the character list there. Whoa, that is a serif font and looks a lot like Times Roman. Then I checked my font directory and found that Verdana is absent despite the fact that it is a Microsoft font and this is a Win2000 computer. I checked my laptop, which is a newer WinXP computer, and imported Verdana from there and reloaded the page. Wow does it ever look *different.* I generally prefer serif fonts and really like Times Roman so I haven't yet decided if I *like* the change. Time will tell.

Near the bottom of the same msg, where you are talking about alternate fonts on web pages, you mention that Helvetica comes with Macs but not PCs. My PC has Helvetica but did not [until now] have Verdana. Go figure.

On my own web pages I specify Times in my CSS file for most applications, using 'serif' as a backup. For some things I specify Arial with 'sans-serif' as backup. It had not occurred to me to name a specific backup font. I think I will try replacing the Arial with Verdana and see how it looks. Verdana seems easier to read than Arial.

Thanks for the tech lesson.

 



[Edited by: jrsva at 12/13/2008 8:05:22 PM EST]
Profile Pic
mapcat
Champion Author Ohio

Posts:11,134
Points:1,786,700
Joined:Sep 2005
Message Posted: Dec 12, 2008 9:55:18 PM

Must have been my browser. Now the font looks like it always has.
Profile Pic
mapcat
Champion Author Ohio

Posts:11,134
Points:1,786,700
Joined:Sep 2005
Message Posted: Dec 12, 2008 8:01:21 PM

Looks like we have a new font now.
Profile Pic
no1lakersfam
Champion Author Virginia Beach

Posts:8,983
Points:1,643,835
Joined:Aug 2004
Message Posted: Dec 12, 2008 6:42:30 PM

Well, Scrooge added the code to accommodate the new search setup, and it seems to be working fine now. Thanks for the update.
Profile Pic
VAtraveler
Champion Author Spartanburg

Posts:10,815
Points:2,063,830
Joined:Aug 2003
Message Posted: Dec 12, 2008 5:26:56 PM

Yes, I too was running my searches from either a saved search on the Home page or a bookmarked saved search. Sorry to mislead you, no1lakersfam.
Profile Pic
no1lakersfam
Champion Author Virginia Beach

Posts:8,983
Points:1,643,835
Joined:Aug 2004
Message Posted: Dec 12, 2008 1:40:34 PM

I guess the only time I ever saw it working was when it was either the result of me entering it as a comment and it showed up on the confirmation page, or if a price with that kind of comment ever ended up on the main page. I think that was why it didn't appear on the file I sent you which was the new search setup. I thought my computer was trying to play tricks with me.
Profile Pic
ScroogeMcPump
Champion Author Philadelphia

Posts:6,742
Points:1,211,850
Joined:Sep 2005
Message Posted: Dec 12, 2008 12:32:13 PM

Okay, I didn't think to include the new format search results page as one to run the "-3¢" routine on (I usually run any searches I do from my bookmarks, which still show the old format page). Fix is on its way.
Profile Pic
ScroogeMcPump
Champion Author Philadelphia

Posts:6,742
Points:1,211,850
Joined:Sep 2005
Message Posted: Dec 12, 2008 12:05:06 PM

The "-3¢" thing is one of the bugs I thought I fixed with this last version (curse you, UTF-8!). If it's still happening, send me another test file.

"things look different from computer to computer": That's just a given - there is simply NO font that's guaranteed to exist on EVERY computer. The only way to guarantee consistency would be to send the desired font along with the page - but this is very rarely done, because:
- the bandwidth required would be prohibitive;
- no single, simple standard has been established for how to do this; and
- the big typographers rank up there with the MPAA and RIAA in litigiousness - and they refuse to endorse any standard that doesn't include a means to prevent people from appropriating the font files sent and using them for their own purposes.

Verdana, however, is fairly easy to obtain legally, even if your machine didn't come with it and doesn't have Office, which is why it's commonly specified in Web pages; yet most Web page designers specify several alternatives for font, specifically because they recognize that they'd be neglecting a significant portion of their audience with only a single font choice, no matter what they chose.

Getting back to this case, if Verdana doesn't exist on the machine, my script is designed to fall back to Arial, then Helvetica (which comes with Macs but not PCs), then any sans-serif font available. The main difference between this and what GB says is that they skip Verdana and go straight to Arial outside of the forums.

[Edited by: ScroogeMcPump at 12/12/2008 12:06:17 PM EST]
Profile Pic
no1lakersfam
Champion Author Virginia Beach

Posts:8,983
Points:1,643,835
Joined:Aug 2004
Message Posted: Dec 12, 2008 11:36:34 AM

I did a search for Murphy USA on the SC site, and the ones that had things like "-3¢ w/ Wal-Mart Shopping Card" did not highlight for me. I even tried doing that by going back to the old site and that did not work. I think I sent an HTML file to Scrooge of an occurrence I noticed that did not work, so maybe he can find what is the problem I notice.
Profile Pic
VAtraveler
Champion Author Spartanburg

Posts:10,815
Points:2,063,830
Joined:Aug 2003
Message Posted: Dec 12, 2008 11:17:09 AM

no1lakersfam, highlighting for comments like "-3¢ off with card" works fine for me. Come over to the SC statewide site and search for location Boiling Springs, to see Ingles and Murphy, USA using it. (I looked quickly on the VA statewide site plus both the Richmond and VABeach sites but didn't spot any)
Profile Pic
no1lakersfam
Champion Author Virginia Beach

Posts:8,983
Points:1,643,835
Joined:Aug 2004
Message Posted: Dec 12, 2008 10:49:11 AM

I did some research and found that Verdana is mainly found on computers with Windows, or Macs that have Microsoft Office for Mac installed. I bring this up because a friend let me use their iMac to test how GasBuddy works with the new changes. While I didn't install Greasemonkey, I did notice things that are in Verdana appeared in a different font in both Firefox and Safari on the Mac.

I don't mind their use of Verdana; I do think that they should make things consistent though so that there are not several different kinds of fonts used and things look different from computer to computer. I actually tended to prefer the substituted font that was used on the Mac in the instances where Verdana is used in Windows.
Profile Pic
no1lakersfam
Champion Author Virginia Beach

Posts:8,983
Points:1,643,835
Joined:Aug 2004
Message Posted: Dec 12, 2008 8:47:16 AM

Has anybody else had problems with the highlighting for comments like "-3¢ off with card"? I do not know why it is not working for me. I have tried visiting different sites (Virginia, Richmond) and nothing being highlighted despite the presence of the comments.
Profile Pic
ScroogeMcPump
Champion Author Philadelphia

Posts:6,742
Points:1,211,850
Joined:Sep 2005
Message Posted: Dec 11, 2008 7:28:59 PM

Updated with a few bug fixes, plus a new feature suggested by comments in this topic: It now adds a toggle for the format of the "Last Post" column in topic lists. The default setting forces all dates and times to use only a single line; the opposite setting adds a line break between the date and the time, forcing them to use two lines. This causes the dates and times to be interleaved, which you may find harder to follow, but it takes less width on the page, and so leaves more space for the topic names.

To adjust this setting in Firefox, select Tools » Greasemonkey » User Script Commands » GB Topic Lists from Firefox's menus - or, if you're using the Opera version, edit the O_TL=false line in the script.
Profile Pic
ScroogeMcPump
Champion Author Philadelphia

Posts:6,742
Points:1,211,850
Joined:Sep 2005
Message Posted: Dec 11, 2008 1:35:09 PM

I was referring to misaligned tags, not unmatched ones; those I WOULD leave alone.

I haven't fleshed it out, but right now my plans are something like

var syms = [['B','strong'], ['I','em'], ['Q','blockquote'], ['S','del'], ['T','pre'], ['U','u']];
for(i=0;i<syms.length;i++))
{ while msgtxt.replace('\['+syms[i][0]+'\](.*)\[\/\1\]', '<'+syms[i][1]+'>$1</'+'syms[i][1]'+'>');
};
Profile Pic
kwzh
Champion Author San Jose

Posts:15,741
Points:2,733,850
Joined:Jul 2001
Message Posted: Dec 11, 2008 6:36:17 AM

> maybe the appropriate response is to LET the error get perpetuated into the HTML, and let the browser itself decide how to handle it ...

On the other hand, it might be nice to leave it uninterpreted instead, so as to get proper results in cases like these:

------
| hey guys what does that "[b]" mean?
------

------
| In a C program, a[i] means the same as *(a+i).
------
Profile Pic
jasilva
Champion Author Boston

Posts:1,300
Points:678,905
Joined:Jun 2004
Message Posted: Dec 10, 2008 4:14:42 PM

ScMp writes:
> maybe the appropriate response is to LET the error get perpetuated into the HTML, and let the browser itself decide how to handle it ...

Yes, I think you're right!! In fact browwers already DO handle this type of HTML error; maybe not always in the best way, but they do handle it. If a GBer is 'smart enough' to use these tags then they need to be 'careful enough' to use them correctly!!

Another option, though this would require using an offsite (non-GB) webserver, would be to use one of the FREE HTML form-based editors to compose the response, then, when GM gets the resultant HTML back it could convert the HTML tags into the square bracket tags. This, of course, only helps on the data entry side, not the viewing side.

[Then again, this Free JavaScript HTML Rich Text Editor might be something you could 'inject' right into the GM script. This would allow your GM script to control the composition of responses in the forum threads. I believe this script could be customized to only allow the set of tags you want to enable and to maybe output only what you want.]


[Edited by: jasilva at 12/10/2008 4:15:20 PM EST]
Profile Pic
ScroogeMcPump
Champion Author Philadelphia

Posts:6,742
Points:1,211,850
Joined:Sep 2005
Message Posted: Dec 10, 2008 3:40:51 PM

To "jasilva": If I were to take a stack approach, my code would probably come out with "<b>erroneously <i>placed</i></b> tags" instead; on hitting the bad tag, it'd look in the stack for a matching tag and close any unterminated tags in between.

But regardless, whether I implement a stack or do multiple passes with RegExps or code up something else entirely, I'm concerned that this would cause too much of a delay in the browser; maybe the appropriate response is to LET the error get perpetuated into the HTML, and let the browser itself decide how to handle it. (Whatever it decides to do is at least as valid as anything I might come up with on my own, and arguably more so.)

On "a link in forum posts to directly PM someone": That would require scanning all the names (which I already do for the self highlight), but also loading the profile page in the background for each name found (to determine whether the person is on your list or not) so it can insert the appropriate link ("PM" or "Invite") in each case. That could result in as many as 51 additional page requests (one for each message on the page), which would likely slow things to a crawl. Furthermore, the "Invite" link isn't a link but a script call, which would have to be duplicated somehow, and Greasemonkey is touchy about mixing user script code with server-generated code.
Profile Pic
mapcat
Champion Author Ohio

Posts:11,134
Points:1,786,700
Joined:Sep 2005
Message Posted: Dec 10, 2008 10:57:01 AM

a5: "how about a link in forum posts to directly PM someone?"

Great idea, with an option to invite the person if they're not already on your buddy list.
Profile Pic
a5
Champion Author Ontario

Posts:3,375
Points:1,456,520
Joined:Sep 2005
Message Posted: Dec 10, 2008 9:06:38 AM

JASILVA WRITES: "when you see the next closing tag ... check to see if it matches the current tag; "

If you're going to do the same thing whether or not the tag matches, why bother checking? in fact all you would then need is a tag that indicates a close i.e. [/]

SMP writes: "Send me some PMs "
how about a link in forum posts to directly PM someone?
Profile Pic
jasilva
Champion Author Boston

Posts:1,300
Points:678,905
Joined:Jun 2004
Message Posted: Dec 10, 2008 8:56:16 AM

ScMp: Found some pointers on how to implement stacks in JavsScript:

One from About.com and another from Techie Zone
Profile Pic
jasilva
Champion Author Boston

Posts:1,300
Points:678,905
Joined:Jun 2004
Message Posted: Dec 10, 2008 7:17:24 AM

ScMp writes:
> To "kwzh" and "jasilva": Any suggestions on how to detect [B]erroneously [I]placed[/B] tags[/I], so that I don't perpetuate such errors into the HTML?

One way I can think of is to use a stack; that is, as soon as you see the first (opening) tag [b] you push it on a stack, when you see the next tag [i] you push that on a stack, when you see the next closing tag [/b] you pop off the top of stack ([i]) and check to see if it matches the current tag; if it does you can then output the html of that tag, if not, assume the user mismatched tags and output the end-tag that matches the current top-of-stack tag (i.e. </i>). This should end up outputting the correct html:

<B>erroneously <I>placed</I> tags</B>

[Not sure how to implement this in JavaScript though ...]

[Edited by: jasilva at 12/10/2008 7:18:39 AM EST]
Profile Pic
ChannelIslands
Champion Author Ventura

Posts:4,713
Points:626,485
Joined:Dec 2008
Message Posted: Dec 10, 2008 3:10:08 AM

:)
Profile Pic
kwzh
Champion Author San Jose

Posts:15,741
Points:2,733,850
Joined:Jul 2001
Message Posted: Dec 10, 2008 1:51:43 AM

Detecting malformed delimiters is impossible in the general case for a regexp, but should be easy enough in an actual programming language. Deciding what to do with them is another matter. I have no idea what might be meant by such a monstrosity, and I guess I'd be happy with the script interpreting it in whatever way it chooses.

Assuming the author of the malformed text is running the script, is it possible to intercept it at the "Post Message" stage, and offer a chance to correct it?
Profile Pic
ScroogeMcPump
Champion Author Philadelphia

Posts:6,742
Points:1,211,850
Joined:Sep 2005
Message Posted: Dec 9, 2008 11:53:29 PM

Dag nab it! Found another spot where changes on GB's end broke things on my end; if you've updated in the last three hours, you'll need to update again.
Profile Pic
ScroogeMcPump
Champion Author Philadelphia

Posts:6,742
Points:1,211,850
Joined:Sep 2005
Message Posted: Dec 9, 2008 9:30:23 PM

Updated again:
- The inbox highlighter should be fixed to work with the new header format. (Send me some PMs so I can test this more thoroughly!)
- I changed the way I position the Google Search box on the page (yet again), to try to keep it where I intended (inside the header) regardless of how much the header gets moved around by other stuff.
- I redesigned the top line of the page so that things fit better with the Verdana font. (This is just a first pass at this; I'm looking into making more improvements here.)

To "kwzh" and "jasilva": Any suggestions on how to detect [B]erroneously [I]placed[/B] tags[/I], so that I don't perpetuate such errors into the HTML?

To "movrshakr": Exactly what page (URL) are you looking at, and are you seeing the Google search bar on that page? You shouldn't be, because I know it screws up the works on that page - so I intentionally avoid putting one there for that reason, but maybe they changed something else that's confusing the script and making it put one there anyway.
Profile Pic
no1lakersfam
Champion Author Virginia Beach

Posts:8,983
Points:1,643,835
Joined:Aug 2004
Message Posted: Dec 9, 2008 12:41:59 PM

I never realized the main reason why you chose Verdana fond, nor did I realize why they were using Arial so much elsewhere. I would have thought that if they could only use Verdana in certain places, they should have chosen to do most everything in Arial, or have it set to use its equivalent, such as Hevletica on Mac for example.
Profile Pic
movrshakr
All-Star Author Florida

Posts:879
Points:701,065
Joined:Jan 2008
Message Posted: Dec 9, 2008 11:45:06 AM

.
I have begun having another problem in the past few days on MGP page, but I don't know whether it is site or monkey.

Specifically, intermittently, but often, a click on a station oval or on the "X" to close a balloon causes the map to zoom in and move to the east.

Any thoughts?
Profile Pic
jasilva
Champion Author Boston

Posts:1,300
Points:678,905
Joined:Jun 2004
Message Posted: Dec 9, 2008 9:06:19 AM

kzwh writes:
> ... single-character delimiters when possible

Yes, but as ScMp points out, it makes it harder for GM code to parse. Also, the [b]square brackey[/b] method is consistent with what typical online forum software systems use (and consistent with what GB uses for links as ScMp points out). This would also make it something that would allow GBers to transition over to a 'real' (open source) forum software system if GB decides to replace the current 'home-brew' forum software with an 'off the shelf' system later.
Profile Pic
kwzh
Champion Author San Jose

Posts:15,741
Points:2,733,850
Joined:Jul 2001
Message Posted: Dec 9, 2008 2:41:41 AM

If [b]everyone[/b] uses the monkey script, then any ambiguous format would be fine. The reason I suggested using the single-character delimiters when possible is because that makes the result text look good for browsers that are [b]not[/b] monkeyed, as opposed to what you're all seeing in this message.

Also, the single-character delimiters are, for the most part, what will be used by people who don't know anything about the script; so if the script recognizes those delimiters, it'll be able to correctly display messages from "outsiders".
Profile Pic
ScroogeMcPump
Champion Author Philadelphia

Posts:6,742
Points:1,211,850
Joined:Sep 2005
Message Posted: Dec 8, 2008 10:57:36 PM

Wow - I was only only looking for comments on the new header layout right now, but since you mentioned it ...

On forum embellishments: It's on my list, but if/when I get to it, I'd probably do it more like "jasilva" suggests, both because it's more consistent with what GB already does for links, and because I think having identical markup symbols for start and end would complicate the parsing.

On the ¢ sign: The script ought to handle that; next time you find an example where it doesn't, save the HTML for the page (screenshots alone won't help here), and I'll look into it.

On fonts: One of the original annoyances that made me create this script was the fact that the font choices here seemed so ... schizophrenic. I wanted to see a single font used everywhere, and I chose Verdana because it's the font used for forum messages. Many people (myself included) have attempted to post "ASCII art" here, and I realized that changing from what most people see by default would make such attempts at imagery indecipherable.

That said, I do realize that Verdana allows for fewer words per line, and I've attempted to compensate for that in spots, but that's made all the more difficult by the site design - in fact, I'm fairly sure that most of the spots that use Arial do so specifically because whatever it is won't fit the way they want it in Verdana.

That's not the way to design Web pages, folks - especially considering that there are computers out there that don't have either font! I've seen what this looks like, and it wreaks havoc with the formatting - the designers obviously don't give much thought at all to the possibility of other fonts being used.

As for adding a switch for this in the script: I'll add that to my list, but it'll take a good bit of work to implement because I didn't account for the possibility that people would want to change this when I first designed the script.
Profile Pic
jasilva
Champion Author Boston

Posts:1,300
Points:678,905
Joined:Jun 2004
Message Posted: Dec 8, 2008 9:27:40 PM

no1lakersfam writes:
> ... The drawback is you have to do it everytime the script is updated, unless Scrooge chooses to implement the change.

Or, if this becomes a GreaseMonkey script setting variable. [I think ScMp has done this for other things too.]
Profile Pic
no1lakersfam
Champion Author Virginia Beach

Posts:8,983
Points:1,643,835
Joined:Aug 2004
Message Posted: Dec 8, 2008 7:39:54 PM

Hmmm, I have only seen it work a couple of times, and I normally don't post prices for stations that require that. I thought maybe the checks the script does didn't find anything that matched its criteria and moved on.

Also, to answer the font question, from the start I have always modified the script to use "Arial" font instead of the default "Verdana". Personally I like the classic font that is used before the modifications, and the Verdana didn't suit me, and also made things seem bigger.

You can do this too; just go to Tools>Greasemonkey>Manage User Scripts. Click on the GB script, then click edit. It should open in some kind of text editor such as Notepad (in Windows). Do a search for Verdana, and when you find it, erase it and leave Arial there. It will solve the header problem, as the mods have modified it to where with the normal font it will look right. I had that problem before even with the script disabled.

The drawback is you have to do it everytime the script is updated, unless Scrooge chooses to implement the change.

[Edited by: no1lakersfam at 12/8/2008 7:44:38 PM EST]
Profile Pic
mapcat
Champion Author Ohio

Posts:11,134
Points:1,786,700
Joined:Sep 2005
Message Posted: Dec 8, 2008 3:32:27 PM

Scrooge--to answer your question about the header block, the only annoyance as far as I'm concerned is the line break (the font you're using won't fit the total points figure on the top line when I have the font size where I want it, so it ends up under "logged in"). Try narrowing the font or un-bolding it.

Gotta say I like the bold, italic, etc ideas too.

No1--the script is identifying my (-5¢ cash) comments just fine, and I'm using the cents sign.
Profile Pic
no1lakersfam
Champion Author Virginia Beach

Posts:8,983
Points:1,643,835
Joined:Aug 2004
Message Posted: Dec 8, 2008 12:03:14 PM

Scrooge, I have noticed that your script doesn't highlight when people do things like "-5¢ with loyalty card", for which the cent sign is used. I am not sure how you could do that, but I have noticed a few people actually adding the cent sign. This may make what you are doing more complicated, and I was just pointing it out to let you know in case you wish to include this in the features.
Profile Pic
jasilva
Champion Author Boston

Posts:1,300
Points:678,905
Joined:Jun 2004
Message Posted: Dec 8, 2008 11:32:19 AM

kwzh: good idea ... I would suggest maybe using the same codes that HTML uses except that change the angle brackets into square brackets so that the GB code doesn't strip them. So, this would mean:

bold: [b] emboldened text [/b]
italic: [i] italic text [/i]
underline: [u] underlined text [/u]
strikethrough [strike] striked through text [/strike]
typewriter: [pre] typewriter text [/pre]

and so on. The advantage of this approach is that it is still, as you say, human-understandable but it would also make it very easy for ScMp's GreaseMonkey code to just replace the square brackets with angle brackets to turn it into legal HTML !!
Profile Pic
kwzh
Champion Author San Jose

Posts:15,741
Points:2,733,850
Joined:Jul 2001
Message Posted: Dec 8, 2008 2:09:42 AM

This came up (again) elsewhere, so I'll open it up for discussion here.

Bold, italic, underline, strikethrough, typewriter, and quote fonts in the forum.

Seems like it should ideally use some format that still looks acceptable in plain ASCII, so that non-monkeyed users won't have trouble understanding the resulting text; e.g., *bold*, /italic/, _underline_, \strikethrough\, |typewriter|, and something fancier for quote -- but making it both human-readable and machine-readable at the same time is tricky, as it seems like there's bound to be the occasional false positive where the punctuation wasn't intended to indicate a font change. Maybe it's OK if the translation is done very conservatively, and if there's also a slightly less-readable variant to represent cases that can't be represented the simple way.

Once a text format is determined, maybe "insert link" to the left of the input area could be joined by "insert bold", etc.; the code would have to decide whether the text in question can be emboldened using the simple method or if it would require the uglier form. To quote a prior message, each message in a thread should have a "quote this" button or link, which will cause the text in question to be inserted into the input area using the exact format that the monkeyed viewer will recognize to turn into a unique representation (enclosing in a box with attribution header, probably).
Profile Pic
ScroogeMcPump
Champion Author Philadelphia

Posts:6,742
Points:1,211,850
Joined:Sep 2005
Message Posted: Dec 7, 2008 12:49:12 AM

"Did the yellow highlight go away": Yes, unfortunately, it did; the last redesign broke the script. (It would be nice if they would stop changing all the internal names I use to hook into things every time they move things around, but that'd be too much to hope for.) I haven't made an update yet for several reasons:
- I'm worried it's going to change again.
- I'm trying to come up with a way to find the proper spot that's not so vulnerable to whatever other changes may come.
- I'm trying to decide if I should do some rearranging of the header block on my own, and what form that rearranging should take - so if everybody'd let me know what's most annoying to you about the new format, I'll see what I can do about it.
Profile Pic
movrshakr
All-Star Author Florida

Posts:879
Points:701,065
Joined:Jan 2008
Message Posted: Dec 6, 2008 2:43:24 PM

Oh...that is most noticeable on the MGP page, where I spend a lot of my time.
Profile Pic
movrshakr
All-Star Author Florida

Posts:879
Points:701,065
Joined:Jan 2008
Message Posted: Dec 6, 2008 2:34:23 PM

Am I dreaming? Something is different about the top line, and I am missing seeing my incoming message indicator. Did the yellow highlight go away (ack!) or am I missing it because it is just smaller? Can you make it bigger or otherwise more noticeable.

Or, tell me to get lost! :)
Profile Pic
ScroogeMcPump
Champion Author Philadelphia

Posts:6,742
Points:1,211,850
Joined:Sep 2005
Message Posted: Nov 25, 2008 10:28:27 PM

Updated again to implement "kwzh"'s idea of 9/14/2008 - it now highlights phrases in price lists such as "+5c" or "- $0.03" in red (for those beginning with "+") or green ("-"), so that station entries mentioning dual pricing are more noticeable.
Profile Pic
ScroogeMcPump
Champion Author Philadelphia

Posts:6,742
Points:1,211,850
Joined:Sep 2005
Message Posted: Nov 21, 2008 8:53:24 PM

Glad you think so - I was a little worried you'd be offended by this, but I
think it's just a matter of you having your FSLs organized differently than
I do. (I'm not sure ANYONE has their FSLs organized like I do. ;-))

"works on the 'Home' page": That's not my doing; that happens even with the
script turned off. Unfortunately, it only works with saved searches - it
behaves differently (back to default) if you use the search form itself.
Profile Pic
VAtraveler
Champion Author Spartanburg

Posts:10,815
Points:2,063,830
Joined:Aug 2003
Message Posted: Nov 21, 2008 7:27:43 PM

Choice is good! BTW the "Sticky FSLs" feature works on both the "Home" page and the "Thank-You" page so if I pick my FSL on the "Home" page then run 1 or more saved searches to see what's already been posted, my "chosen" FSL stays visible and available for updates throughout the searches. Cool!! Thanks SMcP!
Profile Pic
ScroogeMcPump
Champion Author Philadelphia

Posts:6,742
Points:1,211,850
Joined:Sep 2005
Message Posted: Nov 21, 2008 3:28:24 PM

New version:

- I revamped the "Sticky FSLs" feature (the one I added at the request of "VAtraveler", that
redirects the "Thank You" page to show the same FSL you were using on the page that got you
there), because I personally found it less convenient than I expected. Now it's an option; go to
Tools » Greasemonkey » User Script Commands » GB Sticky FSLs
to toggle it.

- I added clickable links to the FSL that take you to the corresponding MSL entry for the
given station - assuming the FSL entry is properly linked to the MSL.

[Edited by: ScroogeMcPump at 11/21/2008 3:31:17 PM EST]
Profile Pic
ScroogeMcPump
Champion Author Philadelphia

Posts:6,742
Points:1,211,850
Joined:Sep 2005
Message Posted: Nov 19, 2008 10:49:03 PM

I've added a documentation page to the userscripts.org site, detailing exactly what the two
versions of my script do, and the differences between them. (All the information over there was
already posted here - somewhere, sometime - but I figured this'd be better than making people dig
around for it.)

[Edited by: ScroogeMcPump at 11/19/2008 10:49:50 PM EST]
Profile Pic
VAtraveler
Champion Author Spartanburg

Posts:10,815
Points:2,063,830
Joined:Aug 2003
Message Posted: Nov 17, 2008 7:27:09 PM

> kill the background image?

You could always just add the background image to your adblock list if you're using one. ;)

[Edited by: VAtraveler at 11/17/2008 7:28:15 PM EST]
Profile Pic
jasilva
Champion Author Boston

Posts:1,300
Points:678,905
Joined:Jun 2004
Message Posted: Nov 17, 2008 9:09:12 AM

kwzh writes:
> kill the background image?

Mozilla-based browsers have a way to remove styling and/or use only your own background (picture and colors). When I tried it with GB.com though the page became somewhat less readable. [I thought there was a way to override a site's CSS style sheet too in Mozilla-based browsers ...]
Profile Pic
ScroogeMcPump
Champion Author Philadelphia

Posts:6,742
Points:1,211,850
Joined:Sep 2005
Message Posted: Nov 14, 2008 12:56:35 PM

I suppose I could, but
a) I don't think it'd be worth the trouble, since I don't notice any slowdown because of it, and
b) I'd be more inclined to go the other way, making more of the site let it show thru -
but that'd be even more trouble. :-)

[Edited by: ScroogeMcPump at 11/14/2008 12:57:26 PM EST]
Topic is locked Back to Topics