You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
414 B
JavaScript
19 lines
414 B
JavaScript
1 month ago
|
var url = "https://en.wikipedia.org/w/api.php";
|
||
|
|
||
|
var params = {
|
||
|
action: "compare",
|
||
|
format: "json",
|
||
|
fromtitle: "Template:Unsigned",
|
||
|
totitle: "Template:UnsignedIP",
|
||
|
origin: "*"
|
||
|
|
||
|
};
|
||
|
fetch(url + "?" + (new URLSearchParams(params)).toString())
|
||
|
.then(resp => resp.json())
|
||
|
.then(data => {
|
||
|
console.log("data", data);
|
||
|
})
|
||
|
.catch(err => {
|
||
|
console.log("bad", err);
|
||
|
});
|