Right click to ImageShack extension?

Talk about add-ons and extension development.
User avatar
thenightfly42
Posts: 983
Joined: November 5th, 2002, 8:03 am

Post by thenightfly42 »

cheesypeanut wrote:Grab it here 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, EMAIL REMOVED (ln)

OK, I just tried using the 0.2.1 version that is in the same directory as the 0.1 version you posted above. I'm using the current nightly build, so that might be an issue.

When I right-click on an image and select Upload to Imageshack, all that happens is I get a new, blank tab. Nothing else happens. Is it because I'm using a nightly, or is something broken? I'm logged into my account, but that doesn't help.

Also, could you remove the bold from the context menu item and move it further down the context menu so that it immediately follows "Save Image As..."?
Last edited by LoudNoise on August 26th, 2009, 4:01 pm, edited 1 time in total.
Reason: removed email at the emails owner's request.
cheesypeanut
Posts: 42
Joined: November 28th, 2004, 1:25 pm
Location: 127.0.0.1

Post by cheesypeanut »

thenightfly42 wrote:OK, I just tried using the 0.2.1 version that is in the same directory as the 0.1 version you posted above. I'm using the current nightly build, so that might be an issue.

When I right-click on an image and select Upload to Imageshack, all that happens is I get a new, blank tab. Nothing else happens. Is it because I'm using a nightly, or is something broken? I'm logged into my account, but that doesn't help.


Working on a new version, which will hopefully work with nightlies.

thenightfly42 wrote:Also, could you remove the bold from the context menu item and move it further down the context menu so that it immediately follows "Save Image As..."?


I am contemplating removing the bold but I'm not going to move it down the context menu.
Zoolcar9
Posts: 2225
Joined: November 9th, 2004, 6:45 pm
Location: Jakarta, Indonesia (UTC+7)
Contact:

Post by Zoolcar9 »

David H wrote: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.


Script for the Context Menu Extensions:

Code: Select all

if(gContextMenu.onImage) {
  _openNewTab('http://imageshack.us/transload.php?url=' + _popupNode.src);
} else {
  alert('You have to right-click on image element!');
}


or choose where to upload the image:

Code: Select all

function uploadTo(uri, width, height) {
  window.open(uri + _popupNode.src, '', 'width=' + width + ', height=' + height + ', toolbar=0, statusbar=0, scrollbar=auto, resizable');
}

if(gContextMenu.onImage) {
  var host = _selectList('Upload to', ['Flickr', 'ImageShack®'])
  if(host==0) {
     uploadTo('http://www.flickr.com/tools/sendto.gne?url=', '500', '185')
  }
  if(host==1) {
    uploadTo('http://imageshack.us/transload.php?url=', '800', '400')
  }
} else {
  alert('You have to right-click on image element!');
}
My Firefox information | Add-ons | GitHub

"With great power, comes great desire to show it off."
temp1232
Posts: 5
Joined: July 22nd, 2005, 10:25 am

Post by temp1232 »

McV wrote: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


How do you 'place' the code into that directory?....
cheesypeanut
Posts: 42
Joined: November 28th, 2004, 1:25 pm
Location: 127.0.0.1

Post by cheesypeanut »

You can get the extension from the ImageShack site.

See here

or direct link here
temp1232
Posts: 5
Joined: July 22nd, 2005, 10:25 am

Post by temp1232 »

i saw that, but its a .xpi, and i dont have a program to execute that. So say i have it on my desktop. what should i do then?
User avatar
CPU
Posts: 624
Joined: August 13th, 2004, 4:22 pm
Location: Houston, Texas
Contact:

Post by CPU »

drag it to the firefox window
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051114 Firefox/1.5 - Build ID: 2005111403
User avatar
goofyFr
Posts: 70
Joined: June 26th, 2005, 2:03 pm
Location: France

Post by goofyFr »

In case other translators may be interested, I made a locale folder with en-US and fr-FR locales for this handy extension :
http://goofy37.perso.cegetel.net/ImageS ... -0.2.1.xpi
Thanks to the author, it is a useful extension !
temp1232
Posts: 5
Joined: July 22nd, 2005, 10:25 am

Post by temp1232 »

where do i drag the file to? do i open something first or what?

if its View>toolbars>customize... i tried draging it over to there, but nothing happens.

is there a way i can manually put it in through folders?
User avatar
goofyFr
Posts: 70
Joined: June 26th, 2005, 2:03 pm
Location: France

Post by goofyFr »

1. open a Firefox session, even offline. Minimize its window let's say half-screen, so that you can see where your xpi file is
2. Supposing the xpi is on your desktop, drag it to the Firefox window. You get a small information window.
3. After 2 seconds or so, click on "install". Then wait
4. when you get the message about the install process to be complete after restarting, just close the extension manager window and Firefox
5. Restart Firefox. You should have the new feature under right-click
khlo
Posts: 56
Joined: May 21st, 2004, 11:44 am

Post by khlo »

Bold often implies the default action of an object so I was quite confused and tried to double click on an image to upload it to Imageshack. There is absolutely no reason why it needs to be in bold and at the top of the context menu. It is more logical that 'Upload to ImageShack' is grouped with Save Image As..., etc.
User avatar
goofyFr
Posts: 70
Joined: June 26th, 2005, 2:03 pm
Location: France

Post by goofyFr »

There is absolutely no reason why it needs to be in bold and at the top of the context menu

+1 (though it is not a major issue ;-))
khlo
Posts: 56
Joined: May 21st, 2004, 11:44 am

Post by khlo »

This modification adds the Imageshack menu entry to a more sane position. I hope that the author of the extension would consider making this modification. In chrome/content/imageshackrc/imageshackrcOverlay.xul find:

<menuitem id="imageshack-context-menu" label="Upload to ImageShack" position="1" style="font-weight: bold;"/>

Change to:
<menuitem id="imageshack-context-menu" label="Upload to ImageShack" insertafter="context-sendimage" />
hydreux
Posts: 237
Joined: August 11th, 2003, 9:32 pm

Post by hydreux »

maybe the author could also add an option to hide the "Upload to ImageShack" menu item when one is inside the ImageShack's web-site since we won't be doing any transloading while we're there...
Post Reply