User:Semantic tang/cologneblue.js

var k_pressed_time = -1; var menu = false; var p_personal = document.getElementById("p-personal");

function show { p_personal.style.opacity = 1; menu = true; }

function hide { p_personal.style.opacity = 0; menu = false; }

document.addEventListener('keydown', function(e) {	if (e.keyCode === 75) {		d = new Date;		if (k_pressed_time == -1 || d.getTime - k_pressed_time >= 1000) {			k_pressed_time = d.getTime;		} else {			if (!menu) {				show;			} else {				hide;			}			k_pressed_time = -1;		} 	} });

/*var mw_head_base = document.getElementById("mw-head-base"); var att_onmouseover = document.createAttribute("onmouseover"); att_onmouseover.value = "show"; mw_head_base.setAttributeNode(att_onmouseover);*/