← Desenvolvimento

Adicionar aos favoritos

Lida 2447 vezes

Offline

ViiPER 
Membro
Mensagens 1208 Gostos 1
Troféus totais: 29
Trófeus: (Ver todos)
Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2

Alguém tem por ai um código que funcione em todos os browsers?
Offline

onurb 
Membro
Mensagens 128 Gostos 1
Feedback +3

Troféus totais: 24
Trófeus: (Ver todos)
Windows User Super Combination Combination Topic Starter Poll Voter Level 4 Level 3 Level 2 Level 1 100 Posts

tb precisava  :?
Offline

raugusto 
Elite
Mensagens 3145 Gostos 33
Feedback +13

Troféus totais: 31
Trófeus: (Ver todos)
Level 6 Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2

Offline

onurb 
Membro
Mensagens 128 Gostos 1
Feedback +3

Troféus totais: 24
Trófeus: (Ver todos)
Windows User Super Combination Combination Topic Starter Poll Voter Level 4 Level 3 Level 2 Level 1 100 Posts

Offline

ViiPER 
Membro
Mensagens 1208 Gostos 1
Troféus totais: 29
Trófeus: (Ver todos)
Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2

Ou não :(

Experimenta no firefox.

raugusto obrigado por nada.
Offline

onurb 
Membro
Mensagens 128 Gostos 1
Feedback +3

Troféus totais: 24
Trófeus: (Ver todos)
Windows User Super Combination Combination Topic Starter Poll Voter Level 4 Level 3 Level 2 Level 1 100 Posts

acabei de exprimentar
funciona !
mas reparei agora ke num era isto ke keria !  
 :?
kero um ke coloke o site como home ,
sera ke tens ?
Offline

ViiPER 
Membro
Mensagens 1208 Gostos 1
Troféus totais: 29
Trófeus: (Ver todos)
Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2

Guarda nos favoritos e depois abre ;)

Como homepage experimenta este:

Código: [Seleccione]
<!-- ONE STEP TO INSTALL SET HOMEPAGE LINK:

  1.  Copy the coding into the BODY of your HTML document  -->

<!-- STEP ONE: Paste this code into the BODY of your HTML document  -->

<BODY>

<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
// If it's Internet Explorer, use automatic link
// Be sure to change the "http://www.YourWebSiteHere.com\"
// to the URL you want them to bookmark.
if (document.all){
  document.write('<A HREF="javascript:history.go(0);" onClick="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(\'http://www.YourWebSiteHere.com\');">');
  document.write('<font size="5" color=6699FF face=arial><B>Click Here to Make My Web Page Your Homepage</B></font></a>');
}

// If it's Netscape 6, tell user to drag link onto Home button
// Be sure to change the "http://www.YourWebSiteHere.com\"
// to the URL you want them to bookmark.
else if (document.getElementById){
  document.write('<a href="http://www.YourWebSiteHere.com">Drag this link onto your Home button to make this your Home Page.</a>');
}

// If it's Netscape 4 or lower, give instructions to set Home Page
else if (document.layers){
  document.write('<b>Make this site your home page:</b><br>- Go to <b>Preferences</b> in the <B>Edit</B> Menu.<br>- Choose <b>Navigator</b> from the list on the left.<br>- Click on the <b>"Use Current Page"</b> button.');
}

// If it's any other browser, for which I don't know the specifications of home paging, display instructions
else {
  document.write('<b>Make this site your home page:</b><br>- Go to <b>Preferences</b> in the <B>Edit</B> Menu.<br>- Choose <b>Navigator</b> from the list on the left.<br>- Click on the <b>"Use Current Page"</b> button.');
}
//  End -->
</script>

<p><center>
<font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

<!-- Script Size:  2.11 KB -->
Offline

Ricardo75 
Membro
Mensagens 1660 Gostos 0
Troféus totais: 28
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

No head coloca isto:
Código: [Seleccione]
<script language="JavaScript1.2" type="text/javascript">
function bookmark(){
var title="TCM Total - FIFA Manager"
var url="http://www.tcmtotal.com"

if (window.sidebar) window.sidebar.addPanel(title, url,"");

else if( window.opera && window.print )
{
var mbm = document.createElement('a');
mbm.setAttribute('rel','sidebar');
mbm.setAttribute('href',url);
mbm.setAttribute('title',title);
mbm.click();
}

else if( document.all ) window.external.AddFavorite( url, title);

}
</script>


depois no body colocas (é o link que te vai adicionar aos favoritos):
Código: [Seleccione]
<a href="javascript:bookmark()" title="Adicionar aos favoritos"><img alt="Favoritos" src="http://www.tcmtotal.com/templates/tcmtotal07/images/favoritos.gif" /></a>

Não te esqueças de mudar o endereço e nome do site, esse é o que utilizo num site.
Offline

ViiPER 
Membro
Mensagens 1208 Gostos 1
Troféus totais: 29
Trófeus: (Ver todos)
Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2

A mesma coisa... no firefox guarda nos favoritos e depois abre o link.
Offline

Ricardo75 
Membro
Mensagens 1660 Gostos 0
Troféus totais: 28
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

xiiii, isto já funcionou bem :lol:
deixa lá ver o que está errado...

edit:
esquece, aquele código é mesmo para adicionar à barra lateral... bahhh
amanha eu procuro o código correcto para adicionar apenas aos favoritos, sorry