total pigcall (closes #42)

master
Andrew Dolgov 19 years ago
parent 6c7abfae07
commit 1cac3c31bc

@ -129,15 +129,11 @@ function hotkey_handler(e) {
seq = seq + "" + keycode; seq = seq + "" + keycode;
} }
var piggie = document.getElementById("piggie"); if (seq.match("807371717369")) {
seq = "";
if (piggie) { localPiggieFunction(true);
} else {
if (seq.match("807371717369")) { localPiggieFunction(false);
localPiggieFunction(true);
} else {
localPiggieFunction(false);
}
} }
if (typeof localHotkeyHandler != 'undefined') { if (typeof localHotkeyHandler != 'undefined') {

@ -8,6 +8,9 @@ var active_user = false;
var active_tab = false; var active_tab = false;
var feed_to_expand = false; var feed_to_expand = false;
var piggie_top = -400;
var piggie_fwd = true;
/*@cc_on @*/ /*@cc_on @*/
/*@if (@_jscript_version >= 5) /*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions. // JScript gives us Conditional compilation, we can cope with old IE versions.
@ -1141,14 +1144,31 @@ function editSelectedFeedCat() {
} }
function piggie_callback() {
var piggie = document.getElementById("piggie");
piggie.style.top = piggie_top;
if (piggie_fwd && piggie_top < 0) {
setTimeout("piggie_callback()", 50);
piggie_top = piggie_top + 10;
} else if (piggie_fwd && piggie_top >= 0) {
piggie_fwd = false;
setTimeout("piggie_callback()", 50);
} else if (!piggie_fwd && piggie_top > -400) {
setTimeout("piggie_callback()", 50);
piggie_top = piggie_top - 10;
} else if (!piggie_fwd && piggie_top <= -400) {
piggie.style.display = "none";
piggie_fwd = true;
}
}
function localPiggieFunction(enable) { function localPiggieFunction(enable) {
if (enable) { if (enable) {
var piggie = document.getElementById("piggie");
piggie.style.display = "block"; piggie.style.display = "block";
seq = ""; piggie_callback();
notify("I loveded it!!!");
} else {
piggie.style.display = "none";
notify("");
} }
} }

@ -49,6 +49,8 @@
<body> <body>
<div id="piggie" class="invisible">&nbsp;</div>
<script type="text/javascript"> <script type="text/javascript">
if (document.addEventListener) { if (document.addEventListener) {
document.addEventListener("DOMContentLoaded", init, null); document.addEventListener("DOMContentLoaded", init, null);

@ -303,7 +303,8 @@ a:hover {
#piggie { #piggie {
width : 400; width : 400;
height : 400; height : 400;
left : 50; right : 0;
top : -400;
background-color : white; background-color : white;
display : none; display : none;
z-index : 3; z-index : 3;

Loading…
Cancel
Save