A browser addon that makes a box pop up in the corner on certain domains - popup

I want to create an addon where when you open a webpage from certain domains, a square or circle (not sure which yet) image will pop up on the corner of the page.
The closest example I can think of is the GetGlue addon. When you are on a page from specific domains, the toolbar pops up on the bottom and gives you options to pursue while you are on the page. Then once you go to a non-supported website, the toolbar is gone.
However the one I want to create is much more simpler where I just want an image to show up in the top corner of the page when you arrive at certain webpages, and disappear once you move to a domain not supported. It's not going to do anything or link anywhere or have any actions; it's just an image.
I don't know much about creating addons, but I am willing to learn how to do so as creating this is of somewhat importance to me. But I've been looking around, and I've come across things to get people started on creating them, but I don't really know how to go about it as I've not sure how I can get what I want done, and the ones I see are about things not related.
If anyone knows of any guides or tuts or anything similar that can explain the basics or even some more in-depth of doing what I want done, many thanks are sent your way.

Look into content scripts
This allows you to inject JS and CSS into any page that matches a url pattern
For example, including the following in your manifest will insert mystyles.css into any page under http://www.google.com/
"content_scripts": [
{
"matches": ["http://www.google.com/*"],
"css": ["mystyles.css"]
}
],

Related

Rainloop - How to access DKIM and other header information in the Message View

