Diferencia entre revisiones de «Usuario:Lmorillas/vector.js»

De WikiEducator
Saltar a: navegación, buscar
(hide toolbar)
Línea 36: Línea 36:
 
sidebarSwitch.parentNode.removeChild(sidebarSwitch);
 
sidebarSwitch.parentNode.removeChild(sidebarSwitch);
 
}
 
}
sidebarSwitch = addPortletLink("p-cactions", "javascript:sidebarShow()", "Show sidebar", "ca-sidebar", "Show the navigation links", "a");
+
sidebarSwitch = addPortletLink("p-cactions", "javascript:sidebarShow()", "Mostrar barra", "ca-sidebar", "Show the navigation links", "a");
 
}
 
}
  
Línea 48: Línea 48:
 
sidebarSwitch.parentNode.removeChild(sidebarSwitch);
 
sidebarSwitch.parentNode.removeChild(sidebarSwitch);
 
}
 
}
sidebarSwitch = addPortletLink("p-cactions", "javascript:sidebarHide()", "Hide sidebar", "ca-sidebar", "Hide the navigation links", "a");
+
sidebarSwitch = addPortletLink("p-cactions", "javascript:sidebarHide()", "Ocultar barra", "ca-sidebar", "Hide the navigation links", "a");
 
}
 
}
  
Línea 55: Línea 55:
 
addOnloadHook(function() {
 
addOnloadHook(function() {
 
// Change this if you want to show the sidebar by default
 
// Change this if you want to show the sidebar by default
sidebarHide();
+
sidebarShow();
 
});
 
});
 
}
 
}

Revisión de 01:21 27 ene 2015

// Basado en http://wikieducator.org/User:JimTittsler/vector.js
 
importScript('Ususario:Lmorillas/googlesearch.js');
 
// reader mode for narrow screens  --> para el tablet de 7"
// should follow googlesearch.js if used
// window.weReader = true;  // force to always use reader mode, regardless of width
importScript('Usuario:Lmorillas/reader.js');
 
$(function () {
  $('#n-recentchanges').after('<li id="n-newpages"><a href="/Special:NewPages?namespace=all" title="The list of newly created pages">Páginas nuevas</a></li>');
  // gardening tool
  if (wgPageName === 'Especial:PáginasNuevas') {
    $.getScript('/extensions/WE/spam.js');
  }
  if (wgAction === 'history') {
    $.getScript('/extensions/WE/deleterevs.js');
  }
});
 
/* hide-vector-sidebar.js: Adds a button to toggle visibility of the Vector sidebar.
   Written by PleaseStand. Public domain; all copyright claims waived as described
   in http://en.wikipedia.org/wiki/Template:PD-self */
 
/*global document, window, addOnloadHook, addPortletLink, skin*/
 
var sidebarSwitch;
 
function sidebarHide() {
	document.getElementById("mw-panel").style.visibility = "hidden";
	document.getElementById("mw-head-base").style.marginLeft = "0";
	document.getElementById("content").style.marginLeft = "0";
	document.getElementById("left-navigation").style.left = "0";
	document.getElementById("footer").style.marginLeft = "0";
	if(typeof sidebarSwitch == "object") {
		sidebarSwitch.parentNode.removeChild(sidebarSwitch);
	}
	sidebarSwitch = addPortletLink("p-cactions", "javascript:sidebarShow()", "Mostrar barra", "ca-sidebar", "Show the navigation links", "a");
}
 
function sidebarShow() {
	document.getElementById("mw-panel").style.visibility = "";
	document.getElementById("mw-head-base").style.marginLeft = "";
	document.getElementById("content").style.marginLeft = "";
	document.getElementById("left-navigation").style.left = "";
	document.getElementById("footer").style.marginLeft = "";
	if(typeof sidebarSwitch == "object") {
		sidebarSwitch.parentNode.removeChild(sidebarSwitch);
	}
	sidebarSwitch = addPortletLink("p-cactions", "javascript:sidebarHide()", "Ocultar barra", "ca-sidebar", "Hide the navigation links", "a");
}
 
// Only activate on Vector skin
if(skin == "vector") {
	addOnloadHook(function() {
		// Change this if you want to show the sidebar by default
		sidebarShow();
	});
}