Small Business Susan

Yea my title_url menu extension is working again

http://msmvps.com/blogs/bradley/archive/2011/03/30/ask-to-microsoft-how-about-better-help-getting-ie9-deployed.aspx


With EXTREME thanks to Ramesh Srinivasan


I have my Title_url menu extension working again (yea I’m a happy camper)


Hey Susan,

Recently I had an update on this from an IE MVP. I’ve tested his solution
and it works fine in IE9.

>From Socrates (Soc) Trikes, IE MVP

<quote>

I have received the following response from the IE team.  If the following
makes any sense to you, will you update the script?

The context menu extension is broken due to a by design security
improvement. The context menu script is being executed in Local Machine
Zone. For this, we grant access to the document. However, we now block the
boundary between the window proxy and the local document. This is why the
set of the textarea’s value fails when using location.href.


But since you still have unrestricted access to the document, the workaround
is to use  window.external.menuArguments.document.URL instead of
window.external.menuArguments.location.href.”

</quote>

The file you want to alter (as administrator/elevated, if you’re using
Windows 7/Vista) is “C:\windows\Web\Title_URL.htm”. I shall test this in
earlier IE versions and update the script. It was MVP Bill James who wrote
this brilliant script originally. And I implemented it as a button/Extension
later.


Regards,

Ramesh Srinivasan



Credits to Socrates (Soc) Trikes, IE MVP


So the revised content of the title_url.htm page is like this:


<!–
Title_URL right-click context tool for IE4+
Bill James – bill@billsway.com – rev 2 Nov 2000
–>
<form name=a><textarea name=a1></textarea>
<SCRIPT language=javascript defer>
  //To disable popup confirmation, change “showConfirm=1″ to “showConfirm=0″
  var showConfirm=0
  var oExtArgs=external.menuArguments;
  var sTitle=oExtArgs.document.title;
  if(sTitle==”)(sTitle=’No Title’);
  /*
    kludge – to keep newlines we must set text in
    textarea, then create textRange and copy that.
  */
  var oTarget=document.a.a1;
  oTarget.value=sTitle+’: \r\n’+oExtArgs.document.URL+’\r\n’;
  oTarget.select();
  var oTextRange=oTarget.createTextRange();
  oTextRange.execCommand(‘copy’);
</SCRIPT>


And sure enough my copy the title and url of a web page is back to working again!



1 comment so far ↓

  • #   Dean on 03.31.11 at 9:38 pm     

    “The context menu script is being executed in Local Machine
    Zone. For this, we grant access to the document. However, we now block the boundary between the window proxy and the local document. This is why the set of the textarea’s value fails when using location.href.”

    Yeah, I figured that was it. :-)