◆少前百科是非盈利性、非官方的少女前线维基百科。 ◆如果您发现某些内容错误/空缺,请勇于修正/添加!参与进来其实很容易!点这里 加入少前百科。 ◆有任何意见、建议、纠错,欢迎在 GFwiki:反馈与建议 提出和讨论。编辑事务讨论QQ群:597764980,微博@GFwiki少前百科 ◆To foreigners,You can use twitter to contact us. |
“Widget:AvgTabDisplay”的版本间的差异
(选项+1) |
(暂时修改||:的处理) |
||
(未显示同一用户的6个中间版本) | |||
第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; | ||
} | } | ||
第128行: | 第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 | ||
第158行: | 第182行: | ||
for(let i in line_list){ | for(let i in line_list){ | ||
− | + | 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;} | ||
第187行: | 第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">选项${String(Number(j)+1)}:${branch_word_list[j]}<\/div>`; | |
} | } | ||
} | } | ||
第213行: | 第237行: | ||
} | } | ||
− | + | $("body").append(`<div id="dollAvgContent" style="display:none;"><div class="dollAvgContentClose"><\/div>${mw}<div class="dollAvgContentClose"><\/div><\/div>`); | |
$("#dollAvgContent").fadeIn(200); | $("#dollAvgContent").fadeIn(200); | ||
+ | |||
+ | |||
+ | $(".dollAvgContentClose").click(function(){ | ||
+ | $("#dollAvgContent").fadeOut(150); | ||
+ | setTimeout(() => { | ||
+ | $("#dollAvgContent").remove(); | ||
+ | $("#dollAvgMask").remove(); | ||
+ | }, 200); | ||
+ | }); | ||
$("#dollAvgMask").click(function(){ | $("#dollAvgMask").click(function(){ | ||
第234行: | 第267行: | ||
$(".backToTop").hide(); | $(".backToTop").hide(); | ||
} | } | ||
+ | |||
+ | |||
+ | |||
})</script></includeonly> | })</script></includeonly> |