Diferencia entre revisiones de «MediaWiki:Common.js»

Ir a la navegación Ir a la búsqueda
m (try that)
m (for now)
ModifySidebar( 'add', 'toolbox', 'Search Arcanum for '+ title, 'https://wob.coppermind.net/basic_search/?query='+ title );
});
 
/* for generating links and buttons */
// make an <a> with a url and some text
function make_a(url, text) {
const el = document.createElement('a')
el.setAttribute('href', url)
el.innerText = text
return el
}
 
// make a nice link button for the edit box
function make_edit_button(url, text, title) {
// create link element
const ln = make_a(url, text)
ln.setAttribute('target', '_blank')
// create wrap element
const el = document.createElement('span')
el.setAttribute('title', title)
el.appendChild(ln)
// style elements
// FIXME: these are copied from the oo-ui elements in the edit box
ln.className = 'oo-ui-inputWidget-input oo-ui-buttonElement-button'
el.className = 'oo-ui-widget oo-ui-widget-enabled oo-ui-inputWidget oo-ui-buttonElement oo-ui-buttonElement-framed oo-ui-labelElement oo-ui-buttonInputWidget'
// return element for insertion
return el
}