How To Add “Forward” & “Find On Page” Shortcuts To IE 9 In WP Mango

Even though Mango is awesome, and there are a ton of new features in it, some of the changes might feel a little annoying to the users. One such controversial change is in Internet Explorer. With IE9, the interface of Windows Phone 7’s web browser has become completely uncluttered and simplistic. This might be a good thing in most respects, but things can get a little annoying when you want to find a particular snippet of text on the page, and the Find Text button just isn’t there. Thanks to the development community, you can still put these functionalities in IE9 without even having an unlocked device. Read on to find out how.

Internet-Explorer-Windows-Phone-MangoThe method might sound a little un-intuitive, but it is better than nothing. It’s based upon adding a forward and find button in the favorites menu of WP7’s IE9. Here’s how you can do it.


Instructions:

  1. Open the Internet Explorer in your phone, and go to any page.
  2. Open the options menu located below the browser’s address bar.
  3. From among the opened options, choose “add to favorites”.
  4. In the add menu, edit the name field to whatever you want the shortcut to be called. For example, you can name it “Next” for the forward button and “in-page search” for the find button.
  5. Now for forward, edit the address field to
    javascript:history.forward()
  6. For creating the Find shortcut, put the following lines in the address field:
javascript:(function(){function G(){var pf=doc.getElementById('pf');var qt=doc.getElementById('qt');if(null==pf){pf=doc.createElement('div');pf.id='pf';var s=pf.style;s.position='absolute';s.zIndex='99';s.top=(scT||scBT)+'px';s.left=(scL||scBL)+'px';s.width='100%';s.backgroundColor='#FFFF00';pf.appendChild(doc.createTextNode('Search: '));qt=doc.createElement('input');qt.id='qt';qt.type='text';pf.appendChild(qt);var sb=doc.createElement('input');sb.type='button';sb.value='Find';sb.onclick=function(){P(qt.value)};pf.appendChild(sb);doc.body.appendChild(pf);}else{pf.style.display='inline';count=0;}}function P(s){document.getElementById('pf').style.display='none';if(s==='')return;var n=srchNode(document.body,s.toUpperCase(),s.length);alert("Found "+count+" occurrence"+(count==1?"":"s")+" of '"+s+"'.");pf.parentNode.removeChild(pf);return n;}function srchNode(node,te,len){var pos,skip,spannode,middlebit,endbit,middleclone;skip=0;if(node.nodeType==3){pos=node.data.toUpperCase().indexOf(te);if(pos>=0){spannode=document.createElement("SPAN");spannode.style.backgroundColor="red";middlebit=node.splitText(pos);endbit=middlebit.splitText(len);middleclone=middlebit.cloneNode(true);spannode.appendChild(middleclone);middlebit.parentNode.replaceChild(spannode,middlebit);++count;skip=1;}}else{if(node.nodeType==1&&node.childNodes&&node.tagName.toUpperCase()!="SCRIPT"&&node.tagName.toUpperCase!="STYLE"){for(var child=0;child<node.childNodes.length;++child){child=child+srchNode(node.childNodes[child],te,len);}}}return skip;}var count=0,scL=0,scT=0,scBL=0,scBT=0;var w=window,doc=document;if(typeof doc.body!='undefined'&&typeof doc.body.scrollLeft!='undefined'){scBL=doc.body.scrollLeft;scBT=doc.body.scrollTop;}if(typeof doc.documentElement!='undefined'&&typeof doc.documentElement.scrollLeft!='undefined'){scL=doc.documentElement.scrollLeft;scT=doc.documentElement.scrollTop;}G();})()

If you don’t want to do all that typing, visit this page (that you are currently reading) on your mobile phone, and copy/paste the above code to the address field of the bookmark.

    Now, whenever you want to make use of these functions, open the favorites tab and get cracking.
[via LiveSide.net]

Advertisement
  • PL

    Thanks for this

  • Chi Sun

    Dude u r my hero

  • AL Snow

    Forward works on the Lumia 800