Creating a JavaScript “Set As Homepage” Link
The unfortunate part about creating websites for customers is that no matter what recommendation I make, if they want it, I have to give it. Thus is the case with recently adding a "Set As Homepage" link to a customer's website. Homepages are much more useful to the user when they're set to Google, Yahoo!, another portal, or they're webmail. To each their own, I guess, so here's how you create a "Set As Hompage" link using JavaScript.
The JavaScript
function set_homepage()
{
document.body.style.behavior='url(#default#homepage)';
document.body.setHomePage('https://davidwalsh.name');
}
I don't want to say that this link is tacky necessarily, but I think it's a bit obnoxious. If the user wanted your site to be their homepage, you wouldn't have to ask them. Also note that this only works in Internet Explorer.
![CSS 3D Folding Animation]()
Google Plus provides loads of inspiration for front-end developers, especially when it comes to the CSS and JavaScript wonders they create. Last year I duplicated their incredible PhotoStack effect with both MooTools and pure CSS; this time I'm going to duplicate...
![9 More Mind-Blowing WebGL Demos]()
With Firefox OS, asm.js, and the push for browser performance improvements, canvas and WebGL technologies are opening a world of possibilities. I featured 9 Mind-Blowing Canvas Demos and then took it up a level with 9 Mind-Blowing WebGL Demos, but I want to outdo...
![Optimize Your Links For Print Using CSS — Show The URL]()
When moving around from page to page in your trusty browser, you get the benefit of hovering over links and viewing the link's target URL in the status bar. When it comes to page printouts, however, this obviously isn't an option. Most website printouts...
![Jack Rugile’s Favorite CodePen Demos]()
CodePen is an amazing source of inspiration for code and design. I am blown away every day by the demos users create. As you'll see below, I have an affinity toward things that move. It was difficult to narrow down my favorites, but here they are!
bodoh kau ni jang…
I guess this only works below IE7 ?
i have put that in website, works in IE but not on FF or chrome! :(
it doesn’t work on latest version of browsers
I think . it may work in older version of all the browsers.