Diferencia entre revisiones de «MediaWiki:Common.js»
De EIFA - Estudios Interdisciplinares de las Fuentes Avilistas
				
				
				
				
				
				|  |  | 
| Línea 1: | Línea 1: | 
|  | /* Cualquier código JavaScript escrito aquí se cargará para todos los usuarios en cada carga de página */ |  | /* Cualquier código JavaScript escrito aquí se cargará para todos los usuarios en cada carga de página */ | 
|  | 
 |  | 
 | 
|  | /* PERSONALIZAR EL EDITOR */
 |  | (function () { | 
|  | 
 |  | 
 | 
|  | // INICIO PRUEBAS
 |  |   var myElement = document.getElementById('mw-hello-world'); | 
|  | function openWindow() {
 |  |   myElement.innerHTML = '<html>Hello World!!!</html>'; | 
|  |     vari, l, options =[{
 |  | 
|  |        value: 'first',
 |  | 
|  |        text: 'First'
 |  | 
|  |     }, {
 |  | 
|  |        value: 'second',
 |  | 
|  |        text: 'Second'
 |  | 
|  |     }],
 |  | 
|  |     newWindow = window.open("", null, "height=200,width=400,status=yes,toolbar=no,menubar=no,location=no");  
 |  | 
|  |   
 |  | 
|  |     newWindow.document.write("<select onchange='window.opener.setValue(this.value);'>");
 |  | 
|  |     for(i=0,l=options.length; i<l; i++) {
 |  | 
|  |         newWindow.document.write("<option value='"+options[i].value+"'>");  
 |  | 
|  |         newWindow.document.write(options[i].text);  
 |  | 
|  |         newWindow.document.write("</option>");
 |  | 
|  |     }
 |  | 
|  |     newWindow.document.write("</select>");
 |  | 
|  | }
 |  | 
|  | 
 |  | 
 | 
|  | function setValue(value){
 |  | }()); | 
|  |     document.getElementById('value').value = value;
 |  | 
|  | }
 |  | 
		Revisión del 12:06 13 ene 2022
/* Cualquier código JavaScript escrito aquí se cargará para todos los usuarios en cada carga de página */
(function () {
  var myElement = document.getElementById('mw-hello-world');
  myElement.innerHTML = '<html>Hello World!!!</html>';
}());