Difference between revisions of "User:Fbstj/gadget/history-test.js"
Jump to navigation
Jump to search
m (try dis) |
m (trim) |
||
/* Add edit buttons to templates */
function add_editSection_link(box) {
if (!box.id) return;
// FIXME: what does this do?
const
// get the title element
const title = box.querySelector('.title')
// generate an edit link
const a = A('/edit/Template:'+
// wrap the link in an '.editSection' link floated right
const float = document.createElement('span')
// loop over all .infobox and .navbar elements to
const boxes = [...document.querySelectorAll('.infobox'), ...document.querySelectorAll('.navbar')]
▲ add_editSection_link(box)
});
|