Editing the Digg Script

Discussion in 'JavaScript' started by Jboo, Jul 18, 2007.

  1. #1
    Hi,

    I'm hoping someone can help me with this. I'm trying to integrate the Digg button on my site using this code:

    <script type="text/javascript">
    digg_url = 'URL';
    digg_bgcolor = '#efefef';
    digg_skin = 'compact';
    </script>
    <script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
    Code (markup):
    However I need to automatically create the URL string somehow. I looked up how to use some javascript like this...

    <SCRIPT LANGUAGE="JavaScript">
      
               <!--
               {
                 document.write(location.href);
               }
               // -->
    </SCRIPT>
    Code (markup):
    But i'm not sure if this is possible to edit into the Digg script and if it's the best way?

    I'd appreciate any help.

    Thanks.
     
    Jboo, Jul 18, 2007 IP