My jQuery plugins: jquery.extservice.js for now
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
COPYING
Makefile
README
jquery.extservice.js

README

EXTSERVICE:

jquery.extservice.js is a plugin that allows you to add embedded items from
external services to a webpage easily and with a consistent syntax.

Currently supported services:
• Digg (the “digg it” button)
• Disqus (the forum thread for your webpage)
• Delicious (the blog badge)
• Google Analytics (the tracking code)

If the document contains

  <title>An awesome document – My awesome website</title>
  <meta name="title" content="An awesome document">

the meta value will be used as the default title for Digg and Disqus. Failing
that, the value of the title element will be used.

The content of a <meta name="description" content="..."> element, if any, will
be used as the default description for Digg.

The href of a <link rel="self" type="text/html" href="..."> element, if any,
will be used as the default URI for Digg and Disqus.

EXTSERVICE USAGE:

Add the following to the body:

  <div id="digg"></div>

  <div id="disqus">
    <!-- This will be replaced with the forum -->
    <p><a href="http://<your-disqus-forumname>.disqus.com/?url=ref">
      View the discussion thread.
    </a></p>
  </div>

  <div id="delicious"></div>

Add the following to the head after loading jQuery itself:

  <script type="text/javascript" src="<path-to-extservice>/jquery.extservice.min.js"></script>
  <script type="text/javascript">
    $(function () {
      $('#digg').loadDigg ({ bgcolor: 'yellow' });

      $('#disqus').loadDisqus ('<your-disqus-forumname>');

      $('#delicious).loadDelicious ();

      $.loadGoogleAnalytics ('<your-google-analytics-id>');
    });
  </script>

LICENSE:

Copyright © 2009 Johan Kiviniemi

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.