User:Guywan/Scripts/RefCruncher.js: Difference between revisions

Content deleted Content added
mNo edit summary
mNo edit summary
 
(5 intermediate revisions by the same user not shown)
Line 12:
rc_refs = [];
// Don'tAdd overwrite an existing onkeyupkey handler.
window.addEventListener("keydown", e =>
var o = document.onkeyup;
document.onkeyup = document.onkeyup === null ? handle : e => { o(e); handle(e); };
function handle(e)
{
if(e.ctrlKey && e.altKey && e.which == 82)
Line 22 ⟶ 19:
run();
}
});
function run()
Line 65 ⟶ 62:
var text = txtarea.value;
text = text.replace(/\{<ref# (\d+)\}/>/g, (match, p1) =>
{
if(debug) console.log(match);
Line 76 ⟶ 73:
txtarea.value = text;
return truefalse;
}
});