userscript doesn't work on yammer.com - userscripts

If you joined more than a few groups in yammer.com, then the left side bar which showing groups will have a link "View all your groups". You need to click this link to show all of your joined groups.
Most of time I want to see the full list of joined groups to check new posts. So I ended up click that link many times when I visit yammer.com. So I was trying to automate this using writing tampermonkey script do do this for me.
function expandall(jNode)
{
console.log('click expand all');
jNode.click();
}
waitForKeyElements('a.yj-nav-menu--group-item-link.yj-nav-menu--show-all-groups-link', expandall);
I can see that the function was triggered since it does output "click expand all" in console, however looks like it doesn't trigger the click on that link, the groups in the left side of page doesn't expand.
Anything wrong with the userscript above?
Thanks.

Related

Weird navigation bug, with side menu, routing views won’t update

I am fairly new to ionic (using the 1.0.0 beta1) and Angular, and I am working on my first project, where I experience weird bugs, I cannot understand.
My app is based on the "Ionic Book" task app, described here: http://ionicframework.com/docs/guide/building.html.
Here's the link to my app: http://plnkr.co/edit/zp49fsbmOfMiQfXDopxt?p=preview1
In my version of the task-app, the tasks are called "instances" and each instance has several "categories" in it. Each category has a title and a status.
The user can enter instances in the side menu, via the '+' button. And each instance is created with some dummy categories.
The user can choose his instances and then choose a category to see its status.
To see what bugs occur, please visit my app http://plnkr.co/edit/zp49fsbmOfMiQfXDopxt?p=preview1 and add a few instances with dummy titles like a, b, c, d. The url form may remain empty, it is not yet needed. Don't click on a category yet. You will notice the switching from one category to another works as expected (though all instances have the same categories).
Now when you click on a category in an instance, say in instance b, the view shows the category status, with the right category title in the nav-bar. When you now click on the back button, the mess starts:
If you now click on any category, the view always displays the category, which you clicked at first! Not the one you want to see. Also, if I now change the instance (say to instance a) and try to switch back to instance b, the switch will not be performed (the title remains a)!
I really can't see where those bugs come from, as the localeStorage seems to be updated on clicks! (check the lastActiveInstance and lastActiveCat variables in localStorage!)
Do you guys see where my mistake is? By this time I think it must be some fundamental problem with the $stateProvider and the back button?
I'd really appreciate your help, since I am pretty desperate right now. Thank you
For what I've seen, it looks like you have only one MainCtrl for the whole application, is that right?
It looks like the variables of this controller are only updated once. So your activeInstance will receive it's value when you click for the first time to see the category, but then if you come back and click again on anything, the value of this variable is not being updated. You're calling selectCat function but I don't see it updating the values of activeInstance.
I hope it's only that!
It is now fixed with the new ionic 1.0 beta 5b.
View title updates as expected.
From the changelog:
- List item
- make it set navbar if title changes back to old value (919d4f8d, closes #1121)

What is the recommended approach to maintain view state using ionicframework / angularjs?

I'm new to Ionic Framework and AngularJs as well.
The app I'm working on has a view where user can search and the results are presented in a list. When the user clicks one of the list items, it navigates to details view. When user presses the "back" button at the header bar, the search text box and results list are empty and he must search again.
What is the recommended approach to, when the user presses the back button from details view, bring the search view populated with the previous search term and results? (would be nice to have the scroll position restored as well)
I know I can just store this information into some service, but this sounds like a lot of work.
Are there any other cool stuff like a view state service or something that can do this for me?
I know I can just store this information into some service, but this
sounds like a lot of work.
really?
app.factory('searchData', function() {
return {
searchTerm: '',
results: []
};
});
that's how it's done. But it sounds like what you're really looking for is a cure for laziness...

combine two or more navs

I'm trying to create a three-panel layout:
left: a list of items generated with ng-repeat (ie: group1, group2, group3...)
top: a couple of buttons for each group-page (ie: home, browse, users,...)
right: the content panel
Now, there a re a couple of problems that I'm running into:
I want the user to always have one group selected, and this should be expressed in the url (/group/:groupId). This groupId can only be known after getting the groups from the backend database, but I still want this to be the default page. In other words the website's homepage should have a groupId in it, depending on the current user.
When a user clicks on of the top panel links, he should be taken to that group-specific page (/group/:groupId:/home)
When a user clicks on of the group links in the left panel, he should be taken to the currently selected page of that group (ie: if the user was at /group/1/home and clicks on group2, he should be taken to /group/2/home, if he was at /group/1/browse and clicks on group2, he should be taken to /group/2/browse)
Anyone got a clue as how to achieve this behavior? I've been trying to wrap my head around this but can't seem to find a good way to achieve this. Please post and ask if you need clarification.
EDIT: I'm using UI-router
In case it could be of use to someone:
I solved this by:
adding a global resolve that loads the user's groups.
providing a service to manage the current group-state
building all references to the homepage using the groupId in that service
not relying on href, but using ui-sref (as intended by ui-router) as described here: ui-router wiki: ui-sref

DotNetNuke Switching Between Multple Edit Modules

I have a custom module in DNN 7 that has a data structure where items belong to categories (called "sections", not DNN taxonomy, just a simple list of section names). The module edit screens work so that on the view control you may click on an edit link on each category, which loads the category edit screen (passing the category id). This works great, and when you save I use Globals.NavigateURL() to return to the view screen. This all works as intended.
On each category edit screen I also have a list of the items within that category, each with an edit link. Clicking the edit link opens the item edit screen, passing the correct item id, and allowing me to edit that item. This all works great, until you save. The save works properly, but when I want to send the user back to the edit screen for the category it doesn't work. When I use:
Response.Redirect(EditUrl("SectionId", sectionid.ToString(), "EditSections"), true);
...nothing happens. It simply doesn't redirect anywhere. This is exactly the same URL I'm using to get to the category edit page in the first place:
EditUrl("SectionId", Eval("SectionId").ToString(), "EditSections")
And then I use a similar URL to get to the item edit page:
EditUrl("ItemId", Eval("ItemId").ToString(), "EditItems")
I don't understand why using the same URL to navigate to the same page I already navigated to would simply not do anything. For now I am sending them all the way back to the view, but it's painful if you need to add several items to the same category to have to navigate back into the category and add another item, only to be sent back to the view.
Anyone see anything like this before?
Have you tried to use the overload of NavigateUrl instead of EditUrl?
Globals.NavigateURL(TabId, "EditSections", "mid", ModuleId.ToString(), "SectionId", Eval("SectionId").ToString())
I haven't seen that myself but I would have to assume that somehow the context is being lost with EditURL and you're not getting sent to the proper location due to that.
I would suggest you try one of two things (or both).
Debug the URL that EditURL is returning and see if you can find the
difference.
Use NavigateURL for all your links and pass in MID=## for your
moduleid as a querystring parameter, to ensure that the proper
values are being passed.
UPDATE: If you're trying to have multiple edit views, and move between them, you might look at using a "loader" instead of having separate module definitions for the edit controls. Basically have a single Edit.ascx file defined, and it loads other ASCX files within it, injecting into a Panel. The View control on this module http://dnnsimplearticle.codeplex.com/ does that, but I haven't tried it with an edit control before.

Drupal 7, Views, Groups, and Feeds - Creating View for Feed Items in a Group

Before I get into the details, here is the overall goal:
I want to have a group of users which get access to a feed, and any new items that appear in that feed they will get access to as well.
Details:
I am using Organic Groups, Feeds/Feed Items, and Views. I have setup a single Organic Group and added a single user to it. I have taken a Feed and added it to the group as well.
I have tried a few different combinations of the queries for Views and here is where I am at currently: http://cl.ly/2T1a0s1A0j3A0I0d3i1u
There is a relationship setup between the Feed and the Feed Item. There is a filter setup that says if the user has permission to view the Feed they should be able to see the Feed Item.
However, when I login to the user account and visit the URL (which used to just be static and take no arguments, ignore the % I just added) I get a blank page.
It would be great to get some help figuring out this problem and/or some pointers on how to debug it + learn more about Views and how I could use Views/OG to solve this problem.
Thanks,
David
The best way I did OG Groups was to create the group under content type. Once that is done. go back into content type and click on Feed scroll down to OG Groups tab click on it. You should seeNODE in the drop-down box and Groups in a select box below. Make sure node is clicked and Group is highlighted. Click save and now do the same for Feed Item. There is one thing to be mindful of, when the feed imports, it will be bundled with the group however the feed it self will be separate from the nodes created linked only by the group. One way to make it easier to manage is to place the feed and the feed items into the same book when setting up the feed. It akes life much easier that way.

Resources