Skip to page content or skip to Accesskey List.
Search evolt.org
evolt.org login: or register

Work

Main Page Content

Defeating the Third Voice Plug-in

Rated 3.91 (Ratings: 1) (Add your rating)

Log in to add a comment
(4 comments so far)

Want more?

 
Picture of Jeff Howden

Jeff Howden

Member info | Full bio

User since: December 13, 1998

Last login: June 22, 2011

Articles written: 21

I've been playing around trying to figure out how to beat this plug-in. In my playing around, I've come up with a script that will render it completely useless on any page the following JavaScript is posted.

How Third Voice works is to append comments to specific text at a specific URL. However, if that URL changes, the comment is no longer attached to anything relevant. So, the trick is to make sure the URL is never the same.

This can be done by appending a random string to the end of the URL using the location.search object. If the URL already has the random string appended to it, change the random string and re-append. The trick is to get the script to not force the browser into an infinite loop. The easiest way to do that is to use the getTime() function which returns the number of milliseconds since January 1, 1970. Since this number is always changing, we can easily be guaranteed that the string to attach to the end of the URL is unique. If the page is loaded with a search string already attached, we simply check to see if it is within 100,000 milliseconds from the current time string created when the page is loaded. If it is more than 100,000 milliseconds the page is reloaded with the new time string appended.

Here's the script. I've tested it on both IE4 and IE5 and it seems to work pretty well. Have massaged it so it won't cause any errors and won't throw the browser into a loop. Be sure to place the following script in the head section of your document of every page you want protected and you're now Thirdvoice-proof.

<script language="JavaScript" type="text/javascript">
<!--
  var agt = navigator.userAgent.toLowerCase();
  var ie4u = ((agt.indexOf('msie') != -1) && (parseInt(navigator.appVersion) >= 4));
  if(ie4u)
  {
    ts = new Date();
    ts = ts.getTime();
    lh = location.href;
    if(location.search)
    {
      ls = location.search;
      if(parseInt(ts) - ls.substring(1,ls.length) >= '100000')
      {
        location.href = lh.substring(0,lh.indexOf('?')) + '?' + ts;
      }
    }
    else
    {
      location.href = lh + '?' + ts;
    }
  }
// -->
</script>

That's all there is to it. So, for those of you who don't care to let Third Voice ruin your creations, have at it.

Jeff Howden (.jeff) is a web developer working for Vos & Howden, LLC in Portland, Oregon where he's partnered with long-time colleague, Anthony Vos. His skills include ColdFusion, JavaScript, CSS, XML, relational databases, and much, much more. His biggest professional accomplishments include, but are not limited to:

  • building a ColdFusion-based e-commerce solution for Mt. Bachelor that transacted over $1.62 million dollars in September 2001 with 0 (yes, that's zero) ColdFusion errors and then an almost completely rebuilt version transacted $2.86 million dollars in September 2002.
  • being asked to be a Technical Editor for the ColdFusion MX book, Inside ColdFusion MX from New Rider's Publishing company.
  • being asked by BrainBench to perform quality control on their JavaScript 1.5 certification test after receiving the highest beta test score out of 200 testees.
  • managing the server that hosts evolt.org and withstanding a slashdotting that brought over 1,000,000 hits to the site, over 10 gigs of data transfer, and an average in excess of 2300 unique visitor sessions per hour, all within a 24-hour period and the server never hiccuping once.

Submitted by MartinB on June 14, 1999 - 07:51.

There's now a detector for the plugin at http://www.cse.msu.edu/~bowersj2/seperate.htm

login or register to post comments

Submitted by MartinB on June 14, 1999 - 12:14.

Here's another update, which redirects 3V users to a 'get lost' page:

&lt;script language="JavaScript"&gt;<p>

&lt;!--code block 1 - must appear before code block 2 (can be put in head or body part of the page)<p>

//Copyright Christian Graham<br> (plugin_detection@hotmail.com) 1999 - distribute freely<p>

CheckThirdVoice = 1;<br>

//Assume everyone has ThirdVoice<p>



function noThirdVoice(){<br>

CheckThirdVoice = -1;<br>

}<p>



function redirect_ThirdVoice_users(URL){<br>

if (CheckThirdVoice==1) {<br>

location.href = URL;<br>

}<br>

}<br>

//--&gt;<br>

&lt;/script&gt;

&lt;/head&gt;

&lt;body&gt;

&lt;script language="JavaScript"&gt;<br>

&lt;!--code block 2 - must appear in the body of the page before code block 3<p>

if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")&gt;=0) {<br>

   if (navigator.userAgent.indexOf("Windows 95")&gt;=0 || navigator.userAgent.indexOf("Windows NT")&gt;=0 || navigator.userAgent.indexOf("Windows 98")&gt;=0 ){
<br>
//MSIE 32 bit Windows users only<br>

document.write('&lt;object classid="clsid:1EF5024A-C21D-11D2-8F03-00609778932A" CODEBASE="javascript:noThirdVoice();" ID="ThirdVoice" width="1" height="1"&gt;');<br>

document.write('&lt;/object&gt;');<p>

   }else{<p>

   //Mac & Unix IE users<br>

   noThirdVoice();<br>

   }<p>

}else{<br>

//All other JavaScript enabled users incl Netscape<br>

noThirdVoice();<br>

}<br>

