"사용자:다메즈마/common.js"의 두 판 사이의 차이

1번째 줄: 1번째 줄:
$(document).on("click", "a", function(e){
+
 
e.preventDefault();
 
});
 
alert("hello");
 
 
$("a[href$=.ogg]").each((index, it)=>{
 
$("a[href$=.ogg]").each((index, it)=>{
 
mw.Api({
 
mw.Api({

2018년 11월 12일 (월) 08:21 판

$("a[href$=.ogg]").each((index, it)=>{
mw.Api({
action="query",
title=$(it).html(),
prop="imageinfo",
iiprop="url",
format="json"
}).done((res)=>{
for(var it of res.query.pages){
    console.log(it.imageinfo[0].url);
}

});
});