Site Notice
hello, world
Difference between revisions of "Generate Image Download Links"
From Project-EPB Commons
m ([InPageEdit] 没有编辑摘要) |
m ([InPageEdit] 没有编辑摘要) |
||
Line 1: | Line 1: | ||
<html> | <html> | ||
+ | <input id="html" value="https://no-game-no-life.fandom.com/wiki/Special:Filepath/"></input> | ||
+ | <label for="jsonList"></label> | ||
<textarea id="jsonList"></textarea> | <textarea id="jsonList"></textarea> | ||
<button onclick="generate()">Generate</button> | <button onclick="generate()">Generate</button> | ||
Line 5: | Line 7: | ||
<script> | <script> | ||
function generate() { | function generate() { | ||
− | var html = ' | + | var html = $('#html').val(), |
files = eval('(' + $('#jsonList').val() + ')'), | files = eval('(' + $('#jsonList').val() + ')'), | ||
output = ''; | output = ''; | ||
for (var i = 0; i < files.query.allpages.length; i++) { | for (var i = 0; i < files.query.allpages.length; i++) { | ||
− | output = output | + | output = output + html + files.query.allpages[i].title + '\n'; |
} | } | ||
$('#fileList').text(output); | $('#fileList').text(output); |
Revision as of 17:03, 8 April 2020
<html> <input id="html" value="https://no-game-no-life.fandom.com/wiki/Special:Filepath/"></input> <label for="jsonList"></label> <textarea id="jsonList"></textarea> <button onclick="generate()">Generate</button> <pre id="fileList"></pre> <script> function generate() {
var html = $('#html').val(), files = eval('(' + $('#jsonList').val() + ')'), output = ''; for (var i = 0; i < files.query.allpages.length; i++) { output = output + html + files.query.allpages[i].title + '\n'; } $('#fileList').text(output);
} </script> </html>