function printLockingError() {
notify("Please wait until operation finishes");}
-var seq = "";
-
function hotkey_handler(e) {
try {
} else {
seq = seq + "" + keycode;
}
-
+
var m_ctx = getMainContext();
var f_ctx = getFeedsContext();
var h_ctx = getHeadlinesContext();
-
+
if (keycode == 82) { // r
return m_ctx.scheduleFeedUpdate(true);
}
if (keycode == 80 || keycode == 38) { // p, up
return h_ctx.moveToPost('prev');
- }
-
- if (document.getElementById("piggie")) {
-
- if (seq.match("807371717369")) {
- seq = "";
- localPiggieFunction(true);
- } else {
- localPiggieFunction(false);
- }
}
if (typeof localHotkeyHandler != 'undefined') {
function localPiggieFunction(enable) {
if (enable) {
+ debug("I LOVEDED IT!");
var piggie = document.getElementById("piggie");
piggie.style.display = "block";
active_tab = getInitParam("prefs_active_tab");
if (!active_tab) active_tab = "genConfig";
+ document.onkeydown = pref_hotkey_handler;
+
if (navigator.userAgent.match("Opera")) {
setTimeout("selectTab()", 500);
} else {
toggleSelectListRow(sender);
disableContainerChildren("fbrOpToolbar", getSelectedFeedsFromBrowser() == 0);
}
+
+var seq = "";
+
+function pref_hotkey_handler(e) {
+ try {
+
+ var keycode;
+
+ if (!hotkeys_enabled) return;
+
+ if (window.event) {
+ keycode = window.event.keyCode;
+ } else if (e) {
+ keycode = e.which;
+ }
+
+ if (keycode == 13 || keycode == 27) {
+ seq = "";
+ } else {
+ seq = seq + "" + keycode;
+ }
+
+
+ if (document.getElementById("piggie")) {
+
+ if (seq.match("807371717369")) {
+ seq = "";
+ localPiggieFunction(true);
+ } else {
+ localPiggieFunction(false);
+ }
+ }
+
+ } catch (e) {
+ exception_error("pref_hotkey_handler", e);
+ }
+}
+
+
<body>
-<div id="piggie" class="invisible"> </div>
+<div id="piggie"> </div>
<iframe id="backReqBox"></iframe>
right : 0;
top : -400;
background-color : white;
- display : none;
- z-index : 3;
- background-image : url("http://madoka.spb.ru/stuff/fox/piggie.png");
+ display : block;
+ z-index : 999;
+ background-image : url("images/piggie.png");
background-position : center center;
background-repeat : no-repeat;
position : absolute;