Line 327: |
Line 327: |
| return suffix ~= "" and suffix or name == base_name and "Base" or name | | return suffix ~= "" and suffix or name == base_name and "Base" or name |
| end | | end |
| + | end |
| + | |
| + | local function addBlurOptions(table) |
| + | table.insert(result, [=[<div class="toggle" data-target="nsfw" data-default="hide" data-classes="blur"> |
| + | <span class="toggle-show" style="cursor:pointer;color:#006cb0;">☑ Blur NSFW CG</span> |
| + | <span class="toggle-hide" style="cursor:pointer;color:#006cb0;">☒ Blur NSFW CG</span> |
| + | </div>]=]) |
| + | table.insert(result, [=[<div class="toggle" data-target="nsfw-damaged" data-default="hide" data-classes="blur"> |
| + | <span class="toggle-show" style="cursor:pointer;color:#006cb0;">☑ Blur all damaged CG</span> |
| + | <span class="toggle-hide" style="cursor:pointer;color:#006cb0;">☒ Blur all damaged CG</span> |
| + | </div>]=]) |
| end | | end |
| | | |
Line 375: |
Line 386: |
| end | | end |
| table.insert(result, "</div>") | | table.insert(result, "</div>") |
| + | addBlurOptions(table) |
| return table.concat(result, "\n") | | return table.concat(result, "\n") |
| end | | end |
Line 412: |
Line 424: |
| end | | end |
| table.insert(result, "}}") | | table.insert(result, "}}") |
− | table.insert(result, [=[<div class="toggle" data-target="nsfw" data-default="hide" data-classes="blur"> | + | addBlurOptions(table) |
− | <span class="toggle-show" style="cursor:pointer;color:#006cb0;">☑ Blur NSFW CG</span>
| |
− | <span class="toggle-hide" style="cursor:pointer;color:#006cb0;">☒ Blur NSFW CG</span>
| |
− | </div>]=])
| |
− | table.insert(result, [=[<div class="toggle" data-target="nsfw-damaged" data-default="hide" data-classes="blur">
| |
− | <span class="toggle-show" style="cursor:pointer;color:#006cb0;">☑ Blur all damaged CG</span>
| |
− | <span class="toggle-hide" style="cursor:pointer;color:#006cb0;">☒ Blur all damaged CG</span>
| |
− | </div>]=])
| |
| return table.concat(result, "\n") | | return table.concat(result, "\n") |
| end | | end |