Difference between revisions of "User:Fbstj/gadget/history-test.js"

m
try dis
m (oops)
m (try dis)
 
/* Add edit buttons to templates */
$(function add_editSection_link(box) {
 
function edit_button(box) {
if (!box.id) return
// FIXME: what does this do?
float.style.float = 'right'
title.appendChild(float)
// push "[]" around the A element into the spantrspan
float.appendChild(document.createTextNode('['))
float.appendChild(a)
float.appendChild(document.createTextNode(']'))
}
 
$(function edit_button(box) {
 
// loop over all .infobox and .navbar elements to
const boxes = [...document.querySelectorAll('.infobox'), ...document.querySelectorAll('.navbar')]
for (const box of boxes)
edit_buttonadd_editSection_link(box)
 
});