|
|
(16 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| <html>
| | {{#ask: [[Doom II]]|?From Year}} |
| <script>
| |
| window.addEventListener("load", () => {
| |
| let button = document.getElementById("tt-button");
| |
| let fileInput = document.getElementById("tt-input");
| |
|
| |
| | |
| button.addEventListener("click", () => {
| |
| const api = new mw.Api();
| |
| let param = {
| |
| filename: fileInput.name,
| |
| format: "json",
| |
| ignorewarnings: 1,
| |
| text: "=={{int:license-header}}==\n{{Non-free game cover}}",
| |
| | |
| };
| |
| | |
| api
| |
| .upload(fileInput, param)
| |
| .done(function (data) {
| |
| console.log(data.upload.filename + " has sucessfully uploaded.");
| |
| })
| |
| .fail(function (data) {
| |
| console.log(data);
| |
| });
| |
| });
| |
| });
| |
| </script>
| |
| | |
| <input type="file" id="tt-input"/>
| |
| <input type="button" id="tt-button" value="Upload" />
| |
| </html>
| |