I have a heavily modified Rainloop install. Figured out a lot of ways to modify it, but having the following issue:
Rainloop shows a DKIM signature indicator (with it's own interpretation) as a green checkmark.
If you hover your mouse pointer over it (when shown), it will show a "tool-tip" of the text in that header.
The problem here is, on mobile you can't "hover", generally speaking. How can I access the header data via JS, or how can I talk to the element for the "tool-tip" for the DKIM header info so I can put a click-listener on the indicator?
It's nice they show it on the mouse-over, but I can't seem to find any way to reference it.
In addition, it would be really grand to show that info in the "info" expandable box.
This is all pertaining to the Message View in Rainloop specifically.
Really nice program. But there is no documentation on their API.
Anyone have ideas on this? I can't seem to get a handle on it through devtools.
If I could just get a solid CSS selector to reference it by that would be grand.
All I seem to be coming up with on searches are similar expressions.
Hoping maybe someone on Stack might have found a clue on this, because DKIM is important, and ordinary users need simple indications as to trust.
This is something to help other people, not just me, so if anyone has a way can you share?
Okay. So right after I posted, I did find it. Not sure how I missed it before, but the dkim results header data can be found in the "dkim icon"'s title attribute-- the "icon" is an tag (rainloop hijacks the tag as UTF8 icon containers).
So the tooltip apparently is an actual tooltip, whereas I thought it was something like a hidden div being shown on a mouse-over.
I wonder if there is a way to get it to show on a click instead of a hover (preferably using CSS).

How to Make Site with multiple Pop-Ups - like http://www.everythingnow.com

I'm a beginner with only basic css and html knowledge, but want to learn to create a site like http://www.everythingnow.com.
I want the popup windows to be drag-able by users.
Even just being pointed in the right direction would help infinitely. ty!

confluence display content by user

I am trying to get specific content on a confluence cloud wiki to display content based on a specific user. The scenario here is that there are links on a page but only 1 should display, the one that displays is based on whom ever is logged in.
I have been told how a macro is the way forward, but I have read the documentation and I am at a loss. I do not understand what I have to do or how to write a confluence macro. could someone help me out with either an example or some links? I have searched like crazy, but maybe i am not asking the right questions but hopfully you can all help me out?
There's a plugin for this:
https://marketplace.atlassian.com/plugins/net.customware.confluence.plugin.visibility
But I'm not sure how thoroughly it hides the content. It might still be visible if users view the page source. If you're trying to hide content which needs to be really protected, you'll probably need to do something else.
Depending on how many users are going to be using the page, you could also just make separate spaces for them, add the permissions to those spaces, and then use a page-include on your "main" page to display the content. If they don't have access it shouldn't show up. You might experience some formatting issues with that solution, however.
Finally, you could grab the username with jquery and display stuff based on that. This solution will be pretty easy if you are familiar with javascript/jquery.
Edit: Here are some helpful resources on how to use javascript and jquery within confluence:
https://confluence.atlassian.com/display/CONFKB/How+to+Use+JavaScript+in+Confluence
https://developer.atlassian.com/confdev/confluence-plugin-guide/writing-confluence-plugins/including-javascript-and-css-resources

iPhone SDK: Ideas on how to implement a help facility for application

We we wondering what are some ways developers have added a help function to their apps. What are some techniques people have used?
One way we were thinking of is to us UIWebView to display a HTML file with help instructions.
Thoughts appreciated.
I'm using UIWebView right now which pretty much contains all the help in a single page, along with some JQuery things to display popups, etc. But I like the way iCab Mobile (et al.) are doing things which is a sectioned UITableView with each row a separate topic or section within their overall help information (complete with icons...) then in their bundle they have each section in its own html file, organized by localization.
Another thing in my queue for the next release is to provide a dynamic "News" view. The rough idea is as follows... I have on my server a file or CGI where I can place small bits of news I'd like to push out to users. On startup, my app checks for network availability and if present, start a thread to see if anything has changed on the server since last updating the News data. If changes present, post an alert letting user know, and asking if they'd like to read it now. At that point, the latest news is already downloaded and cached, so they can simply read it later if they want, and I won't post anymore alerts until the server file changes again. (And one could add a preference/setting to disable these alerts.)
I'm thinking this would be a good way to let people know that some nasty bug is known and fixed and an update is sitting in the queue, solicit beta testers, promote upcoming features or other apps, etc. I can see where constant alerts everytime I've got something new to promote would get annoying, so having a setting to disable them means the user never has to read them unless they want to. Although some kind of override to warn of recently discovered/fixed bugs seems sensible.
FWIW, the author of Mover+/Mover has just started doing a similar thing, though I think Emanuele is perhaps only showing one Notelet at a time, whereas I envision a bit more of a history (shown in UIWebView) until I decide to age stuff off the bottom of the stack.
I'm using a scroll/page view to show several images containing small notes. Each image then tells the user about the more advanced functions on a specific part of the app.
In my opinion the help should only contain information that isn't a 100% relevant for the use of the application. It should be things the advanced user should use to make more use of the app. It should contain gold for the power users. The "basics" should be so obvious that no help would ever be needed. If that's not the case, I think, you've failed as a developer on the iPhone platform.
(Here's a screen shot from my demo app)
I'm currently creating a fairly complicated app. I'm thinking of doing help as a semi-transparent overlay - help in text form is hard to swallow for users; it's much more helpful to just point at stuff and say "this does that".

what is the default pop up replacement now?

I know pop ups are not good and should be avoided if possible but is that really true that now, whenever i think of using a pop up, i should always be considering other options? Are there any exceptions? And the last question is: what is the default replacement for pop ups?
You can use any javascript based dialog. Look for example at jQuery UI Dialog
The "Web2.0" pop-up might be a lightbox. I hope these are just a passing fad, because they are kind of annoying (a lot like pop-ups).
http://en.wikipedia.org/wiki/Lightbox_(JavaScript)
Banners, like you get at the top of Stack Overflow to tell you about badges, comments, see the FAQ if you're a new user are my favorite. They don't really get in the way and can link to the main content.
It depends on what you are trying to accomplish. Pop-ups are completely acceptable in certain contexts. The aversion to pop-ups arose from having pop-up foisted on users in the form of advertisements. I think that pop-ups are still a valid device in the correct case.
My rule of thumb is to not make any decisions for the user that they can make themselves. This typically includes opening a pop-up since they could right-click and choose "open link in new window" if they so desired.
Do you want to capture of a piece of user input without allowing any further interaction? A modal dialog is your friend.
there are cases where you want to offer a bit of useful info or a quick reference that doesn't necessitate closing off the rest of the web page or navigating to a different location. This could be addressed using some javascript and floating div's but many times a pop-up will do what you want without being obtrusive to a user.
I tend to read resources from the likes of 37 signals and UIE to keep up with the best ways to enhance user experience without alienating a user.