]>
git.wh0rd.org - tt-rss.git/blob - functions.js
1 var hotkeys_enabled
= true;
3 function exception_error(location
, e
) {
7 var base_fname
= e
.fileName
.substring(e
.fileName
.lastIndexOf("/") + 1);
9 msg
= "Exception: " + e
.name
+ ", " + e
.message
+
10 "\nFunction: " + location
+ "()" +
11 "\nLocation: " + base_fname
+ ":" + e
.lineNumber
;
13 msg
= "Exception: " + e
+ "\nFunction: " + location
+ "()";
19 function disableHotkeys() {
20 hotkeys_enabled
= false;
23 function enableHotkeys() {
24 hotkeys_enabled
= true;
27 function xmlhttp_ready(obj
) {
28 return obj
.readyState
== 4 || obj
.readyState
== 0 || !obj
.readyState
;
31 function notify_callback() {
32 var container
= document
.getElementById('notify');
33 if (xmlhttp
.readyState
== 4) {
34 container
.innerHTML
=xmlhttp
.responseText
;
38 function rpc_notify_callback() {
39 var container
= document
.getElementById('notify');
40 if (xmlhttp_rpc
.readyState
== 4) {
41 container
.innerHTML
=xmlhttp_rpc
.responseText
;
45 function rpc_pnotify_callback() {
46 var container
= parent
.document
.getElementById('notify');
47 if (xmlhttp_rpc
.readyState
== 4) {
48 container
.innerHTML
=xmlhttp_rpc
.responseText
;
52 function param_escape(arg
) {
53 if (typeof encodeURIComponent
!= 'undefined')
54 return encodeURIComponent(arg
);
59 function param_unescape(arg
) {
60 if (typeof decodeURIComponent
!= 'undefined')
61 return decodeURIComponent(arg
);
68 then
=new Date().getTime();
70 while((now
-then
)<gap
) {
71 now
=new Date().getTime();
75 var notify_hide_timerid
= false;
76 var notify_last_doc
= false;
78 function hide_notify() {
79 if (notify_last_doc
) {
80 var n
= notify_last_doc
.getElementById("notify");
82 if (notify_opacity
>= 0) {
83 notify_opacity
= notify_opacity
- 0.2;
84 n
.style
.opacity
= notify_opacity
;
85 notify_hide_timerid
= window
.setTimeout(hide_notify
, 20);
87 n
.style
.display
= "none";
91 n
.style
.display
= "none";
96 function notify_real(msg
, doc
, no_hide
, is_err
) {
98 var n
= doc
.getElementById("notify");
99 var nb
= doc
.getElementById("notify_body");
101 if (!n
|| !nb
) return;
104 n
.style
.display
= "none";
106 n
.style
.display
= "block";
110 n
.style
.backgroundColor
= "#ffaaaa";
111 n
.style
.color
= "white";
112 n
.style
.borderColor
= "#ff0000";
114 n
.style
.backgroundColor
= "#fff7d5";
115 n
.style
.borderColor
= "#d7c47a";
116 n
.style
.color
= "black";
121 if (notify_hide_timerid
) {
122 window
.clearTimeout(notify_hide_timerid
);
125 notify_last_doc
= doc
;
129 notify_hide_timerid
= window
.setTimeout(hide_notify
, 3000);
133 function p_notify(msg
, no_hide
, is_err
) {
134 notify_real(msg
, parent
.document
, no_hide
, is_err
);
137 function notify(msg
, no_hide
, is_err
) {
138 notify_real(msg
, document
, no_hide
, is_err
);
141 function printLockingError() {
142 notify("Please wait until operation finishes");}
146 function hotkey_handler(e
) {
150 if (!hotkeys_enabled
) return;
153 keycode
= window
.event
.keyCode
;
158 if (keycode
== 13 || keycode
== 27) {
161 seq
= seq
+ "" + keycode
;
164 if (document
.getElementById("piggie")) {
166 if (seq
.match("807371717369")) {
168 localPiggieFunction(true);
170 localPiggieFunction(false);
174 if (typeof localHotkeyHandler
!= 'undefined') {
176 localHotkeyHandler(keycode
);
178 exception_error("hotkey_handler", e
);
184 function cleanSelectedList(element
) {
185 var content
= document
.getElementById(element
);
187 if (!document
.getElementById("feedCatHolder")) {
188 for (i
= 0; i
< content
.childNodes
.length
; i
++) {
189 var child
= content
.childNodes
[i
];
191 child
.className
= child
.className
.replace("Selected", "");
197 for (i
= 0; i
< content
.childNodes
.length
; i
++) {
198 var child
= content
.childNodes
[i
];
199 if (child
.id
== "feedCatHolder") {
200 parent
.debug(child
.id
);
201 var fcat
= child
.lastChild
;
202 for (j
= 0; j
< fcat
.childNodes
.length
; j
++) {
203 var feed
= fcat
.childNodes
[j
];
204 feed
.className
= feed
.className
.replace("Selected", "");
212 function cleanSelected(element
) {
213 var content
= document
.getElementById(element
);
215 for (i
= 0; i
< content
.rows
.length
; i
++) {
216 content
.rows
[i
].className
= content
.rows
[i
].className
.replace("Selected", "");
220 function getVisibleUnreadHeadlines() {
221 var content
= document
.getElementById("headlinesList");
223 var rows
= new Array();
225 for (i
= 0; i
< content
.rows
.length
; i
++) {
226 var row_id
= content
.rows
[i
].id
.replace("RROW-", "");
227 if (row_id
.length
> 0 && content
.rows
[i
].className
.match("Unread")) {
234 function getVisibleHeadlineIds() {
236 var content
= document
.getElementById("headlinesList");
238 var rows
= new Array();
240 for (i
= 0; i
< content
.rows
.length
; i
++) {
241 var row_id
= content
.rows
[i
].id
.replace("RROW-", "");
242 if (row_id
.length
> 0) {
249 function getFirstVisibleHeadlineId() {
250 var rows
= getVisibleHeadlineIds();
254 function getLastVisibleHeadlineId() {
255 var rows
= getVisibleHeadlineIds();
256 return rows
[rows
.length
-1];
259 function markHeadline(id
) {
260 var row
= document
.getElementById("RROW-" + id
);
262 var is_active
= false;
264 if (row
.className
.match("Active")) {
267 row
.className
= row
.className
.replace("Selected", "");
268 row
.className
= row
.className
.replace("Active", "");
269 row
.className
= row
.className
.replace("Insensitive", "");
272 row
.className
= row
.className
= "Active";
275 var check
= document
.getElementById("RCHK-" + id
);
278 check
.checked
= true;
281 row
.className
= row
.className
+ "Selected";
286 function getFeedIds() {
287 var content
= document
.getElementById("feedsList");
289 var rows
= new Array();
291 for (i
= 0; i
< content
.rows
.length
; i
++) {
292 var id
= content
.rows
[i
].id
.replace("FEEDR-", "");
301 function setCookie(name
, value
, lifetime
, path
, domain
, secure
) {
307 d
.setTime(lifetime
* 1000);
310 int_setCookie(name
, value
, d
, path
, domain
, secure
);
314 function int_setCookie(name
, value
, expires
, path
, domain
, secure
) {
315 document
.cookie
= name
+ "=" + escape(value
) +
316 ((expires
) ? "; expires=" + expires
.toGMTString() : "") +
317 ((path
) ? "; path=" + path
: "") +
318 ((domain
) ? "; domain=" + domain
: "") +
319 ((secure
) ? "; secure" : "");
322 function delCookie(name
, path
, domain
) {
323 if (getCookie(name
)) {
324 document
.cookie
= name
+ "=" +
325 ((path
) ? ";path=" + path
: "") +
326 ((domain
) ? ";domain=" + domain
: "" ) +
327 ";expires=Thu, 01-Jan-1970 00:00:01 GMT";
332 function getCookie(name
) {
334 var dc
= document
.cookie
;
335 var prefix
= name
+ "=";
336 var begin
= dc
.indexOf("; " + prefix
);
338 begin
= dc
.indexOf(prefix
);
339 if (begin
!= 0) return null;
344 var end
= document
.cookie
.indexOf(";", begin
);
348 return unescape(dc
.substring(begin
+ prefix
.length
, end
));
351 function disableContainerChildren(id
, disable
, doc
) {
353 if (!doc
) doc
= document
;
355 var container
= doc
.getElementById(id
);
357 for (var i
= 0; i
< container
.childNodes
.length
; i
++) {
358 var child
= container
.childNodes
[i
];
361 child
.disabled
= disable
;
367 if (child
.className
&& child
.className
.match("button")) {
368 child
.className
= "disabledButton";
371 if (child
.className
&& child
.className
.match("disabledButton")) {
372 child
.className
= "button";
379 function gotoPreferences() {
380 document
.location
.href
= "prefs.php";
383 function gotoMain() {
384 document
.location
.href
= "tt-rss.php";
387 function gotoExportOpml() {
388 document
.location
.href
= "opml.php?op=Export";
391 function getActiveFeedId() {
392 return getCookie("ttrss_vf_actfeed");
395 function setActiveFeedId(id
) {
396 return setCookie("ttrss_vf_actfeed", id
);
399 var xmlhttp_rpc
= false;
402 /*@if (@_jscript_version >= 5)
403 // JScript gives us Conditional compilation, we can cope with old IE versions.
404 // and security blocked creation of the objects.
406 xmlhttp_rpc = new ActiveXObject("Msxml2.XMLHTTP");
409 xmlhttp_rpc = new ActiveXObject("Microsoft.XMLHTTP");
416 if (!xmlhttp_rpc
&& typeof XMLHttpRequest
!='undefined') {
417 xmlhttp_rpc
= new XMLHttpRequest();
420 function parse_counters(reply
, f_document
, title_obj
, scheduled_call
) {
422 for (var l
= 0; l
< reply
.childNodes
.length
; l
++) {
423 if (!reply
.childNodes
[l
] ||
424 typeof(reply
.childNodes
[l
].getAttribute
) == "undefined") {
425 // where did this come from?
429 var id
= reply
.childNodes
[l
].getAttribute("id");
430 var t
= reply
.childNodes
[l
].getAttribute("type");
431 var ctr
= reply
.childNodes
[l
].getAttribute("counter");
432 var error
= reply
.childNodes
[l
].getAttribute("error");
433 var has_img
= reply
.childNodes
[l
].getAttribute("hi");
434 var updated
= reply
.childNodes
[l
].getAttribute("updated");
436 if (id
== "global-unread") {
437 title_obj
.global_unread
= ctr
;
438 title_obj
.updateTitle();
442 if (t
== "category") {
443 var catctr
= f_document
.getElementById("FCATCTR-" + id
);
445 catctr
.innerHTML
= "(" + ctr
+ " unread)";
450 var feedctr
= f_document
.getElementById("FEEDCTR-" + id
);
451 var feedu
= f_document
.getElementById("FEEDU-" + id
);
452 var feedr
= f_document
.getElementById("FEEDR-" + id
);
453 var feed_img
= f_document
.getElementById("FIMG-" + id
);
454 var feedlink
= f_document
.getElementById("FEEDL-" + id
);
456 if (updated
&& feedlink
) {
458 feedlink
.title
= "Error: " + error
+ " (" + updated
+ ")";
460 feedlink
.title
= "Updated: " + updated
;
464 if (feedctr
&& feedu
&& feedr
) {
466 if (feedu
.innerHTML
!= ctr
&& id
== getActiveFeedId() && scheduled_call
) {
467 var hf
= title_obj
.parent
.frames
["headlines-frame"];
468 hf
.location
.reload(true);
471 feedu
.innerHTML
= ctr
;
474 feedr
.className
= feedr
.className
.replace("feed", "error");
476 feedr
.className
= feedr
.className
.replace("error", "feed");
480 feedctr
.className
= "odd";
481 if (!feedr
.className
.match("Unread")) {
482 var is_selected
= feedr
.className
.match("Selected");
484 feedr
.className
= feedr
.className
.replace("Selected", "");
485 feedr
.className
= feedr
.className
.replace("Unread", "");
487 feedr
.className
= feedr
.className
+ "Unread";
490 feedr
.className
= feedr
.className
+ "Selected";
495 feedctr
.className
= "invisible";
496 feedr
.className
= feedr
.className
.replace("Unread", "");
501 exception_error("parse_counters", e
);
505 // this one is called from feedlist context
506 // thus title_obj passed to parse_counters is parent (e.g. main ttrss window)
508 function all_counters_callback() {
509 if (xmlhttp_rpc
.readyState
== 4) {
511 if (!xmlhttp_rpc
.responseXML
|| !xmlhttp_rpc
.responseXML
.firstChild
) {
512 notify("[all_counters_callback] backend did not return valid XML");
516 if (!parent
.frames
["feeds-frame"]) {
517 notify("[all_counters_callback] no parent feeds-frame");
521 var reply
= xmlhttp_rpc
.responseXML
.firstChild
;
522 var f_document
= parent
.frames
["feeds-frame"].document
;
524 parse_counters(reply
, f_document
, parent
);
527 exception_error("all_counters_callback", e
);
532 function update_all_counters(feed
) {
533 if (xmlhttp_ready(xmlhttp_rpc
)) {
534 var query
= "backend.php?op=rpc&subop=getAllCounters";
537 query
= query
+ "&aid=" + feed
;
540 xmlhttp_rpc
.open("GET", query
, true);
541 xmlhttp_rpc
.onreadystatechange
=all_counters_callback
;
542 xmlhttp_rpc
.send(null);
546 function popupHelp(tid
) {
547 var w
= window
.open("backend.php?op=help&tid=" + tid
,
549 "menubar=no,location=no,resizable=yes,scrollbars=yes,status=no");
552 /** * @(#)isNumeric.js * * Copyright (c) 2000 by Sundar Dorai-Raj
553 * * @author Sundar Dorai-Raj
554 * * Email: sdoraira@vt.edu
555 * * This program is free software; you can redistribute it and/or
556 * * modify it under the terms of the GNU General Public License
557 * * as published by the Free Software Foundation; either version 2
558 * * of the License, or (at your option) any later version,
559 * * provided that any use properly credits the author.
560 * * This program is distributed in the hope that it will be useful,
561 * * but WITHOUT ANY WARRANTY; without even the implied warranty of
562 * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
563 * * GNU General Public License for more details at http://www.gnu.org * * */
565 var numbers
=".0123456789";
566 function isNumeric(x
) {
567 // is x a String or a character?
569 // remove negative sign
571 for(j
=0;j
<x
.length
;j
++) {
572 // call isNumeric recursively for each character
573 number
=isNumeric(x
.substring(j
,j
+1));
574 if(!number
) return number
;
579 // if x is number return true
580 if(numbers
.indexOf(x
)>=0) return true;
586 function hideOrShowFeeds(doc
, hide
) {
588 if (!doc
.styleSheets
) return;
590 var css_rules
= doc
.styleSheets
[0].cssRules
;
592 if (!css_rules
|| !css_rules
.length
) return;
594 for (i
= 0; i
< css_rules
.length
; i
++) {
595 var rule
= css_rules
[i
];
597 if (rule
.selectorText
== "ul.feedList li.feed") {
599 rule
.style
.display
= "block";
601 rule
.style
.display
= "none";
609 function selectTableRow(r
, do_select
) {
610 r
.className
= r
.className
.replace("Selected", "");
613 r
.className
= r
.className
+ "Selected";
617 function selectTableRowById(elem_id
, check_id
, do_select
) {
621 var row
= document
.getElementById(elem_id
);
624 selectTableRow(row
, do_select
);
627 var check
= document
.getElementById(check_id
);
630 check
.checked
= do_select
;
633 exception_error("selectTableRowById", e
);
637 function selectTableRowsByIdPrefix(content_id
, prefix
, check_prefix
, do_select
,
638 classcheck
, reset_others
) {
640 var content
= document
.getElementById(content_id
);
643 alert("[selectTableRows] Element " + content_id
+ " not found.");
647 for (i
= 0; i
< content
.rows
.length
; i
++) {
648 if (!classcheck
|| content
.rows
[i
].className
.match(classcheck
)) {
650 if (content
.rows
[i
].id
.match(prefix
)) {
651 selectTableRow(content
.rows
[i
], do_select
);
653 var row_id
= content
.rows
[i
].id
.replace(prefix
, "");
654 var check
= document
.getElementById(check_prefix
+ row_id
);
657 check
.checked
= do_select
;
659 } else if (reset_others
) {
660 selectTableRow(content
.rows
[i
], false);
662 var row_id
= content
.rows
[i
].id
.replace(prefix
, "");
663 var check
= document
.getElementById(check_prefix
+ row_id
);
666 check
.checked
= false;
670 } else if (reset_others
) {
671 selectTableRow(content
.rows
[i
], false);
673 var row_id
= content
.rows
[i
].id
.replace(prefix
, "");
674 var check
= document
.getElementById(check_prefix
+ row_id
);
677 check
.checked
= false;
684 function getSelectedTableRowIds(content_id
, prefix
) {
686 var content
= document
.getElementById(content_id
);
689 alert("[getSelectedTableRowIds] Element " + content_id
+ " not found.");
693 var sel_rows
= new Array();
695 for (i
= 0; i
< content
.rows
.length
; i
++) {
696 if (content
.rows
[i
].id
.match(prefix
) &&
697 content
.rows
[i
].className
.match("Selected")) {
699 var row_id
= content
.rows
[i
].id
.replace(prefix
+ "-", "");
700 sel_rows
.push(row_id
);
708 function toggleSelectRowById(sender
, id
) {
709 var row
= document
.getElementById(id
);
711 if (sender
.checked
) {
712 if (!row
.className
.match("Selected")) {
713 row
.className
= row
.className
+ "Selected";
716 if (row
.className
.match("Selected")) {
717 row
.className
= row
.className
.replace("Selected", "");
722 function toggleSelectListRow(sender
) {
723 var parent_row
= sender
.parentNode
;
725 if (sender
.checked
) {
726 if (!parent_row
.className
.match("Selected")) {
727 parent_row
.className
= parent_row
.className
+ "Selected";
730 if (parent_row
.className
.match("Selected")) {
731 parent_row
.className
= parent_row
.className
.replace("Selected", "");
737 function toggleSelectRow(sender
) {
738 var parent_row
= sender
.parentNode
.parentNode
;
740 if (sender
.checked
) {
741 if (!parent_row
.className
.match("Selected")) {
742 parent_row
.className
= parent_row
.className
+ "Selected";
745 if (parent_row
.className
.match("Selected")) {
746 parent_row
.className
= parent_row
.className
.replace("Selected", "");
751 function openExternalUrl(url
) {
752 var w
= window
.open(url
);
755 function getRelativeFeedId(list
, id
, direction
, unread_only
) {
757 if (direction
== "next") {
758 for (i
= 0; i
< list
.childNodes
.length
; i
++) {
759 var child
= list
.childNodes
[i
];
760 if (child
.id
&& child
.id
== "feedCatHolder") {
761 if (child
.lastChild
) {
762 var cr
= getRelativeFeedId(child
.firstChild
, id
, direction
);
765 } else if (child
.id
&& child
.id
.match("FEEDR-")) {
766 return child
.id
.replace('FEEDR-', '');
771 // FIXME select last feed doesn't work when only unread feeds are visible
773 if (direction
== "prev") {
774 for (i
= list
.childNodes
.length
-1; i
>= 0; i
--) {
775 var child
= list
.childNodes
[i
];
776 if (child
.id
== "feedCatHolder") {
777 if (child
.firstChild
) {
778 var cr
= getRelativeFeedId(child
.firstChild
, id
, direction
);
781 } else if (child
.id
.match("FEEDR-")) {
783 if (getCookie("ttrss_vf_hreadf") == 1) {
784 if (child
.className
!= "feed") {
785 alert(child
.className
);
786 return child
.id
.replace('FEEDR-', '');
789 return child
.id
.replace('FEEDR-', '');
796 var feed
= list
.ownerDocument
.getElementById("FEEDR-" + getActiveFeedId());
798 if (getCookie("ttrss_vf_hreadf") == 1) {
802 if (direction
== "next") {
812 } else if (e
.parentNode
.parentNode
.nextSibling
) {
814 var this_cat
= e
.parentNode
.parentNode
;
818 if (this_cat
&& this_cat
.nextSibling
) {
819 while (!e
&& this_cat
.nextSibling
) {
820 this_cat
= this_cat
.nextSibling
;
821 if (this_cat
.id
== "feedCatHolder") {
822 e
= this_cat
.firstChild
.firstChild
;
832 if (!unread_only
|| (unread_only
&& e
.className
!= "feed" &&
833 e
.className
!= "error")) {
834 return e
.id
.replace("FEEDR-", "");
839 } else if (direction
== "prev") {
845 if (e
.previousSibling
) {
847 e
= e
.previousSibling
;
849 } else if (e
.parentNode
.parentNode
.previousSibling
) {
851 var this_cat
= e
.parentNode
.parentNode
;
855 if (this_cat
&& this_cat
.previousSibling
) {
856 while (!e
&& this_cat
.previousSibling
) {
857 this_cat
= this_cat
.previousSibling
;
858 if (this_cat
.id
== "feedCatHolder") {
859 e
= this_cat
.firstChild
.lastChild
;
869 if (!unread_only
|| (unread_only
&& e
.className
!= "feed" &&
870 e
.className
!= "error")) {
871 return e
.id
.replace("FEEDR-", "");
879 function showBlockElement(id
) {
880 var elem
= document
.getElementById(id
);
883 elem
.style
.display
= "block";
885 alert("[showBlockElement] can't find element with id " + id
);
889 function hideParentElement(e
) {
890 e
.parentNode
.style
.display
= "none";
893 function dropboxSelect(e
, v
) {
894 for (i
= 0; i
< e
.length
; i
++) {
895 if (e
[i
].value
== v
) {
902 // originally stolen from http://www.11tmr.com/11tmr.nsf/d6plinks/MWHE-695L9Z
903 // bugfixed just a little bit :-)
904 function getURLParam(strParamName
){
906 var strHref
= window
.location
.href
;
908 if (strHref
.indexOf("#") == strHref
.length
-1) {
909 strHref
= strHref
.substring(0, strHref
.length
-1);
912 if ( strHref
.indexOf("?") > -1 ){
913 var strQueryString
= strHref
.substr(strHref
.indexOf("?"));
914 var aQueryString
= strQueryString
.split("&");
915 for ( var iParam
= 0; iParam
< aQueryString
.length
; iParam
++ ){
916 if (aQueryString
[iParam
].indexOf(strParamName
+ "=") > -1 ){
917 var aParam
= aQueryString
[iParam
].split("=");
918 strReturn
= aParam
[1];
926 function leading_zero(p
) {
928 if (s
.length
== 1) s
= "0" + s
;
932 function center_element(e
) {
935 var c_width
= document
.body
.clientWidth
;
936 var c_height
= document
.body
.clientHeight
;
938 var c_scroll
= document
.body
.scrollTop
;
940 var e_width
= e
.clientWidth
;
941 var e_height
= e
.clientHeight
;
943 var set_y
= (c_height
/ 2) + c_scroll
- (e_height
/ 2);
944 var set_x
= (c_width
/ 2) - (e_width
/ 2);
946 e
.style
.top
= set_y
+ "px";
947 e
.style
.left
= set_x
+ "px";
949 exception_error("center_element", e
);
953 function closeInfoBox() {
954 var box
= document
.getElementById('infoBox');
955 var shadow
= document
.getElementById('infoBoxShadow');
958 shadow
.style
.display
= "none";
960 box
.style
.display
= "none";
967 function displayDlg(id
, param
) {
969 if (!xmlhttp_ready(xmlhttp
)) {
976 xmlhttp
.open("GET", "backend.php?op=dlg&id=" +
977 param_escape(id
) + "¶m=" + param_escape(param
), true);
978 xmlhttp
.onreadystatechange
=infobox_callback
;
985 function infobox_submit_callback() {
986 if (xmlhttp
.readyState
== 4) {
987 notify(xmlhttp
.responseText
);
990 // called from prefs, reload tab
992 selectTab(active_tab
, false);
997 function infobox_callback() {
998 if (xmlhttp
.readyState
== 4) {
999 var box
= document
.getElementById('infoBox');
1000 var shadow
= document
.getElementById('infoBoxShadow');
1002 box
.innerHTML
=xmlhttp
.responseText
;
1004 shadow
.style
.display
= "block";
1006 box
.style
.display
= "block";
1012 function qaddFilter() {
1014 if (!xmlhttp_ready(xmlhttp
)) {
1015 printLockingError();
1019 var regexp
= document
.getElementById("fadd_regexp");
1020 var match
= document
.getElementById("fadd_match");
1021 var feed
= document
.getElementById("fadd_feed");
1022 var action
= document
.getElementById("fadd_action");
1024 if (regexp
.value
.length
== 0) {
1025 alert("Missing filter expression.");
1027 notify("Adding filter...");
1029 var v_match
= match
[match
.selectedIndex
].text
;
1030 var feed_id
= feed
[feed
.selectedIndex
].id
;
1031 var action_id
= action
[action
.selectedIndex
].id
;
1033 xmlhttp
.open("GET", "backend.php?op=pref-filters&quiet=1&subop=add®exp=" +
1034 param_escape(regexp
.value
) + "&match=" + v_match
+
1035 "&fid=" + param_escape(feed_id
) + "&aid=" + param_escape(action_id
), true);
1037 xmlhttp
.onreadystatechange
=infobox_submit_callback
;
1045 function toggleSubmitNotEmpty(e
, submit_id
) {
1047 document
.getElementById(submit_id
).disabled
= (e
.value
== "")
1049 exception_error("toggleSubmitNotEmpty", e
);