littleflute / JavaScript

https://littleflute.github.io/JavaScript/
MIT License
0 stars 3 forks source link

For: ToolBar #7

Open littleflute opened 6 years ago

littleflute commented 6 years ago

c2.js c3.js

littleflute commented 6 years ago

function api1() { var v = document.body; var d = blo0.blMDiv(v,v.id+"d","api1",51,10,500,400,blGrey[0]); d.v = blo0.blDiv(d,d.id+"v","v",blGrey[1]); blo0.blShowObj2Div(d.v,blo0); _on_off_div(this,d); var b = this; b.style.background = b.style.background=="red"?blGrey[5]:blColor[4]; b.innerHTML = "[blClass]"; }

littleflute commented 6 years ago

function api2() { function _api2JobClass(){
this.bll0= "

v0.1. 14
"; this.blrRunJS = function(b,d){ if(!d.v){ d.v = blo0.blDiv(d,d.id+"v","",blGrey[5]); d.v.ta = blo0.blTextarea(d.v,d.v.id+"ta","alert(1);",blGrey[3]); d.v.ta.style.width="95%"; d.v.ta.style.height="150px"; d.v.btnRun= blo0.blBtn(d.v,d.v.id+"btnRun","run;",blColor[4]); d.v.btnRun.onclick= function(){ eval(d.v.ta.value); } d.v.btnRunForever= blo0.blBtn(d.v,d.v.id+"btnRunForever","run...","grey"); d.v.btnRunForever.t= null;

        d.v.btnRunForever.onclick= function(){

           function _timerFun(){ 
                 d.v.btnRun.click();
           }
            if(!this.t){
                this.t = setInterval(_timerFun,100); 
                this.style.background = "green";
            }
            else{
                            clearInterval(this.t);
                this.t = null;
                this.style.background = "grey";
            } 
        }

        function _loadIssue10Comments(o) {
            var _i = 0;
            var _s = "<a target='_balnk' href ='";
            _s += "https://github.com/littleflute/JavaScript/issues/10'";
            _s += ">#10</a>"; 
            var _v = blo0.blDiv(d.v,d.v.id+"_v", _s, blGrey[1]);
            for(i in o){
                _i++;
                var a = o[i].body;
                var btnJS = blo0.blBtn(_v, _v.id+"btnJS"+i,_i,blGrey[2]);
                btnJS.onclick = function(_txt){
                           return function(){d.v.ta.value = _txt;}
                    }(a);
            }
        }
        var _src = "https://api.github.com/repos/littleflute/JavaScript/issues/10/comments";
        w3.getHttpObject(_src, _loadIssue10Comments);   
             }
    _on_off_div(b,d);       
    b.style.background = b.style.background=="red"?blGrey[5]:blColor[4];                  

}//this.blrRunJS this.bll1="--1--"; this.blrIssue8C = function(b,d){ if(!d.v){ d.v = blo0.blDiv(d,d.id+"v","v",blGrey[5]); d.v.innerHTML = "blrIssue8C
"; function _loadIssue8Comments(o) { for(i in o){ var a = o[i].body; var b = a.split("~~~html"); var c = b[1].split("~~~"); d.v.innerHTML += c[0]; d.v.innerHTML += "
"; }

        }
        w3.getHttpObject("https://api.github.com/repos/littleflute/JavaScript/issues/8/comments", _loadIssue8Comments);     
    }
    _on_off_div(b,d);       
    b.style.background = b.style.background=="red"?blGrey[5]:blColor[4];
} 

this.bll2=""; this.blrAboutI7C2= function(b,d){
var s = "blrAboutI7C2
";
s += "<a target='_blank' href='https://github.com/littleflute/JavaScript/edit/master/issues/7/c2.js'" s += " style='color:blue;'"; s +=">"; s += " c2.js* "; s += ""; s += "<a target='_blank' href='https://littleflute.github.io/JavaScript/issues/7/c2.js'"; s += " style='color:yellow;'"; s +=">"; s += " c2.js "; s += ""; d.innerHTML = s; _on_off_div(b,d); d.style.background = blGrey[5]; b.style.background = b.style.background=="red"?blGrey[5]:blColor[4]; }//this.blrAboutI7C2 } var v = document.body;//this.parentElement; var strTile = "api2:"; strTile += "

