Discussion Timer

Sets a timer and divide the time equally between parties/topics/whatever. Implemented as an bookmarklet to activate on any webpage or online collaboration tool

by Swarts

HTML

<script src="http://timer-bookmarklet.googlecode.com/svn/jquery.cookie.min.js"></script>
<html>
    <head>
    </head>
    <body style='background:navy;color:white;'>
        This is a test html body.
    </body>
</html>

JavaScript

var TimerBookmarklet = function () {
    
    jQuery.noConflict();
    
    function init() {
    
        if(jQuery('#me_productive_timerbookmarklet').length === 1) {
            jQuery('#me_productive_timerbookmarklet').remove();
        } else {
        
            // -- create dom
            
            var $container = jQuery('<div id="me_productive_timerbookmarklet" />');
            var $sectionContainer = jQuery('<div />');
            var $minutesContainer = jQuery('<div />');
            var $minutes = jQuery('<input type="text" placeholder="? min" />');
            var $minutesL = jQuery('<div />');
            var $add = jQuery('<div>+</div>');
            var $progress = jQuery('<div />');
            var $addTitle = jQuery('<input type="text" placeholder="Section Name" />');
            var $section0 = jQuery('<div class="ti_section" />');
            
            var sections = new Array();
            sections[0] = "...";
            var sectionEdit = -1;
            
            jQuery("body").append($container
                            .append($sectionContainer
                                   .append($progress)
                                   .append($addTitle))
                            .append($add)
                            .append($minutesContainer
                                   .append($minutesL)
                                   .append($minutes)));
            
            // -- apply styles
            
            $container.css({
                'font-size':'1.1em',
                'font-family':'"Trebuchet MS",Verdana,Arial',
                color:'#333',
                border:'1px solid #333',
                background:'white',
                opacity:0.6,
                position:'absolute',
                top:0,
                right:0,
                margin:'1em',
                padding:'1em',
                'z-index':99999997,
                width:'21em',
                height:'1.5em' 
           ...