Hi gang.

I'm a bit confused on userscripts + browsa pluging.  I have a fluid
app loading a window and then a browsa tray loading another.  I made a
script to refresh the main window often, and the browsa window less
often.  It also add a manual refresh dock menu item for the main
window.


here's the code:


    if (window.fluid) {

        //adds "Refresh" menu item to the dock, only refreshes dashboard
view.
        window.fluid.addDockMenuItem("Refresh", onclickHandlerRefresh)

        //refreshes dashboard view every 3 minutes
        if (window.fluid.title = "Tumblr"){

                //Change this number to alter duration (seconds)
                var refreshDelaySeconds = 180;

                setInterval(function () {
                        window.location.reload()
                }, 1000 * refreshDelaySeconds)

        }

        //refreshes the radar view every hour
        if (window.fluid.title = "Radar | Tumblr"){

                //Change this number to alter duration (minutes)
                var refreshDelayMinutes = 60;

                setInterval(function () {
                        window.location.reload()
                }, 1000 * 60 * refreshDelayMinutes)

        }

        //refresh handler for dock menu item
        function onclickHandlerRefresh(){

                if (window.fluid.title = "Tumblr"){
                        window.location.reload()
                }

        }

    }




The strange thing is that the first   " if (window.fluid.title =
"Tumblr")" refresh section is refreshing both the main window and the
browsa window every three minutes.

However, the onclickHandler for the dock menu item works correctly and
only causes the main view to refresh, and not the browsa window.

I'm a bit confused why one window.location.reload() is working
selectively while the other is not, despite using the same window
title property?


Thanks.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"fluidapp" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/fluidapp?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to