Burocratas, emailconfirmed, Administradores da interface, Administradores (Semantic MediaWiki), Curadores (Semantic MediaWiki), Editores (Semantic MediaWiki), Supressores, Administradores
1 023
edições
Sem resumo de edição |
Sem resumo de edição |
||
function rmCarriageReturn() {
const
const element =
element.value = element.value.replace(' ', '');
});
function rmHtmlTags() {
const
const element =
element.value = element.value.replace(/<(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>/g, '');
});
}
function
const
elem.querySelectorAll('.input.oo-ui-inputWidget-input').forEach((input) => {
element.value = '';
});
elem.querySelectorAll('textarea').forEach((input) => {
const element = input;
element.value = '';
function normalizeInput() {
const
instanceMain.querySelectorAll('.oo-ui-inputWidget-input').forEach((input) => {
▲ const normalizedInput = input;
normalizedInput.value = normalizedInput.value
// replace "|" by "%7C" (Ex.: http://viaf.org/processed/WKP|Q2484404)▼
//
.replace('|', '%7C');
});
instanceMain.querySelectorAll('textarea').forEach((textarea) => {
const normalizedInput = textarea;
textarea.value = normalizedInput.value
// "$a Bar \n$b Baz" > " $a Bar $b Baz"
.replace(/\s*(\$[a-z0-8])\s*/g, ' $1 ')
// "$a Bar\nFoo" > "$a Bar Foo" ou "$a Bar Foo" > "$a Bar Foo"
.replace(/\n|\s\s+|\t/g, ' ')
.replace('|', '%7C');
});
});
}
saveBtn.addEventListener('click', () => {
observer.disconnect();
rmCarriageReturn();
rmHtmlTags();
|