Flagging Blogger pages with a hidden navbar

You tend to come across these types of blogs on Blogger quite a bit lately. Sometimes they disable it for appearance sake, other times it’s for more nafarious purposes. The toolbar contains the “Flag Blog” option which allows visitors to notify Google of any inappropriate content on blogs. Of course, if this is disabled…

It’s no secret that Blogger is one of the worst services when it comes to the proliferation of spam, porn, viruses etc… This is mostly due to the lax templating practices allowed by Blogger. You can do whatever you want to the CSS and even insert JavaScript. While this gives a great deal of control to the blogger, the result is usually mayhem.

To disable the Blogger toolbar/navbar inserted on the top of each blog, it only requires a ridiculously simple hack.

#navbar-iframe {
	display:none !important;
}

…And consider the toolbar killed.

If the blog contains offending content, then flagging it is a bit of a chore. But it’s still not impossible.

If you look at the sourcecode for the blog page, there’s usually a set of stylesheets inserted by Blogger for widget functionality. Look for one that has the “BlogID” in it.

To make this easier, I created a small utility that will both extract the ID and the URL from any Blogspot page and create this link for you. Note: This utility is experimental and is not guaranteed to work for all blogger pages.

How to find the BlogID

<link rel="stylesheet" type="text/css" href="http://www.blogger.com/dyn-css/authorization.css?targetBlogID=0000000000&zx=xxxxxxxx"/>

Notice the part where it says “targetBlogID”. This is the first part of what you need to flag a blog. The other part is the URL itself.

E.G. http://site.blogspot.com

By combining the two into one URL, you can flag the offending blog.

http://www.google.com/support/blogger/?action=flag&blog_ID=0000000000&blog_URL=http://site.blogspot.com

Update 29th

Following Jorel’s suggestion (see the comments), I included a small extension you can add to the browser to allow instant flagging of a blog. The utility page has been updated with instructions on how to use it.

Here’s the sourcecode for the extension.
function report()
{
var h = document.getElementsByTagName(“html”)[0].innerHTML;
var r = new RegExp(“targetBlogID=([0-9]+)”);
var m = r.exec(h);
var id = null;
var u = document.location.href;
var ht = “http://&#8221;;
if(u.indexOf(ht) < 0) u = ht + u; u = ht + u.match(/:\/\/(.[^/]+)/)[1]; if(m != null){ alert("You are about to flag a blog"); id = ''; for(var i = 1; i < m.length; i++) { id += m[i]; } window.location.href="http://www.google.com/support/blogger/?action=flag&blog_ID="+ id +"&blog_URL="+ u; } else{ alert("No blog ID detected. Are you sure this is a Blogspot page?"); } }[/sourcecode]

9 thoughts on “Flagging Blogger pages with a hidden navbar

    • I got it to work in IE!
      The trick is to add the link to favorites (I’m on IE8 right now).

      Right click on the link > Add to favorites. It will display a security warning saying it “may not be safe”. This is because the link is JavaScript.

      After adding, you can browse to any Blogger page and clink on the link in the bookmarks.

      edit_
      I’ll modify the page to make a mention of this. Thanks for testing, Jorel!

  1. Ahh… so that’s how you add bookmarklets in Internet Explorer. I just gave up after it didn’t do anything when I dragged it to the toolbar. I have seen the light. Thanks for the tip.

    No problemo with the testing. Let me know if you want me to test any other future projects in case you don’t have a Mac.

  2. Right… Got it… Okay… So… Um… Well, maybe not. Hah! I always feel a little less smarter once I get here… But that’s okay. Self awareness is a good thing… See you soon!

    • “I think, therefore I blog”

      BTW… Did you notice that search box in the WordPress bar on top of the page?

      Was that always there, or am I hallucinating?

      That used to be where the “Blog Info” menu used to be. Looks like they moved it to the left with the other options.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s