◆少前百科是非盈利性、非官方的少女前线维基百科。
◆如果您发现某些内容错误/空缺,请勇于修正/添加!参与进来其实很容易!点这里 加入少前百科
◆有任何意见、建议、纠错,欢迎在 GFwiki:反馈与建议 提出和讨论。编辑事务讨论QQ群:597764980,微博@GFwiki少前百科
◆To foreigners,You can use twitter to contact us.
Icon Nyto Silver.png

“Widget:AvgTabDisplay”的版本间的差异

来自少前百科GFwiki
跳转至: 导航搜索
(转义)
2个标签移动版编辑移动网页编辑
(暂时修改||:的处理)
 
(未显示同一用户的10个中间版本)
第12行: 第12行:
 
div#dollAvgContent {
 
div#dollAvgContent {
 
     position: fixed;
 
     position: fixed;
    top: 5%;
 
 
     left: calc(50% - 311px);
 
     left: calc(50% - 311px);
 
     width: 100%;
 
     width: 100%;
 +
    top: 3vh;
 
     height: 90vh;
 
     height: 90vh;
 
     max-width: 600px;
 
     max-width: 600px;
第65行: 第65行:
 
     left: calc(50% - 256px);
 
     left: calc(50% - 256px);
 
     top: -128px;
 
     top: -128px;
 +
}
 +
 +
.dollAvgContentClose {
 +
    height: 30px;
 +
    margin: 10px 0px;
 +
}
 +
 +
.dollAvgContentClose::after {
 +
    content: "Close";
 +
    float: right;
 +
    cursor: pointer;
 +
    transition: 0.5s;
 +
    padding: 5px 15px;
 +
    border-radius: 6px;
 +
}
 +
 +
.dollAvgContentClose:hover:after {
 +
    background-color: rgb(244 196 48 / 53%);
 +
    color: #000;
 +
}
 +
 +
.dollAvgClicked {
 +
    border-bottom: 1px solid #eaeaae;
 
}
 
}
  
第91行: 第114行:
  
 
div#dollAvgContent::-webkit-scrollbar-button {
 
div#dollAvgContent::-webkit-scrollbar-button {
}
 
 
div#dollAvgContent {
 
    position: fixed;
 
    top: 5%;
 
    left: calc(50% - 311px);
 
    width: calc(100% - 10px);
 
    height: 90vh;
 
    max-width: 600px;
 
    overflow-y: scroll;
 
    background-color: #000;
 
    box-shadow: 0 0 12px 3px black;
 
    border: 6px solid #000;
 
    padding: 1%;
 
    font-size: 14px;
 
 
}
 
}
  
第143行: 第151行:
 
                 let dir = $(this).attr("data-dir");
 
                 let dir = $(this).attr("data-dir");
 
                 let file = $(this).attr("data-file");
 
                 let file = $(this).attr("data-file");
 +
                $(this).addClass("dollAvgClicked");
  
 
                 // prevent user click many times first
 
                 // prevent user click many times first
第173行: 第182行:
  
 
     for(let i in line_list){
 
     for(let i in line_list){
        let line = line_list[i].replace(//g, ":").replace(/speaker>/g, "Speaker>").replace(/\r/g, "");
+
       let line = line_list[i].replace("||", "||:").replace(/speaker>/g, "Speaker>").replace(/\r/g, "");
 
         if(line.indexOf(":") == -1 || !line.split(":")[1]){ mw += "<br\/>"; continue;}
 
         if(line.indexOf(":") == -1 || !line.split(":")[1]){ mw += "<br\/>"; continue;}
  
第202行: 第211行:
 
             let branch_word_list = line.slice(line.indexOf("<c>") + ("<c>").length, line.length).split("<c>");
 
             let branch_word_list = line.slice(line.indexOf("<c>") + ("<c>").length, line.length).split("<c>");
 
             for(let j in branch_word_list){
 
             for(let j in branch_word_list){
                branch_word += `<div class="dollAvgBranchChoice">选项${j}:${branch_word_list[j]}<\/div>`;
+
               branch_word += `<div class="dollAvgBranchChoice">选项${String(Number(j)+1)}:${branch_word_list[j]}<\/div>`;
 
             }  
 
             }  
 
         }
 
         }
第228行: 第237行:
 
     }
 
     }
  
    $("body").append(`<div id="dollAvgContent" style="display:none;">${mw}<\/div>`);
+
   $("body").append(`<div id="dollAvgContent" style="display:none;"><div class="dollAvgContentClose"><\/div>${mw}<div class="dollAvgContentClose"><\/div><\/div>`);
     $("#dollAvgContent").slideDown(1000);
+
     $("#dollAvgContent").fadeIn(200);
 +
 
 +
   
 +
    $(".dollAvgContentClose").click(function(){
 +
        $("#dollAvgContent").fadeOut(150);
 +
        setTimeout(() => {
 +
            $("#dollAvgContent").remove();
 +
            $("#dollAvgMask").remove();
 +
        }, 200);
 +
    });
  
 
     $("#dollAvgMask").click(function(){
 
     $("#dollAvgMask").click(function(){
         $("#dollAvgContent").slideUp(200);
+
         $("#dollAvgContent").fadeOut(150);
 
         setTimeout(() => {
 
         setTimeout(() => {
 
             $("#dollAvgContent").remove();
 
             $("#dollAvgContent").remove();
第249行: 第267行:
 
     $(".backToTop").hide();
 
     $(".backToTop").hide();
 
}
 
}
 +
 +
 +
 
})</script></includeonly>
 
})</script></includeonly>

2023年1月23日 (一) 13:13的最新版本