summaryrefslogtreecommitdiff
path: root/prefs.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-12-18 06:56:55 +0100
committerAndrew Dolgov <[email protected]>2006-12-18 06:56:55 +0100
commite513a74a6b37a3a406686e0f3cbe9011265d1453 (patch)
tree3d4e0c3bc32650ef0518408aa727611aace4bd2c /prefs.js
parentd507dfd50d113e831bb53f447cd53d5bbf7fdc54 (diff)
add edit feed link into firefox from-rss subscribe dialog
Diffstat (limited to 'prefs.js')
-rw-r--r--prefs.js24
1 files changed, 22 insertions, 2 deletions
diff --git a/prefs.js b/prefs.js
index 21aa56f54..a072ef03c 100644
--- a/prefs.js
+++ b/prefs.js
@@ -12,6 +12,8 @@ var xmlhttp = Ajax.getTransport();
var init_params = new Array();
+var caller_subop = false;
+
function expand_feed_callback() {
if (xmlhttp.readyState == 4) {
try {
@@ -31,6 +33,16 @@ function feedlist_callback() {
var container = document.getElementById('prefContent');
container.innerHTML=xmlhttp.responseText;
selectTab("feedConfig", true);
+
+ if (caller_subop) {
+ var tuple = caller_subop.split(":");
+ if (tuple[0] == 'editFeed') {
+ window.setTimeout('editFeed('+tuple[1]+')', 100);
+ }
+
+ caller_subop = false;
+ }
+
notify("");
} catch (e) {
exception_error("feedlist_callback", e);
@@ -206,7 +218,7 @@ function addFeed() {
} else {
notify("Adding feed...");
- xmlhttp.open("GET", "backend.php?op=pref-feeds&subop=add&feed_url=" +
+ xmlhttp.open("GET", "backend.php?op=pref-feeds&subop=add&from=tt-rss&feed_url=" +
param_escape(link.value), true);
xmlhttp.onreadystatechange=feedlist_callback;
xmlhttp.send(null);
@@ -1109,7 +1121,7 @@ function updatePrefsList() {
}
-function selectTab(id, noupdate) {
+function selectTab(id, noupdate, subop) {
// alert(id);
@@ -1239,6 +1251,14 @@ function init_second_stage() {
document.onkeydown = pref_hotkey_handler;
+ var tab = getURLParam('tab');
+
+ caller_subop = getURLParam('subop');
+
+ if (tab) {
+ active_tab = tab;
+ }
+
if (navigator.userAgent.match("Opera")) {
setTimeout("selectTab()", 500);
} else {