Content deleted Content added
mNo edit summary |
mNo edit summary |
||
(10 intermediate revisions by the same user not shown) | |||
Line 5:
if(mw.config.get("wgAction") !== "edit") return;
const debug =
if(debug) console.log("Running");
// Add key handler.
window.addEventListener("keydown", e =>
{
if(e.ctrlKey && e.altKey && e.which == 82)
{
run();
if(debug) console.log("Activate");▼
if(window.rc_refsCrunched)▼
{▼
uncrunchRefs();▼
window.rc_refsCrunched = false;▼
}▼
else▼
{▼
}▼
}
});
function run()
{
}
function crunchRefs()
Line 40 ⟶ 42:
var counter = 0;
text = text.replace(/(<ref.*?\/>)|(<ref.*?>(.|\s)*?<\/ref>)/g,
{
if(debug) console.log(match);
return `
});
txtarea.value = text;
return true;
}
Line 58 ⟶ 62:
var text = txtarea.value;
text = text.replace(/
{
if(debug) console.log(match);
return
});
Line 68 ⟶ 72:
txtarea.value = text;
return false;
}
});
|