title4api2
"; var d = blo0.blMDiv(v,v.id+"api2", strTile ,101,10,500,400,blGrey[5]); if(!d.v){ d.v = blo0.blDiv(d,d.id+"v","v",blGrey[0]); blo0.blShowObj2Div(d.v, new _api2JobClass); if(bl$("blrIssue8C")){bl$("blrIssue8C").click();} if(bl$("blrRunJS")){bl$("blrRunJS").click(); bl$("blrRunJS").click();} if(bl$("blrAboutI7C2")){bl$("blrAboutI7C2").click(); bl$("blrAboutI7C2").click();}

} _on_off_div(this,d); var b = this; b.style.background = b.style.background=="red"?blGrey[5]:blColor[4];

}

littleflute commented 6 years ago

function api3(_listURL) { if(!_listURL){_listURL = "https://api.github.com/repos/littleflute/JavaScript/issues/9";} function _api3JobClass(){ var _nTime = 0; var _vTimer = null; this.v = "v0.0. 323" + _listURL;
var _makeMp3List2Div = function(d,txt){ var _f = function (o){ eval(o.body); _parseFun (d,txt); } w3.getHttpObject(_listURL, _f);
} var _TimeFun = function(){
var p = bl$("id_mp3Player");
if(!p.users) p.users = []; _nTime ++; if(_vTimer ) _vTimer.innerHTML = _nTime + ": " + p.currentTime + "/" + p.duration; for(i in p.users){ p.users[i].currentTimeFun(); }
}
this.blrMp3Player = function(b,d){ if(!d.v){ d.v = blo0.blDiv(d,d.id+"v","v",blGrey[3]); _vTimer = blo0.blDiv(d,d.id+"_vTimer ","_vTimer ",blColor[4]);

         var _f = "https://littleflute.github.io/bat/mp3/MereChristianity/cd1/00_Preface.mp3";
        blo0.blAudio (d.v,"id_mp3Player",_f);
        b.style.background = b.style.background=="red"?blGrey[5]:blColor[4];
    }
}//this.blrMp3Player

this.blrMp3List = function(b,d){ 
        if(!d.v){
             d.v = blo0.blDiv(d,d.id+"v","v",blGrey[3]); 

             d.v4List = blo0.blDiv(d,d.id+"v4List ","v4List ",blColor[4]);
             function _loadListComments(o) {
            for(i in o){ 
                 var btn = blo0.blBtn(d.v,d.v.id + "_btn_"+i, i+1,blColor[i]);
                 btn.txt = o[i].body; 
                 btn.onclick = function(_this){
                        return function (){_makeMp3List2Div(d.v4List,_this.txt);};
                 }(btn);
            }
        }
        w3.getHttpObject(_listURL  + "/comments", _loadListComments);   
         }

    _on_off_div(b,d);       
    b.style.background = b.style.background=="red"?blGrey[5]:blColor[4];
}//this.blrMp3List 

this.bllVOA = "VOA"; this.blrVOA = function(b,d){ if(!d.v){ d.v = blo0.blDiv(d, "id_div_4_VOA", "v" ,blGrey[2]); function _RunJS(o) { d.v.innerHTML = o.body; eval(o.body); }var url = "https://api.github.com/repos/littleflute/JavaScript/issues/13"; w3.getHttpObject("https://api.github.com/repos/littleflute/voa/issues/1", _RunJS);
} _on_off_div(b,d); b.style.background = b.style.background=="red"?blGrey[5]:blColor[4];
}

this.bllAbout = "About"; this.blrAboutI7C3= function(b,d){
if(!d.v){ d.v0 = blo0.blDiv(d, "id_div_4_blrAboutI7C3_v0", "v0" ,blGrey[2]); d.v0.b1 = blo0.blBtn(d.v0,d.v0.id + "_btn1", "blGrey[5]", blGrey[5]); d.v0.b1.onclick = function(){ d.parentElement.style.background = blGrey[5]; } d.v0.b1.onclick();

             d.v = blo0.blDiv(d, "id_div_4_blrAboutI7C3", "blrAboutI7C3" ,blGrey[2]); 
    var s = "blrAboutI7C3<br>"; 

    s += "<a target='_blank' href='https://github.com/littleflute/JavaScript/issues/7'"
    s += " style='color:blue;'";
    s +=">";
    s += "#7*  ";
    s += "</a>"; 

    s += "<a target='_blank' href='https://github.com/littleflute/JavaScript/edit/master/issues/7/c3.js'"
    s += " style='color:blue;'";
    s +=">";
    s += " c3.js*  ";
    s += "</a>"; 
    s += "<a target='_blank'  href='https://littleflute.github.io/JavaScript/issues/7/c3.js'";
    s += " style='color:yellow;'";
    s +=">";
    s += " c3.js ";
    s += "</a>"; 
    d.v.innerHTML = s;

} _on_off_div(b,d); d.style.background = blGrey[5]; b.style.background = b.style.background=="red"?blGrey[5]:blColor[4]; }//this.blrAboutI7C3

 setInterval(_TimeFun , 100);   

}//_api3JobClass

var v = document.body;//this.parentElement; var d = blo0.blMDiv(v,v.id+"api3","api3",101,10,500,400,blGrey[6]); if(!d.v){ d.v = blo0.blDiv(d,d.id+"v","v",blColor[0]); blo0.blShowObj2Div(d.v, new _api3JobClass); if(bl$("blrMp3Player")){bl$("blrMp3Player").click();} if(bl$("blrMp3List")){bl$("blrMp3List").click();} if(bl$("blrVOA")){bl$("blrVOA").click();} if(bl$("blrAboutI7C3")){bl$("blrAboutI7C3").click();bl$("blrAboutI7C3").click();} } _on_off_div(this,d); var b = this; b.style.background = b.style.background=="red"?blGrey[5]:blColor[4]; }

littleflute commented 6 years ago

function _blVPlayer ( _p ) {//api4 function _vplayerClass ( _o) { this.v = "v0.0. 113"; this.blrList= function(b,d){ if(!d.v){ d.v = blo0.blDiv(d, "id_div_4_api4","v" ,blGrey[1]);
function _loadIssue20 (o) { eval(o.body); } var url = "https://api.github.com/repos/littleflute/JavaScript/issues/20"; w3.getHttpObject(url, _loadIssue20 ); } _on_off_div(b,d); d.style.background = blGrey[5];
b.style.background = b.style.background=="red"?blGrey[5]:blColor[4]; } this.bll2= "--2--"; this.blrAboutI7C4= function(b,d){ var s = "blrAboutI7C4
"; s += "<a target='_blank' href='https://github.com/littleflute/JavaScript/issues/7'" s += " style='color:blue;'"; s +=">"; s += "#7 "; s += ""; s += "<a target='_blank' href='https://github.com/littleflute/JavaScript/edit/master/issues/7/c4.js'"; s += " style='color:blue;'"; s +=">"; s += " c4.js "; s += ""; s += "<a target='_blank' href='https://littleflute.github.io/JavaScript/issues/7/c4.js'"; s += " style='color:yellow;'"; s +=">"; s += " c4.js "; s += ""; d.innerHTML = s; _on_off_div(b,d); d.style.background = blGrey[5]; b.style.background = b.style.background=="red"?blGrey[5]:blColor[4]; }//this.blrAboutI7C4 } var v = document.body; var d = blo0.blMDiv(v,v.id+"_api4","_api4",151,10,500,400,blGrey[0]);

d.v = blo0.blDiv(d,d.id+"v","v" ,blGrey[1]); blo0.blShowObj2Div(d.v, new _vplayerClass ( _p ) ); if(bl$("blrList")){bl$("blrList").click();} if(bl$("blrAboutI7C4")){bl$("blrAboutI7C4").click();}

var b = bl$("blrToolBarDivtbbtnLoadb3");_on_off_div(b,d); b.style.background = b.style.background=="red"?blGrey[5]:blColor[4]; b.innerHTML = "[api4]"; }

