}
- if (!hotkeys_enabled) return;
+ if (!hotkeys_enabled) {
+ debug("hotkeys disabled");
+ return;
+ }
if (window.event) {
keycode = window.event.keyCode;
}
}
+ if (keycode == 67 && shift_key) { // c
+ if (typeof collapse_feedlist != 'undefined') {
+ return collapse_feedlist();
+ }
+ }
+
if (typeof localHotkeyHandler != 'undefined') {
try {
return localHotkeyHandler(e);
}
}
+function get_feed_unread(id) {
+ try {
+ return parseInt(document.getElementById("FEEDU-" + id).innerHTML);
+ } catch (e) {
+ exception_error("get_feed_unread", e, true);
+ return -1;
+ }
+}
+
function get_feed_entry_unread(doc, elem) {
var id = elem.id.replace("FEEDR-", "");
return;
}
- debug("cat: " + node.id);
+// debug("cat: " + node.id);
if (node.hasChildNodes() && node.firstChild.nextSibling != false) {
for (i = 0; i < node.childNodes.length; i++) {
var has_unread = (node.childNodes[i].className != "feed" &&
node.childNodes[i].className != "label" &&
- node.childNodes[i].className != "virt" &&
+ !(!getInitParam("hide_read_shows_special") &&
+ node.childNodes[i].className == "virt") &&
node.childNodes[i].className != "error" &&
node.childNodes[i].className != "tag");
}
}
- debug("end cat: " + node.id + " unread " + cat_unread);
+// debug("end cat: " + node.id + " unread " + cat_unread);
if (cat_unread == 0) {
if (cat_node.style == undefined) {
return ids;
}
+function displayHelpInfobox(topic_id) {
+
+ var url = "backend.php?op=help&tid=" + param_escape(topic_id);
+
+ var w = window.open(url, "ttrss_help",
+ "status=0,toolbar=0,location=0,width=450,height=500,scrollbars=1,menubar=0");
+
+ return false;
+}
+
+// http://www.dynamic-tools.net/toolbox/copyToClipboard/
+
+/*
+function copyToClipboard(s)
+{
+ if( window.clipboardData && clipboardData.setData )
+ {
+ clipboardData.setData("Text", s);
+ }
+ else
+ {
+ // You have to sign the code to enable this or allow the action in about:config by changing
+ user_pref("signed.applets.codebase_principal_support", true);
+ netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
+
+ var clip Components.classes['@mozilla.org/widget/clipboard;[[[[1]]]]'].createInstance(Components.interfaces.nsIClipboard);
+ if (!clip) return;
+
+ // create a transferable
+ var trans = Components.classes['@mozilla.org/widget/transferable;[[[[1]]]]'].createInstance(Components.interfaces.nsITransferable);
+ if (!trans) return;
+
+ // specify the data we wish to handle. Plaintext in this case.
+ trans.addDataFlavor('text/unicode');
+ // To get the data from the transferable we need two new objects
+ var str = new Object();
+ var len = new Object();
+
+ var str = Components.classes["@mozilla.org/supports-string;[[[[1]]]]"].createInstance(Components.interfaces.nsISupportsString);
+
+ var copytext=meintext;
+
+ str.data=copytext;
+
+ trans.setTransferData("text/unicode",str,copytext.length*[[[[2]]]]);
+
+ var clipid=Components.interfaces.nsIClipboard;
+
+ if (!clip) return false;
+
+ clip.setData(trans,null,clipid.kGlobalClipboard);
+ }
+} */