A JavaScript That Kills Google AutoLink Links

Get the WebProNews Newsletter:

[ Search]

Chris and Gurtie at Search Guild have published a working script that webmasters can insert into their webpages that kills Google AutoLink links.

What you need to do:

  • Insert the script anywhere in your html
  • or link it using the <script> tag in the <head> of your pages
  • and it will rewrite, the rewritten urls. Killing the Autolink functionality.
  • Here is the code:

    // AutoBlink
    // Puts Google's Autolink on the Blink :)
    // (c) 2005 Chris Ridings http://www.searchguild.com
    // Redistribute at will but leave this message intact

    var linkcount;
    function countlinks() {
    &nbsp&nbsp var numlinks;
    &nbsp&nbsp numlinks=0;
    &nbsp&nbsp for (i=0; i < document.links.length; i++) {
    &nbsp&nbsp&nbsp numlinks++;
    &nbsp&nbsp }
    &nbsp&nbsp return numlinks;

    function checklinks() {
    &nbsp&nbsp if (!(linkcount==countlinks())) {
    &nbsp&nbsp&nbsp // Something changed the links!
    &nbsp&nbsp&nbsp // Iterate for an id of _goog
    &nbsp&nbsp&nbsp found=0;
    &nbsp&nbsp&nbsp for (i=0; i < document.links.length; i++) {
    &nbsp&nbsp&nbsp if (document.linksi.id.substring(0,5)=="_goog") {
    &nbsp&nbsp&nbsp&nbsp // If we find an id of _goog then remove the link!
    &nbsp&nbsp&nbsp&nbsp var tr = document.linksi.parentTextEdit.createTextRange();
    &nbsp&nbsp&nbsp&nbsp tr.moveToElementText(document.linksi);
    &nbsp&nbsp&nbsp&nbsp tr.execCommand("Unlink",false);
    &nbsp&nbsp&nbsp&nbsp tr.execCommand("Unselect",false);
    &nbsp&nbsp&nbsp }
    &nbsp&nbsp }
    &nbsp }
    &nbsp setTimeout("checklinks()",500);

    if (document.getElementById && document.createElement) {
    &nbsp linkcount=countlinks();
    &nbsp setTimeout("checklinks()",500);

    Olivier Duffez is an SEO consultant specialized on Google. Working on the Internet since 1997, he created in 2002 Web Rank Info, a free SEO resources French community (+13,000 members), and in 2003 his company Web Rank Expert. He created an online collaborative dictionary supported by Google.fr and DMOZ.

    He's giving SEO conferences in ImiTiki's seminars and wrote a book about Google and SEO in 2004. He's also part of the developpment team of PR Weaver and Agent Web Ranking softwares.

    A JavaScript That Kills Google AutoLink Links
    Comments Off
    Top Rated White Papers and Resources

    Comments are closed.

    • Join for Access to Our Exclusive Web Tools
    • Sidebar Top
    • Sidebar Middle
    • Sign Up For The Free Newsletter
    • Sidebar Bottom