wus_uic

wus UI 控制管理

Script này sẽ không được không được cài đặt trực tiếp. Nó là một thư viện cho các script khác để bao gồm các chỉ thị meta // @require https://update.greasyfork.ip-ddns.com/scripts/37317/243377/wus_uic.js

(function(){
  $("body").prepend("<div id='wusdiv'></div>")
})();

function addtextag(callback,dtext='......',id='wusinput',btext="Start"){
     $("#wusdiv").append(`<textarea rows="3" cols="80" id='${id}'>${dtext}</textarea>&nbsp;&nbsp;<button id='b${id}'>${btext}</button></br>`)
     $(`#b${id}`).click(function(){
       val=$(`#${id}`).val()
       if(val==dtext){
         alert("you can input some vaild text for youself!")
         return
       }
       console.log(`get the val: "${val}" ,then and run the callback`)
       callback(val)
     })
}

function addfiletag(callback,id='wusfile'){
    $("#wusdiv").append(`<input type="file" id="${id}"/></br>`)

    $(`#${id}`).change(function(){
        callback(this.files)
    })
}