var Lines = {};
(function() {

    Lines.config = {
        lines: "lines",
        line: "line",
        step: 0.1,
        run_step: 1,
        context: '<div id="line" class="line"><div class="circle"></div></div>',
    }

    var interval;
    var bfb = 0;

    Lines.start = function() {
        if (Lines.isLines()) {
            Lines.stop();
            Lines.set(1);
        } else {
            document.body.innerHTML = '<div id="' + Lines.config.lines + '" class="lines">' + Lines.config.context + '</div>' + document.body.innerHTML;
            Lines.set(1);
        }
        return Lines;
    };


    Lines.run = function(v, step) {
        if (Lines.isLines()) {
            if (v) {
                Lines.stop();
            }
            bfb = parseFloat(document.getElementById(Lines.config.line).style.width);
            interval = setInterval(function() {
                bfb += step ? step : v ? Lines.config.run_step : Lines.config.step;
                Lines.set(bfb);
                if (v && v <= bfb) {
                    Lines.stop();
                }
            }, 1);
        }
        return Lines;
    };

    Lines.stop = function() {
        clearInterval(interval);
        return Lines;
    };

    Lines.set = function(v) {
        if (Lines.isLines()) {
            document.getElementById(Lines.config.line).style.width = (v = v < 0 ? 0 : v > 100 ? 100 : v) + '%';
        }
        return Lines;
    };

    Lines.done = function(v) {
        if (Lines.isLines()) {
            Lines.stop();
            v = v ? v : 100;
            Lines.run(v);
            var s = setInterval(function() {
                var w = parseFloat(document.getElementById(Lines.config.line).style.width);
                if (v <= w) {
                    clearInterval(s);
                    setTimeout(function() {
                        Lines.end();
                    }, 150);
                }
            }, 1);
        }
        return Lines;
    };

    Lines.end = function() {
        if (Lines.isLines()) {
            Lines.stop();
            var e = document.getElementById(Lines.config.lines);
            e && e.parentNode && e.parentNode.removeChild(e);
        }
        return Lines;
    };

    Lines.isLines = function() {
        var e = document.getElementById(Lines.config.lines);
        return e ? true : false;
    }
})();

@@ -339,63 +339,25 @@
 nes.
-stop();%0A            Lines.set(1);%0A        %7D else %7B%0A    
+end();%0A        %7D%0A
     
@@ -501,36 +501,32 @@
 erHTML;%0A        
-    
 Lines.set(1);%0A  
@@ -519,34 +519,24 @@
 nes.set(1);%0A
-        %7D%0A
         retu
@@ -764,32 +764,76 @@
 ).style.width);%0A
+            if (!v %7C%7C (v && v %3E bfb)) %7B%0A    
             inte
@@ -856,32 +856,36 @@
 al(function() %7B%0A
+    
                 
@@ -960,32 +960,36 @@
                 
+    
 Lines.set(bfb);%0A
@@ -1000,24 +1000,28 @@
             
+ 
+   
 if (v && v %3C
@@ -1041,32 +1041,36 @@
                 
+    
 Lines.stop();%0A  
@@ -1075,34 +1075,43 @@
                 
+   
+ 
 %7D%0A
+%0A    
             %7D, 1
@@ -1105,32 +1105,46 @@
          %7D, 1);%0A
+            %7D%0A
         %7D%0A      

修复run(v)步进问题，和修改start生成新的进度条