Difference between revisions of "User:Fbstj/gadget/history-test.js"
Jump to navigation
Jump to search
m (+notices junk) |
m (try this) |
||
if (!v) return v;
v = v.replace(/\.(\d+)/, "%$1");
$('.title', this).append("<span class='mw-editsection' style='float: right;' >[" + a + "]</span>");
}
});
/* add links to edit box */
const A = (url, text) => {
const el = document.createElement('a')
el.setAttribute('href', url)
el.innerText = text
return el
}
const pagename = mw.config.get('wgPageName')
const edit_box = document.querySelector('.editButtons')
edit_box.appendChild(A('https://wob.coppermind.net/basic_search/?query='+ pagename, 'search Arcanum for "'+ pagename +'"'))
edit_box.appendChild(A('http://search.coppermind.net/?search='+ pagename, 'search books for "'+ pagename +'"'))
▲jQuery(function ($) {
})
|