473,408 Members | 1,982 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

userContent.css + attribute selectors = highlight bogus links (FF, no IE)

Here's how CSS can warn you about links to sites matching a "blacklist"
you define. This might be useful in weeding out bogus search results,
etc.

It uses substring attribute matching (which is CSS3); works in Firefox
but not IE. (Tested FF 1.0.2 and IE6.)

Example:

1. Edit userContent.css. (ChromEdit is convenient for this.)
Add selectors for the links you want to highlight. Example:

a[href*="sabox.com"] /* '*=' matches substring */
{
background-color: yellow !important;
}

2. Save and restart Firefox. (I wish there were a "reread
userContent.css" button)

3. Google for "mortgage accelerated" (no quotes)

All links to sabox.com pages are highlighted in yellow. (Sabox.com was
chosen for the example because it pretends to be informative, but is
just a list of more search results and ads.)

There's probably a lot more that could be done with this.

- other substring matches: catch javascript links, embedded '@' signs,
PDF files, .exe, etc.

- avoid false positives

- how well would this scale up for many sites? I haven't tested this.

- As shown above, this takes effect on every page, not just Google. But
there's another FF extension that adds the domain as an ID to the body
tag, enabling per-site user CSS:
http://extensionroom.mozdev.org/more-info/uriid

--
Kurumi http://www.kurumi.com/
3di's, Conn. Roads, maps, interchanges
Jul 21 '05 #1
0 1993

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jan T. Kim | last post by:
David Dorward <dorward@yahoo.com> wrote in message news:<bd7da3$ho4$1$830fa7a5@news.demon.co.uk>... > Jan T. Kim wrote: > > > I don't understand why I get this message. According to the HTML 4.01...
8
by: Brian | last post by:
Hello, The thread on a List Apart made me go visit their site. Wow. If there's a contest for the www's smallest font, they're in the running. I thought it would be a good use of user css. And...
1
by: SeanT | last post by:
I can't seem to get the value associated with an attribute I created on a table row called "BackColor". I can get the length without issue, but whenever I try the value I get nothing. Thanks in...
4
by: | last post by:
I have a "form field highlight" javascript that I've added to some of my ASP.NET forms using the following syntax: body.Attributes.Add("onClick", "highlight(event);");...
9
by: Devron Blatchford | last post by:
Hi there, Just wondering if I change the back and fore colour of a listview item when the mouse hovers over it? I want to overide the default windows colour. Can someone please tell me how to...
9
by: Jeff | last post by:
Does IE7 support attribute and child selectors? Jeff
6
by: _googlepost | last post by:
I have some CSS that goes something like this: table.TableStyle {font-family: "Helvetica", "Ariel"; background- color:white; border-collapse:collapse;} table.TableStyle COLGROUP { background-...
44
by: John Dann | last post by:
I'm unclear as to how best to use what I'm terming the top-level CSS selectors, by which I mean selectors like *, html and body. I'm coming at this from trying to understand how best to set font...
2
by: scdowney | last post by:
First and foremost, thank you in advance for any attempts to help me out. I am working on a project with work, and it requires I use CSS selectors to locate elements within a webpage. For the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.