Add Browser Source to your context menu: View the source code after the browser has rendered it, an example to view the web pages source code and the browsers rendered source code can be seen here at the bottom of the page.
browsersrc.htm:<SCRIPT LANGUAGE="JavaScript" defer>
var viewWin; var docSource;
docSource = external.menuArguments.document.all.tags("HTML")[0].outerHTML
viewWin=window.open("","sourceWin","width=800,height=600,scrollbars=yes,resizable=yes");
viewWin.document.write("<html><basefont size=2 family=Verdana><title>Browser Source</title><body></body></html>");
viewWin.document.close();
viewWin.document.body.innerText = docSource;
</SCRIPT>
Create and copy the code to the files and save them to the windows\web folder, if saving to another location change the path in the reg file to reflect there new location
This message has been edited by mrpip on Jul 20, 2003 2:26 PM
Add Mark Text to your context menu: Is similar to the "Find" prompt on the edit menu except "Mark Text" does not search the 1st found then goes to what it found but search's the whole page and highlights all references it finds at once, which I find comes in handy on big pages.
marktext.htm:<SCRIPT>
var parentWin = external.menuArguments;
var parentDoc = parentWin.document;
var searchText = parentWin.prompt("Text to mark:","");
if (searchText != null && searchText != ''){
var searchRange = parentDoc.body.createTextRange();
for (i=0; searchRange.findText(searchText)!=false; i++){
searchRange.pasteHTML("<span style='background:#66FF66;'>" + searchRange.text + "</span>");
}
parentWin.alert(i + " items marked.");}
else{alert("Nothing to mark!");}
</SCRIPT>
Create and copy the code to the files and save them to the windows\web folder, if saving to another location change the path in the reg file to reflect there new location
Add Google to your context menu: By highlighting text on a page and selecting Google will open a new window to google searching the highlighted text, and if you select Google without highlighting any text the a prompt will display asking for your search term.
google.html:<script language="javascript" defer>
var parentWin = external.menuArguments;
var parentDoc = parentWin.document;
var select = parentDoc.selection;
var selectedtext = select.createRange().text;
if(selectedtext){open("http://www.google.com/search?q="+escape(selectedtext)+"&num=50")}
else{
void(q=parentWin.prompt('Enter text to search using Google. You can also highlight a word on this web page before clicking Google.',''));
if(q)open('http://www.google.com/search?q='+escape(q)+'&num=50')
}
</script>
Create and copy the code to the files and save them to the windows\web folder, if saving to another location change the path in the reg file to reflect there new location
Add View Link Source to your context menu: View the source code of web pages without going to the site by right clicking on hyperlinks and hyperlinked images or highlighting URL's which are in plain text.
linksource.html:<script language="javascript" defer>
if (external.menuArguments){
var selectedtext = external.menuArguments.document.selection.createRange().text;
if(selectedtext){
if(selectedtext.match("http://") ) window.open('view-source:' + selectedtext);
else window.open('view-source:http://' + selectedtext); }
else{
var clickelement = external.menuArguments.event.srcElement;
if ( clickelement.tagName == 'IMG' )
window.open('view-source:' + clickelement.parentElement.href);
else window.open('view-source:' + clickelement.href); }}
</script>
linksource.reg:REGEDIT4
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\View Link Source]
@="C:\\windows\\web\\linksource.html"
"contexts"=dword:00000032
Create and copy the code to the files and save them to the windows\web folder, if saving to another location change the path in the reg file to reflect there new location
Add Safe Frame to your context menu: When you select "Safe Frame" on a hyperlink, it will open the hyperlink in a new window inside an iframe which has its security set to restricted, (using your settings in the Internet Explorer's Restricted Sites Zone). An example of a Safe Viewer using your IE's Restricted Sites Zone.
This allows me to view sites I deem unsafe.
Create and copy the code to the files and save them to the windows\web folder, if saving to another location change the path in the reg file to reflect there new location
what you enable us to do here... havent found time to create those last files of yours ( have beeen busy with my buttons yesterday http://www.network54.com/Hide/Forum/257255 ) but I think I will add them to my menu, they are looking good to me. Well done, Phil!
on my context menu I forget to add... Links List This one display's all the links on the page beeing viewed in a popup window. Saves me alot of time when searching for a link(s) on pages that have way to may links per page such as my home page lol
urllist.htm:<script language=javascript defer>
var dlProgress=window.open("", "_blank", "scrollbars=yes, resizable=yes, status=yes, width=400, height=600");
dlProgress.document.open();
dlProgress.document.write ("<html><head><title>Links list</title></head><body topmargin=0 leftmargin=0 rightmargin=0 bottommargin=0>");
dlProgress.document.write ("<font style=\"font:8pt Verdana, Arial, Helvetica, Sans-serif; line-height:12pt;\">");
dlProgress.document.write ("<script language=javascript>function navigateClose(str){if (document.my_parent != null){document.my_parent.location.href=str;window.close();}else{alert(\"Please wait until the list has populated.\");}}<\/script>");
dlProgress.document.write (" List of all links in <b>" + external.menuArguments.document.title + "</b>:<ol>");
var links = external.menuArguments.document.links;
for (i = 0; i < links.length; i++){
if ( links(i).innerText != "" && links(i).innerText != " "){
dlProgress.document.write ("<li><A HREF='javascript:navigateClose(\"" + links(i).href + "\")' TITLE=" + links(i).href + ">" + links(i).innerText + "</a><BR>");}
else{dlProgress.document.write("<li><A HREF='javascript:navigateClose(\"" + links(i).href + "\")'>" + links(i).href + "</a><BR>");}
}
dlProgress.document.write ("</ol><center><a href='javascript:window.close()' style=\"color:#FF0000;text-decoration:none\">close</a></center><BR></body>");
dlProgress.document.write ("</font></html>");
dlProgress.document.close();
dlProgress.document.my_parent = external.menuArguments;
</script>
Create and copy the code to the files and save them to the windows\web folder, if saving to another location change the path in the reg file to reflect there new location