Right click to ImageShack extension?

Talk about add-ons and extension development.
Corbin
Posts: 13
Joined: April 18th, 2005, 6:41 pm

Right click to ImageShack extension?

Post by Corbin »

Is there an extension that adds an option to the context menu of images to upload directly to ImageShack? If not, somebody should make one, that'd be neat.
User avatar
CPU
Posts: 624
Joined: August 13th, 2004, 4:22 pm
Location: Houston, Texas
Contact:

Post by CPU »

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051114 Firefox/1.5 - Build ID: 2005111403
Corbin
Posts: 13
Joined: April 18th, 2005, 6:41 pm

Post by Corbin »

:) Yes, I have that set up already, what I want is the ability to right click and upload. The transloader doesn't work that well when a page is covered in images and I just want one specific thing.
David H
Posts: 2254
Joined: June 13th, 2003, 5:17 am
Location: Japan

Post by David H »

It might be possible to modify the javascript of that transloader bookmarklet to work with the custom script handler of Context Menu Extensions. That would make it available through the context menu.

Don't ask me how to do it though. I don't know anything about javascript.

If you can't get that to work, then as a workaround, right-click on the image you want to upload and choose "view image" to load it in the page alone. Then you can run the bookmarklet and it shouldn't get confused.
Corbin
Posts: 13
Joined: April 18th, 2005, 6:41 pm

Post by Corbin »

Eh, I don't know crap about Javascript either.
ToonTownAholic
Posts: 6
Joined: February 11th, 2005, 9:03 pm

Post by ToonTownAholic »

I don't know how to do the context menu part of this but

Code: Select all

javascript:document.write("<form name=\"f\" action=\"http://imageshack.us/transload.php\" method=\"post\">
<input type=\"hidden\" name=\"url\">");
</form>
document.f.url=url_to_be_uploaded;

should work. :)
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4
The best things in life are free. :)
McV
Posts: 63
Joined: September 29th, 2003, 6:59 am
Location: Moscow, Russia
Contact:

Post by McV »

Give a try to ConQuery with this query plugin:

Code: Select all

<search 
   name="Upload to ImageShack"
   description="This sends link of targeted image to ImageShack"
   method="POST"
   action="http://imageshack.us/transload.php"
>

<input name="url" value="[:imgurl]">
</search>


Place the code above to the c:\Prgram Files\Mozilla Firefox\searchplugins\ directory to the file named imageshack.cqr an it will appear under "Query to..". Right click on image and send it to ImageShack.

The following query plugin you may even hide from context menu and it will appear only if it feels that you right clicked on some image:

Code: Select all

<search 
   name="Upload to ImageShack"
   description="This sends link of targeted image to ImageShack"
   method="POST"
   action="http://imageshack.us/transload.php"
   showiftarget="[:imgurl]"
   showif=".+"
>

<input name="url" value="[:imgurl]">
</search>


For more info read documentation
<a href="http://conquery.mozdev.org">ConQuery</a>: Right-click the Web!
Corbin
Posts: 13
Joined: April 18th, 2005, 6:41 pm

Post by Corbin »

Hey hey, that works! Quite well in fact. One thing: is there a way to make it show directly in the context menu instead of under "Query to..."?
McV
Posts: 63
Joined: September 29th, 2003, 6:59 am
Location: Moscow, Russia
Contact:

Post by McV »

Sure!
1. you can reorder this s.plug to the top of plugin's list, and set "Number of top ordered plugins to show in main context menu" option to 1 (or whaterver above 0) or:
2. If you are using that second plugin (with "showif" parameter), you can hide it from list and set ConQuery option "Show context sensitive plugins in the main context menu" to true. Well this is better because "Upload to ImageShack" entry will come up only when you click on an image.
And after all you can hide "Query to.." entry itself.. :)

Enjoy! :)
<a href="http://conquery.mozdev.org">ConQuery</a>: Right-click the Web!
cheesypeanut
Posts: 42
Joined: November 28th, 2004, 1:25 pm
Location: 127.0.0.1

Post by cheesypeanut »

EDIT: realised my mistake after reading the folllowing here

showif="regexp" - evaluates selection with regexp. Results are saved in [:matched] variable(see above). If plugin is hidden from context menu and regexp matched selected text, plugin will be shown.
cheesypeanut
Posts: 42
Joined: November 28th, 2004, 1:25 pm
Location: 127.0.0.1

Post by cheesypeanut »

This inspired me to make a fully fledged extension. It might be easier to setup than the method above and doesn't require the bloat of the ConQuery extension.

Grab it [link removed] if you want.

This is my first extension so we'll see how it goes. Let me know of any bugs you come across or if you have any comments.
Last edited by cheesypeanut on January 4th, 2011, 7:31 pm, edited 2 times in total.
miestah
Posts: 16
Joined: February 28th, 2005, 12:53 pm

Post by miestah »

Cheesy,

That works great! Thanks!

Just in case anyone else didn't get it to install right, I downloaded it, dragged the file to the extensions window (left pane), and clicked yes to install.

Thanks again!
0live
Posts: 799
Joined: June 15th, 2004, 7:28 am
Location: Brussels

Post by 0live »

Good effort cheesypeanut but it'll just open a blank tab for me :(
Also I'm not sure why the context-menu item is in bold..
Linux i686 (ubuntu-gutsy) | Minefield (20081118020400) | Tb 2.0.0.17pre (2008092517) w/ Lightning
Corbin
Posts: 13
Joined: April 18th, 2005, 6:41 pm

Post by Corbin »

0live wrote:Good effort cheesypeanut but it'll just open a blank tab for me :(
Also I'm not sure why the context-menu item is in bold..


It works fine for me...
User avatar
thenightfly42
Posts: 983
Joined: November 5th, 2002, 8:03 am

Post by thenightfly42 »

Sounds great; does anyone know if this could be tweaked to work with Photobucket, or should I just bail on that service and switch to Imagebucket?
Post Reply