Page 1 of 1

knowing if in in favorites

Posted: Thu Apr 24, 2003 9:01 am
by Guy
is there a way to know if my site is in the favorites(for ie) and bookmarks(for mozilla)
and if it is set to homepage?
Guy

Security

Posted: Thu Apr 24, 2003 9:05 am
by []InTeR[]
I think this is impossable to do.
Maybe if there is a sercurity bug.

You can set a cookie the first time you try to add this to the browser.

Posted: Thu Apr 24, 2003 9:10 am
by Guy
they to in it google - if you have google in your favorites you don't have the "add to favorites"
and the same with the make homepage
but I don't have a clue how they are doing it.
Guy

Google

Posted: Thu Apr 24, 2003 9:21 am
by []InTeR[]
I didn't know that, nice to know.

So i search for some qlue's how they did it.

If found this:

Code: Select all

<span id=hp style="behavior:url(#default#homepage)"></span>
<script>
//<!--
if (!hp.isHomePage('http://www.google.com/')) &#123;document.write("<p><a href="/mgyhp.html" onClick="style.behavior='url(#default#homepage)';setHomePage('http://www.google.com/');">Make Google Your Homepage!</a>");&#125;
//-->
</script>

thanks

Posted: Thu Apr 24, 2003 9:49 am
by Guy
- except I cant make it to really work.
dont know why.
Guy

Posted: Thu Apr 24, 2003 9:53 am
by []InTeR[]
Maybe the rest of the script is needed. (It's in the <HEAD> part.)

I didn't test it yet.

Code: Select all

<style><!--
body,td,a,p,.h&#123;font-family:arial,sans-serif;&#125;
.h&#123;font-size: 20px;&#125;
.q&#123;text-decoration:none; color:#0000cc;&#125;
//-->
</style>
<script>
<!--
function sf()&#123;document.f.q.focus();&#125;
function c(p,l,e)&#123;var f=document.f;if (f.action && document.getElementById) &#123;var hf=document.getElementById("hf");if (hf) &#123;var t = "<input type=hidden name=tab value="+l+">";hf.innerHTML=t;&#125;f.action = 'http://'+p;e.cancelBubble=true;f.submit();return false;&#125;return true;&#125;
// -->
</script>

Posted: Fri Apr 25, 2003 1:17 pm
by m3mn0n
very cool javascript snipplet. :o

Posted: Fri Apr 25, 2003 2:06 pm
by []InTeR[]
I got it from http://www.google.com