Right click link capture

  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post April 26th, 2004, 6:26 am

I want to add an item to my IE context menu that when right clicking a link on a page like http://script.download.com/example.js it gives me the option to view source instead of downloading it then having to open it with notepad or what not.

So far I have my registry entry setup with the menu item to popup only when links are right-clicked like so, (Contexts is set to 10 when using highlight method)
Code: [ Select ]
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Preview Source]
@="C:\\preview_source.js"
"Contexts"=hex:20
  1. [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Preview Source]
  2. @="C:\\preview_source.js"
  3. "Contexts"=hex:20


The problem I have is how to pass the link to my script without having to highlight the link :?

Preferably Javascript.

Works fine passing highlighted links to my script that appends it to the VIEW-SOURCE: protocall but I want to be able to just right-click and go 8)
Strong with this one, the sudo is.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post April 26th, 2004, 6:26 am

  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Mar 24, 2004
  • Posts: 1855
  • Loc: Uk
  • Status: Offline

Post April 26th, 2004, 6:34 am

when you right click on a link focus gets put on it.... Is there anyway of using js to detect which object has focus?

My big book of ultimate Javascript knowledge is at home and I'm not, but thats the directionI would start going in.
CSS website design tutorials
  • Axe
  • Genius
  • Genius
  • User avatar
  • Joined: Jan 07, 2004
  • Posts: 5744
  • Loc: Sub-level 28
  • Status: Offline

Post April 26th, 2004, 9:54 am

It won't be able to view the source until it has downloaded it. So you would still have to download it somehow beforehand.

I just right click, save target as, put it in temp, then fire it up in a text editor.
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Mar 24, 2004
  • Posts: 1855
  • Loc: Uk
  • Status: Offline

Post April 26th, 2004, 10:58 am

Axe wrote:
It won't be able to view the source until it has downloaded it. So you would still have to download it somehow beforehand.


I got the impression that joebert had already got it working if he highlighted the link - he's just too lazy to highlight :wink:
CSS website design tutorials
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post April 26th, 2004, 11:31 am

Damnit! I hate when Axe is right :lol:
I've been testing this with links to various pages not js files :oops:

I just realized (after Axes smack upside my head :lol: )
that view-source: won't work with JS files. :cry:

Oh well back to doing it the old way i guess :?

maybe i can still scrap this to be a read a page before you visit it gimick :lol:
Strong with this one, the sudo is.

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 230 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.