Voriki
Voriki

Reputation: 1637

Can a piece of code be dynamically placed on every webpage a user visit

So we have a program that the user can use by copying text from a webpage they visit, alt+tabbing to the program, then pasting it as input. It would be more convenient for users to be able to do it directly in the site.

We were thinking of a panel that would be small and expandable, following them to each site they visit. Is this possible? Either a snippet of code that is auto pasted, or a JavaScript command called that would dynamically paste the code (is Scratchpad any help here, at least in FireFox).

We've never made a FF add-on, but it seems like if the dynamic panel idea falls through, an add-on would be the next best thing.

Basically, users should ideally be able to copy text, either enter a key combo or click a button, see the interface and paste in the text. Would either of these methods work?

Upvotes: 1

Views: 91

Answers (2)

T9b
T9b

Reputation: 3502

This site Polyvore used to do something similar, although in the 2 mins hunting around I could not find it, but I have used it and I think the technique was used by Google and Digg for a while. From what I recal it involved iframes and a bookmark in your browser.

Basically you could download a small piece of code that would sit in your bookmarks bar and this would allow you to navigate to a fashion website click on the bookmark copy a picture and insert it back into Polyvore.

Upvotes: 0

Joachim Sauer
Joachim Sauer

Reputation: 308031

A browser add-on or a userscript could certainly do this.

You can also write a userscript and use a user script compiler (such as this one) to convert it to a "true" Addon.

Alternatively your application could act as a HTTP proxy and inject it dynamically, but I'd guess that this would probably be more complicated than the other two approaches.

Upvotes: 1

Related Questions