Origem: Wikiquote, a coletânea de citações livre.
Nota: Após salvar, você terá de limpar a cache do seu navegador para ver as alterações:
Internet Explorer : Mantenha pressionada a tecla Ctrl e aperte F5 ; ou mantenha pressionada a tecla Ctrl e clique no botão "Recarregar" (Reload)
Firefox e SeaMonkey : Mantenha pressionada a tecla Shift ⇧ e clique no botão "Recarregar" (Reload ou Atualizar) ou mantenha pressionada a tecla Ctrl e aperte F5 ; ou mantenha pressionada as teclas Ctrl , e R (Command ⌘ , Shift ⌥ e R em Macintosh)
Safari e Konqueror : Clique no botão "Recarregar" (Reload)
Opera : É necessário limpar manualmente a cache no menu "Ferramentas"→"Preferências"→"Avançadas"→"Histórico" e clicar no botão "Esvaziar Já"
Chrome : É necessário limpar manualmente a cache no botão "Ferramentas"→"Limpar dados de navegação", selecione "Esvaziar o cache" e clicar no botão "Limpar dados de navegação"
/*** Formulário de carregamento *********************************
* Descrição: Adiciona novos campos ao formulário original e reune
* as informações na predefinição:informação.
* Autor: Danilo.mac
*****************************************************************/
if ( mw . config . get ( 'wgPageName' ) == "Especial:Carregar_imagem" ) {
campo = new Array ();
campo [ 0 ] = new Array (); //1º campo
campo [ 0 ][ 0 ] = "Descrição:" ; //descrição do campo
campo [ 0 ][ 1 ] = "80" ; //largura em carecteres
campo [ 0 ][ 2 ] = "3" ; //linhas
campo [ 0 ][ 3 ] = "" ; //dica de preenchimento
campo [ 1 ] = new Array (); //2º campo
campo [ 1 ][ 0 ] = "Fonte/Autor(es):" ;
campo [ 1 ][ 1 ] = "80" ;
campo [ 1 ][ 2 ] = "2" ;
campo [ 1 ][ 3 ] = "Qual é a fonte deste ficheiro? Quem criou? Se mostra alguma obra artística, quem a criou?" ;
campo [ 2 ] = new Array (); //3º campo
campo [ 2 ][ 0 ] = "Artigo/Anexo:" ;
campo [ 2 ][ 1 ] = "50" ;
campo [ 2 ][ 2 ] = "1" ;
campo [ 2 ][ 3 ] = "Para qual artigo ou anexo da Wikipédia essa imagem é necessária?" ;
campo [ 3 ] = new Array (); //4º campo
campo [ 3 ][ 0 ] = "Integral ou parte:" ;
campo [ 3 ][ 1 ] = "50" ;
campo [ 3 ][ 2 ] = "1" ;
campo [ 3 ][ 3 ] = "Essa é a obra integral citada na fonte ou parte dela?" ;
campo [ 4 ] = new Array (); //5º campo
campo [ 4 ][ 0 ] = "Propósito:" ;
campo [ 4 ][ 1 ] = "60" ;
campo [ 4 ][ 2 ] = "2" ;
campo [ 4 ][ 3 ] = "Qual é a imporância para o artigo/anexo?" ;
campo [ 5 ] = new Array (); //6º campo
campo [ 5 ][ 0 ] = "Insubstituível:" ;
campo [ 5 ][ 1 ] = "60" ;
campo [ 5 ][ 2 ] = "2" ;
campo [ 5 ][ 3 ] = "Por que não existe material semelhante sob licença livre? Você procurou? Onde?" ;
campo [ 6 ] = new Array (); //7º campo
campo [ 6 ][ 0 ] = "Outras informações:" ;
campo [ 6 ][ 1 ] = "60" ;
campo [ 6 ][ 2 ] = "3" ;
campo [ 6 ][ 3 ] = "Se tiver alguma consideração adicional coloque aqui." ;
licenças = new Array (); //Licenças; apenas aparece quando carregado pelo próprio autor e para imagens do Flickr
licenças [ 0 ] = "não=©Todos os direitos reservados" ;
licenças [ 1 ] = "cc-by-nd=Creative Commons Attribution No-Derivs" ;
licenças [ 2 ] = "cc-by-nc=Creative Commons Attribution Non-Commercial" ;
licenças [ 3 ] = "cc-by-nc-sa=Creative Commons Attribution Non-Commercial Share-Alike" ;
licenças [ 4 ] = "cc-by-nc-nd=Creative Commons Attribution Non-Commercial No-Derivs" ;
$ ( function setupForm (){
tabela = document . getElementById ( 'mw-htmlform-description' );
desc = document . getElementById ( 'wpUploadDescription' );
var carregamento = document . getElementById ( 'mw-upload-form' );
desc = desc . parentNode . parentNode ;
desc . parentNode . removeChild ( desc );
var license = document . getElementById ( 'wpLicense' );
license = license . parentNode . parentNode ;
license . parentNode . removeChild ( license );
var tools = document . getElementById ( 'editpage-specialchars' );
tools = tools . parentNode . parentNode . parentNode ;
tools . parentNode . removeChild ( tools );
desc = document . createElement ( 'input' );
desc . setAttribute ( 'name' , 'wpUploadDescription' );
desc . setAttribute ( 'id' , 'wpUploadDescription' );
desc . setAttribute ( 'type' , 'hidden' );
tabela . appendChild ( desc );
carregamento . setAttribute ( 'onSubmit' , 'carregar()' );
var linha = new Array ();
dados = new Array ();
var dica = document . createElement ( 'div' );
dica . style . fontSize = 'smaller' ;
dica . innerHTML = "Nome do arquivo depois do carregamento." ;
dica . style . minHeight = "25px" ;
tabela . rows [ 2 ]. cells [ 1 ]. appendChild ( dica );
for ( i = 0 ; i < campo . length ; i ++ ) {
linha [ i ] = tabela . insertRow ( 3 + i );
dados [ i ] = new Array ();
dados [ i ][ 0 ] = linha [ i ]. insertCell ( 0 );
dados [ i ][ 1 ] = linha [ i ]. insertCell ( 1 );
//LABEL
dados [ i ][ 0 ]. setAttribute ( 'class' , 'mw-label' );
var nlabel = document . createElement ( 'label' );
nlabel . innerHTML = campo [ i ][ 0 ];
dados [ i ][ 0 ]. appendChild ( nlabel );
//INPUT
if ( isNaN ( campo [ i ][ 2 ]) === false ) {
if ( campo [ i ][ 2 ] == "1" || ! campo [ i ][ 2 ]) {
var ninput = document . createElement ( 'input' );
ninput . size = campo [ i ][ 1 ]; }
else {
var ninput = document . createElement ( 'textarea' );
ninput . style . width = "auto" ;
ninput . cols = campo [ i ][ 1 ];
ninput . rows = campo [ i ][ 2 ]; } }
if ( document . URL . search ( /fonte\=prop/ ) != - 1 && campo [ i ][ 0 ]. search ( /autor/i ) != - 1 ) {
ninput . value = "[[Usuário:" + mw . config . get ( 'wgUserName' ) + "|" + mw . config . get ( 'wgUserName' ) + "]]" ; }
dados [ i ][ 1 ]. setAttribute ( 'class' , 'mw-input' );
dados [ i ][ 1 ]. appendChild ( ninput );
dica = document . createElement ( 'div' );
dica . style . fontSize = 'smaller' ;
if ( campo [ i ][ 3 ]) dica . innerHTML = campo [ i ][ 3 ];
dica . style . minHeight = "25px" ;
dados [ i ][ 1 ]. appendChild ( dica ); }
if ( document . URL . search ( /fonte\=prop/ ) != - 1 || document . URL . search ( /fonte\=flickr/ ) != - 1 ) {
linha [ i ] = tabela . insertRow ( 3 + i );
dados [ i ] = new Array ();
dados [ i ][ 0 ] = linha [ i ]. insertCell ( 0 );
dados [ i ][ 1 ] = linha [ i ]. insertCell ( 1 );
dados [ i ][ 0 ]. setAttribute ( 'class' , 'mw-label' );
var nlabel = document . createElement ( 'label' );
campo [ i ] = new Array ( "Licença:" ); //necessário para a função carregar()
nlabel . innerHTML = campo [ i ][ 0 ];
dados [ i ][ 0 ]. appendChild ( nlabel );
var nselect = document . createElement ( 'select' );
for ( l = 0 ; l < licenças . length ; l ++ ) {
brr = licenças [ l ]. search ( "=" );
if ( brr > 0 ) {
var noption = document . createElement ( 'option' );
noption . setAttribute ( 'value' , licenças [ l ]. substr ( 0 , brr ));
noption . innerHTML = licenças [ l ]. substr ( brr + 1 );
nselect . appendChild ( noption ); }
}
dados [ i ][ 1 ]. appendChild ( nselect );
}
})
function carregar () {
info = "\{\{Informação\n" ;
for ( var i = 0 ; i < dados . length ; i ++ ) {
var item = campo [ i ][ 0 ]. substr ( 0 , campo [ i ][ 0 ]. search ( /[/():]/ ));
dado = dados [ i ][ 1 ]. firstChild ;
if ( dado . nodename = 'input' ) dado = dado . value ;
else if ( dado . nodename = 'textarea' ) dado = dado . innerHTML ;
else if ( dado . nodename = 'select' ) dado = dado . options [ dado . selectedIndex ]. value ;
else dado = "" ;
info = info + "| " + item . toLowerCase () + " = " + dado + "\n" ; }
info += "\}\}\n" ;
desc . value = info ;
}
}