473,804 Members | 3,081 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.co m"] /* '*=' 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 2013

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

Similar topics

2
3367
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 > > strict specification, there is a "target" attribute to the "a" element. > > No it doesn't. Target is strictly for Frameset and Transitional. Ok, thanks for pointing this out, it seems I haven't taken enough time to look into the specs for...
8
2894
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 that led to a question about attribute selectors. I looked under the hood, and found the following body tag: <body onload="window.defaultStatus='A List Apart, for people who make
1
4925
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 advance, Sean <-- Begin Script --> var lastColorUsed; function fnChangeBackColor(row, highlight)
4
5057
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);"); body.Attributes.Add("onKeyUp", "highlight(event);"); Some of my forms have a great many text box controls that I want to highlight.. I would much rather that ASP.NET do the work of looping through all text boxes and applying these two attributes.
9
3052
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 do this? Thanks Devron
9
2500
by: Jeff | last post by:
Does IE7 support attribute and child selectors? Jeff
6
7199
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- color:lavender;} The second line is a style that is applied to a particular named COLGROUP element in tables assigned the TableStyle class. Unfortunately, while this works in most modern browsers (including
44
584
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 sizes but I seem to have strayed into a broader question. Some CSS guides seem to suggest that a * declaration is good practice for any style sheet, primarily I suppose to set zero defaults for margin and padding for all other relevant selectors...
2
3747
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 most part, I have had no issues using the selectors, but I am having a very strange issue which does not seem to make much sense to me. Please advise if you have any input at all. Note, I am keeping this description at a high level for now because I...
0
9705
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9575
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10564
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10320
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10308
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10073
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9134
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7609
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
3
2981
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.