Hello There, Guest!
View New Posts  |  View Today's Posts
FireFox Plugin - Link Shortener

  • 0 Vote(s) - 0 Average


01-13-2013, 07:18 AM #1
0x69
Unregistered
 

Lightbulb  FireFox Plugin - Link Shortener
I had this idea but I don't exactly have the time to look further into it.

Idea:
When you right click selected text, you have the option of converting the URL to something shorter (using a link shortener site's API?).

I myself would find this particularly useful because I shorten the majority of the links I post for analytical reasons.
Honestly, I think this should be fairly simple to program.
You shouldn't have to do much more than send requests with the URL and receiving data back which you could store as a variable and copy it to the clipboard, or simply convert the highlighted text to the variable.

Edit: I thought I'd post some alternatives in case someone wanted one, needed ideas, etc.:
Idea(s):
(01-13-2013, 07:29 AM)AceInfinity Wrote:  The easiest way to achieve this would be to have a command line program that is integrated with Windows shell context menu for the right click, then you wouldn't have to program an application to hook that event and modify or show a custom context menu and it would be a universal thing. Not to mention: The program wouldn't even have to run 24/7, as it would only process the task of URL shortening when the program is called via command line.

You are right otherwise - It would be a simple HTTP request and would receive the response data in order to save it to the Windows clipboard or do whatever...

Good idea though, I think quite a few people could make use of this, for how simple it is.

cheers

Love,
~0x69

01-13-2013, 07:29 AM #2
AceInfinity
Developer
*******
Administrators
Posts: 9,733 Threads:1,026 Joined: Jun 2011 Reputation: 76

RE: FireFox Plugin - Link Shortener
The easiest way to achieve this would be to have a command line program that is integrated with Windows shell context menu for the right click, then you wouldn't have to program an application to hook that event and modify or show a custom context menu and it would be a universal thing. Not to mention: The program wouldn't even have to run 24/7, as it would only process the task of URL shortening when the program is called via command line.

You are right otherwise - It would be a simple HTTP request and would receive the response data in order to save it to the Windows clipboard or do whatever...

Good idea though, I think quite a few people could make use of this, for how simple it is.

cheers
This post was last modified: 01-13-2013, 07:30 AM by AceInfinity.


Microsoft MVP .NET Programming - (2012 - Present)
®Crestron DMC-T Certified Automation Programmer

Development Site: aceinfinity.net

 ▲
 ▲ ▲

01-13-2013, 07:45 AM #3
0x69
Unregistered
 

RE: FireFox Plugin - Link Shortener
(01-13-2013, 07:29 AM)AceInfinity Wrote:  The easiest way to achieve this would be to have a command line program that is integrated with Windows shell context menu for the right click, then you wouldn't have to program an application to hook that event and modify or show a custom context menu and it would be a universal thing. Not to mention: The program wouldn't even have to run 24/7, as it would only process the task of URL shortening when the program is called via command line.

You are right otherwise - It would be a simple HTTP request and would receive the response data in order to save it to the Windows clipboard or do whatever...

Good idea though, I think quite a few people could make use of this, for how simple it is.

cheers

That's a really good idea.
That way, it doesn't matter whether or not you use Firefox.
Programming that in C (no dependencies FTW!) probably wouldn't be too complicated either.
Based on the documentation for the API, all you need to do is post information ("longUrl"), and set the response as the current clipboard.
Error handling should be fairly simple as the only possible errors would be something like an invalid url, the very slim chance the Google data centre is down, is disallowed content.

01-13-2013, 08:01 AM #4
AceInfinity
Developer
*******
Administrators
Posts: 9,733 Threads:1,026 Joined: Jun 2011 Reputation: 76

RE: FireFox Plugin - Link Shortener
I can read C code just because it's so similar to C# syntax, and C++ especially, but I've never done any programming with it. :)

Only C++ on and off for a few years. But the way I posted is the way I would do it. Much better to have it run only when needed instead of running the whole time you use your computer. The context menu edit is simple Registry modifications.
This post was last modified: 01-13-2013, 08:02 AM by AceInfinity.


Microsoft MVP .NET Programming - (2012 - Present)
®Crestron DMC-T Certified Automation Programmer

Development Site: aceinfinity.net

 ▲
 ▲ ▲

01-13-2013, 08:10 AM #5
0x69
Unregistered
 

RE: FireFox Plugin - Link Shortener
(01-13-2013, 08:01 AM)AceInfinity Wrote:  I can read C code just because it's so similar to C# syntax, and C++ especially, but I've never done any programming with it. :)

Only C++ on and off for a few years. But the way I posted is the way I would do it. Much better to have it run only when needed instead of running the whole time you use your computer. The context menu edit is simple Registry modifications.

If you don't mind, I'm going to "steal" your idea and put it in OP.

01-13-2013, 08:15 AM #6
AceInfinity
Developer
*******
Administrators
Posts: 9,733 Threads:1,026 Joined: Jun 2011 Reputation: 76

RE: FireFox Plugin - Link Shortener
(01-13-2013, 08:10 AM)0x69 Wrote:  
(01-13-2013, 08:01 AM)AceInfinity Wrote:  I can read C code just because it's so similar to C# syntax, and C++ especially, but I've never done any programming with it. :)

Only C++ on and off for a few years. But the way I posted is the way I would do it. Much better to have it run only when needed instead of running the whole time you use your computer. The context menu edit is simple Registry modifications.

If you don't mind, I'm going to "steal" your idea and put it in OP.

Doesn't bother me.. If someone else happens to make this, I may give it a test as well. Otherwise if I have a bit of spare time I'll see what can be done for a quick application. I would probably choose a console application for this, no need to load a full GUI for what is meant to be a quick process. And if it's command line based I think it would be better anyways to just avoid the GUI, have the app run, set the clipboard, and terminate.


Microsoft MVP .NET Programming - (2012 - Present)
®Crestron DMC-T Certified Automation Programmer

Development Site: aceinfinity.net

 ▲
 ▲ ▲

01-14-2013, 12:05 PM #7
Adriana
Senior Member
***
Posts: 300 Threads:53 Joined: Jan 2013 Reputation: 0

RE: FireFox Plugin - Link Shortener
The goo.gl is pretty cool :P I've only seen shortened links on Twitter but didn't know I can shorten them myself somehow, thanks for posting the link ;)
However, when I hover my mouse pointer over a link, I prefer to see where is goes instead of seeing a bunch of numbers and characters (you can see the link texts link to at the bottom of your browser).
This post was last modified: 01-14-2013, 12:08 PM by Adriana.




Forum Jump:



Users browsing this thread: 1 Guest(s)