//--&gt;<p>

&lt;/script&gt;<p>

&lt;!--Normal HTML code begins here --&gt;<p>
This new improved code will only redirect ThirdVoice/Windows 32 IE users
- other browser users are not redirected

It can also be more easily added as a SSI to existing sites

<!--Normal HTML code ends here -->

<script language="JavaScript">

<!--code block 3 - must appear in the body of the page after code blocks 1 and 2

//Enter the URL you want to redirect to inbetween the quotes

redirect_ThirdVoice_users("http://qtvr.hypermart.net/ThirdVoice/no.html");
//--> </script>

login or register to post comments

Submitted by wcb4 on September 9, 1999 - 08:19.

why not just look through the image array and check for the source of the image. Every note is shown on the page with a small arrow graphic, the source of which is from thirdvoice.com. You can then set the source to null and the html link surrounding the image to null as well, this way the arrows disappear. You can set the frequency at which this is done to only a few milliseconds if you like, but thats a cpu hog, I find that once every two or three seconds is sufficient. A user does not even have time to add a note and then look at it before it is removed. Here's the JS code I use: // // if they are usign IE 4.0+, autorun removeThirdVoice // IE4 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) >= 4); timeout = 1000; if (IE4) window.setInterval("removeThirdVoice()", timeout); function removeThirdVoice () { imageNumber = document.images.length; for ( i = imageNumber; i >= 0; i-- ){ if ( document.images(i) && document.images(i).src.indexOf("thirdvoice.com") != -1 ) { document.images(i).outerHTML = ""; } } numberOfTags = document.all.length; for ( i = numberOfTags; i >= 0; i-- ) { if ( document.all(i) && document.all(i).id && document.all(i).id.indexOf("annot") != -1 ) { document.all(i).outerText = ""; } } }

login or register to post comments

Submitted by Jeff Howden on September 9, 1999 - 12:52.

I was aware of the method of cycling through the image array, looking for any image from thirdvoice.com and setting the image and it's associated link to null, but I didn't like that method. I found it left the browser constantly loading, never quite done, which can be confusing to the casual internet user. I also found that the script and thirdvoice would "fight" for control of those images and links, usually ending up in my browser crashing. That wasn't worth it to me. I was looking for a way to defeat the plug-in without bringing a system to it's knees.

Here were some of my goals in creating this script.

  • A script that executed once, disabling thirdvoice, leaving extra resources for animations and any other scripts that may be on the page.
  • A script that would work even if thirdvoice decided to serve their images from an ip range, rather than thirdvoice.com.
  • A script that would be easily modifiable for when thirdvoice releases the version for netscape.
  • A script that was in a single script block for easy maintenance.
  • A script that was as small in file size as possible.

I think I've achieved all my goals with this script and haven't had it crash my browser. Thank you for your comments though.

login or register to post comments

The access keys for this page are: ALT (Control on a Mac) plus:

evolt.orgEvolt.org is an all-volunteer resource for web developers made up of a discussion list, a browser archive, and member-submitted articles. This article is the property of its author, please do not redistribute or use elsewhere without checking with the author.