littleflute commented 6 years ago

function _blSet ( _p ) {//api5 if(!_p){_p ={"v":"v0.0.11"};} function _setClass ( _o) { this.v = "v0.0. 134"; this.blrSetList= function(b,d){ if(!d.v){ d.v = blo0.blDiv(d,d.id+"v","v" ,blGrey[1]); blo0.blShowObj2Div(d.v, _o); ; } _on_off_div(b,d); d.style.background = blGrey[5]; b.style.background = b.style.background=="red"?blGrey[5]:blColor[4]; }

    this.bll1 = "";

   this.blr_Issue13 = function(b,d){    
     if(!d.v){
         d.vIssue13Cs = blo0.blDiv(d, d.id + "vIssue13Cs", "", blGrey[1]); 
         d.vIssue13 = blo0.blDiv(d, d.id + "vIssue13", "", blGrey[5]); 
         function _loadIssue13 (o) { 
                               d.vIssue13.innerHTML = o.body;   
         }
        var url = "https://api.github.com/repos/littleflute/JavaScript/issues/13";
         w3.getHttpObject(url, _loadIssue13 );
        function _Issue13Comments(o) {
            var _i = 0; 
            var _v = d.vIssue13Cs;
            for(i in o){
                _i++;
                var a = o[i].body;
                var btnJS = blo0.blBtn(_v, _v.id+"btnJS"+i,_i,blGrey[2]);
                btnJS.onclick = function(_txt){
                           return function(){
                                                          eval( _txt);
                                           }
                    }(a);
            }

        }
        var _src = "https://api.github.com/repos/littleflute/JavaScript/issues/13/comments";
        w3.getHttpObject(_src, _Issue13Comments);   
    }
    _on_off_div(b,d);
    d.style.background = blGrey[5];
    b.style.background = b.style.background=="red"?blGrey[5]:blColor[4];
} //this.blr_Issue13 

   this.bll2= "";

    this.blrAboutI7C5= function(b,d){       var s = "blrAboutI7C5<br>";  
    s += "<a target='_blank' href='https://github.com/littleflute/JavaScript/edit/master/issues/7/c5.js'";
    s += " style='color:blue;'";        s +=">";        s += " c5.js*  ";       s += "</a>"; 
    s += "<a target='_blank'  href='https://littleflute.github.io/JavaScript/issues/7/c5.js'";
    s += " style='color:yellow;'";      s +=">";        s += " c5.js ";     s += "</a>"; 
    d.innerHTML = s;
    _on_off_div(b,d);       d.style.background = blGrey[5];         b.style.background = b.style.background=="red"?blGrey[5]:blColor[4];
}//this.blrAboutI7C5
}

var v = document.body; var d = blo0.blMDiv(v,v.id+"_blSet","_blSet",351,10,500,400,blGrey[0]);

d.v = blo0.blDiv(d,d.id+"v","v" ,blGrey[1]); blo0.blShowObj2Div(d.v, new _setClass ( _p ) ); if(bl$("blrAboutI7C5")){bl$("blrAboutI7C5").click();} if(bl$("blrSetList")){bl$("blrSetList").click();} if(bl$("blr_Issue13")){bl$("blr_Issue13").click();}

var b = bl$("blrToolBarDivtbbtnLoadb4");_on_off_div(b,d); b.style.background = b.style.background=="red"?blGrey[5]:blColor[4]; b.innerHTML = "[blSet]"; }