Showing posts with label web design. Show all posts
Showing posts with label web design. Show all posts

Thursday, September 13, 2007

Annoying gmail advertisements & links

Gmail has been part of my life in the past few years, I recently found its sponsored links particular annoying. Sure most gmail users got the same thought, well some might think it is helpful...but I don't! I decided to remove, there is no default options in gmail allows you to disable it. Examining its generated html code, the entire ad is in the rh section within a big div, so you can force your browser to remove it with greasemonkey or stylish in firefox...
GMAIL code:


....


// Gmail ad Removal user script
// 2007-09-13
//
//
// ==UserScript==
// @name gmail ad removal
// @namespace http://insistkool.blogspot.com
// @description remove gmail ad
// @include http://mail.google.com/*
// ==/UserScript==
for (var i=0; i< document.getElementsByTagName("div").length; i++) {
if (document.getElementsByTagName("div").item(i).className == "rh"){
document.getElementsByTagName("div").item(i).style.visibility = "hidden";
document.getElementsByTagName("div").item(i).style.display = "none";
}
}

Or in a much cleaner way with css within stylish

@-moz-document domain(mail.google.com) {

.rh {display: none !important;}
}

Using greasemonkey user script is undoubtedly much slower, since it has to loop through all divs... maybe there is a better way to locate div tag class name, but I don't know...anyway, it does the job, who care..lol

Saturday, April 21, 2007

How to build a great markup

So you are a web master, a web designer, or a novice who start web design? if you've ever stumbled across your web site full of gibberish that was actually meant to be Japanese, Greek, Swahili etc. You've probably forgotten to set the encoding. Search engine such Google, ask will sort results differently based on the language of a search request, proper encoding pays off if you want search engine traffic.

Below tutorials explains what happened behind and provide very good solution, definitely great tutorials!

Developing With Web Standards
http://www.456bereastreet.com/lab/developing_with_web_standards/

Fix Your Site With the Right DOCTYPE!
http://www.alistapart.com/articles/doctype