shinnok Posted March 21, 2008 Report Posted March 21, 2008 Bookmarklets-urile sunt bucati de cod java care permit anumite actiuni referitoare la pagina curenta incarcata in browser.Se numesc bookmarklets deoarece majoritatea salveaza respecitvul cod intr-un fisier html si il adauga ca bookmark in browserul folosit(sau adaugati in loc de linkul html pentru acel bookmark codul javascript) pentru access cu usurinta la respectivele scripturi.Deasemenea codul respectiv poate fi rulat dand copy-paste in address bar.Exemple de bookmarklets:search links - cauta toate linkurile in pagina curenta sau cele care contin un keyword:javascript:(function(){var x,n,nD,z,i; function htmlEscape(s){s=s.replace(/&/g,'&');s=s.replace(/>/g,'>');s=s.replace(/</g,'<');return s;} function attrQuoteEscape(s){s=s.replace(/&/g,'&'); s=s.replace(/"/g, '"');return s;} x=prompt("show links with this word/phrase in link text or target url (leave blank to list all links):", ""); n=0; if(x!=null) { x=x.toLowerCase(); nD = window.open().document; nD.writeln('<html><head><title>Links containing "'+htmlEscape(x)+'"</title><base target="_blank"></head><body>'); nD.writeln('Links on [url="'+attrQuoteEscape(location.href)+'"]'+htmlEscape(location.href)+'[/url] with link text or target url containing "' + htmlEscape(x) + '"<hr>'); z = document.links; for (i = 0; i < z.length; ++i) { if ((z[i].innerHTML && z[i].innerHTML.toLowerCase().indexOf(x) != -1) || z[i].href.toLowerCase().indexOf(x) != -1 ) { nD.writeln(++n + '. [url="' + attrQuoteEscape(z[i].href) + '"]' + (z[i].innerHTML || htmlEscape(z[i].href)) + '[/url]'); } } nD.writeln('<hr></body></html>'); nD.close(); } })();How to:Dati copy paste la codul de mai sus in address bar chiar pe pagina in care suntei acum si vedeti cum functioneaza.Deasemenea il puteti adauga ca bookmark pentru access rapid la el.Acestea sunt valabile si pentru cele de mai jos.View passwords - arata parolele introduse in pagina curentajavascript:(function(){var s,F,j,f,i; s = ""; F = document.forms; for(j=0; j<F.length; ++j) { f = F[j]; for (i=0; i<f.length; ++i) { if (f[i].type.toLowerCase() == "password") s += f[i].value + "\n"; } } if (s) alert("Passwords in forms on this page:\n\n" + s); else alert("There are no passwords in forms on this page.");})();How to: Intrati de ex. pe mail.yahoo.com si introduceti user si parola dar nu dati sign in.Apoi dati copy paste la cod si va arata parola introdusa.Rot13 selection - inlocuieste textul selectat cu forma echivalenta "encriptata" cu Rot13(roteste fiecare caracter 13 pozitii la dreapta in alfabet de ex.:H va deveni U):javascript:var coding = "abcdefghijklmnopqrstuvwxyzabcdefghijklmABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLM"; function rot13(t) { for (var r = "",i=0;i<t.length;i++) { character = t.charAt(i); position = coding.indexOf(character); if (position > -1) character = coding.charAt(position + 13); r += character; } return r; } S=window.getSelection(); function t(N) { return N.nodeType == N.TEXT_NODE; } function r(N) { if (t(N)) N.data = rot13(N.data); } for (j=0;j<S.rangeCount;++j) { var g=S.getRangeAt(j), e=g.startContainer, f=g.endContainer, E=g.startOffset, F=g.endOffset, m=(e==f); if(!m||!t(e)) { /* rot13 each text node between e and f, not including e and f. */ q=document.createTreeWalker(g.commonAncestorContainer, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT, null, false); q.currentNode=e; for(N=q.nextNode(); N && N != f; N = q.nextNode()) r(N); } if (t(f)) f.splitText(F); if (!m) r(f); if (t(e)) { r(k=e.splitText(E)); if(m)f=k; e=k;} if (t(f)) g.setEnd(f,f.data.length); } void 0How to:Selectati orice text de pe pagina curenta si dati copy paste la cod in address bar.Pentru convertire la forma originala selectati din nou si aplicati inca o data codul.Pentru mai multe informatii si exemple puteti intra pe siteul asta:https://www.squarefree.com/bookmarklets/Acolo puteti gasi mai multe exemple.Puteti adauga ca bookmark orice bookmarklet de pe aceea pagina pentru access cu usurinta(adik fara copy-paste sau sa memorati codul si sa-l scrieti de fiecare data cand aveti nev de el lol).Cam asta este tot
Vhaerun Posted March 21, 2008 Report Posted March 21, 2008 Habar n-ai ce inseamna java si ce inseamna javascript . De unde ai dat copy/paste ?
shinnok Posted March 21, 2008 Author Report Posted March 21, 2008 ce spui tu ma? ce nu ti se pare corect in thread ia zi? De zici ca nu am habar?Daca ai postat de foame...a doua data abtinete pentru ca nu te hraneste!
shinnok Posted March 21, 2008 Author Report Posted March 21, 2008 Si apropo tutorialul se intituleaza Bookmarklets nu Java sau Java script!Macar ban o zi ai merita.PS pentru admini:multe forumuri se duc de rapa din cauza unor posturi geniale ca ale acestui personaj si persoane ca el care se cred UberM3ist3rHack3r3lite si nimic nu este interesant pentru ei.
Vhaerun Posted March 21, 2008 Report Posted March 21, 2008 Cu ce incep codurile tale ?HINT: javascript !
shinnok Posted March 21, 2008 Author Report Posted March 21, 2008 Lol si cu ce vroiai sa inceapa cu BrainFuck:...http://en.wikipedia.org/wiki/Brainfuck
Vhaerun Posted March 21, 2008 Report Posted March 21, 2008 Bookmarklets-urile sunt bucati de cod javaEasy boy
Guest Nemessis Posted March 21, 2008 Report Posted March 21, 2008 Terminati cu cearta si injuraturile.