Widget:Mymodules: verschil tussen versies
Naar navigatie springen
Naar zoeken springen
Geen bewerkingssamenvatting |
Geen bewerkingssamenvatting |
||
(7 tussenliggende versies door dezelfde gebruiker niet weergegeven) | |||
Regel 16: | Regel 16: | ||
function make_modules_table(data) { | function make_modules_table(data) { | ||
// data: array of objects; per object: | // data: array of objects; per object: | ||
var html = "<tr> <th> Page </th> <th> kind </th> <th> time </th> </tr>\n"; | var html = "<tr> <th> Page </th> <th> link </th> <th> kind </th> <th> time </th> </tr>\n"; | ||
var articlePath = mw.config.get("wgArticlePath"); | |||
console.log(typeof data); | |||
data.forEach( (obj) => { | data.forEach( (obj) => { | ||
html = html + "<tr>" + | html = html + "<tr>" + | ||
"<td>" + | "<td>" + obj.pagename + "</td>" + | ||
"<td>" + | "<td>" + '<a href="' + articlePath.replace('$1', obj.pagename) + '">' + obj.pagename + "</a>" + "</td>" + | ||
"<td>" + | "<td>" + obj.kind + "</td>" + | ||
"<td>" + obj.time + "</td>" + | |||
"</tr>\n"; | "</tr>\n"; | ||
console.log(html); | console.log(html); |
Huidige versie van 9 jan 2020 om 15:06
This widget given an overview of your module status
Created by User:Eelco
Using this widget
For information on how to use this widget, see ???
text= kind= (string/identifier)
Copy to your site
To use this widget on your site, just install MediaWiki Widgets extension and copy the full source code of this page to your wiki as page Widget:Mymodules.