Distractor Example

This is a Proof-of-Concept that tries to check, if you are logged into some famous but distracting systems. It is inspired by Mike Cardwells Blog Article. Most of the examples work best in non MSIE-Browsers (Firefox).

You can download the code from here. There is also a Moodle-block using this code which can be found at oncode.info.

How to use this code:

  1. Include jquery.min.js on top of your page: <script src="jquery.min.js" type="text/javascript"></script>
  2. Include the distractor script and provide a callback: <script src="distractor.php?callback=result.php" type="text/javascript"></script>
  3. Code the callback script. It receives two arguments as POST: name and loggedin. The text returned will be added to the results-div.
  4. Put a div with id distractor-results in your webpage.
  5. You can define an element with the id distractor-noresults. This element will be shown if there are no results.
  6. You can define an element with the id distractor-hasresults. This element will be shown if there are results.
Login Checks
Log into gmail, facebook, twitter or digg to see results.
Aren't you distracted?
checkLogins