JavaScript

Submit Word – Ajutor pentru dicţionarele româneşti

Posted by Strainu on October 03, 2009
JavaScript, Open Content, Romana / No Comments

Dacă folosiţi Firefox, Flock sau Thunderbird, puteţi acum contribui la dezvoltarea dicţionarelor româneşti de la Firefox sau OpenOffice.org.

Pentru asta, trebuie să descărcaţi extensia Submit Word şi să adăugaţi cuvintele noi în dicţionarul personal (vezi imaginea de mai jos). Submit Word va încărca pe situl i18n.ro toate cuvintele pe care le adăugaţi în dicționarul dvs. personal. Dacă mai multe persoane vor sugera acelaşi cuvânt, el va fi adăugat în dicționarele româneşti.

Extensia e activată de optiunea "Adaugă în dicţionar"

Extensia e activată de optiunea "Adaugă în dicţionar"

Share and Enjoy:
  • Facebook
  • Twitter
  • Identi.ca
  • LinkedIn
  • Reddit
  • Add to favorites

Tags: , , , ,

Wikipedia Română cu diacritice corecte

Posted by Strainu on February 12, 2009
JavaScript, Romana, Wikipedia / No Comments

Începând de astăzi, utilizatorii Wikipediei în limba română care utilizează Linux, Windows Vista sau au ultimele actualizări de fonturi de la Microsoft pot vizualiza articolele folosind diacriticele corecte (cu virgulă, nu cu sedilă).

Pentru a realiza acest lucru, mergeți în pagina de preferinţe, tabul Gadgeturi și bifați opțiunea numită “Diacritice corecte”. Trebuie să aveți activat și Javascript.

Scriptul are și unele limitări, cauzate de performanța sistemului. Pentru a reduce durata de încărcare a paginii, nu sunt transformate decât diacriticele din articol, nu și din interfață. De asemenea, sunt ignorate literele din formulare (formularul de editare a paginilor, inclusiv legăturile de sub el şi formularul de căutare), paginile conținând javascript și paginile speciale.

Pentru cuvintele în turcă, care TREBUIE să conţină litera Ş (S cu sedilă), am pus la punct un mecanism de ignorare a acestor cuvinte. Pentru amănunte, vizitați pagina aceasta.

Sursa programului este disponibilă la diacritice.js.

Share and Enjoy:
  • Facebook
  • Twitter
  • Identi.ca
  • LinkedIn
  • Reddit
  • Add to favorites

Tags: , , , ,

QuickTemplate

Posted by Strainu on December 22, 2007
JavaScript, Software, Wikipedia / No Comments

Preview

QuickTemplate is a JavaScript script that can be used by Wikipedia users to add several new links under the edit window, so you can quickly add useful templates. The script allows the user to configure different parameters. You can show the following templates:

  • image copyrights;
  • maintenance templates;
  • delete templates;
  • disputes;
  • messages.

Continue reading…

Share and Enjoy:
  • Facebook
  • Twitter
  • Identi.ca
  • LinkedIn
  • Reddit
  • Add to favorites

Tags: , ,

Permission denied to call method XMLHttpRequest.open

Posted by dragos on May 18, 2007
HTML, JavaScript / 1 Comment

May find more here!

Have you ever seen something like that? I recently had a very interesting experience within AJAX scripting. Let’s say you will access http://www.domain.ext, right? Now here comes my problem. There is a great difference between

XMLHttpRequest.open('http://www.domain.ext/file.html', ...)

and

XMLHttpRequest.open('http://domain.ext/file.html', ...)

The result? Opera’s console said just: Error, Internet Explorer said nothing, and only the Mozilla browsers did give me a hint. And the hint… an interesting exception of which I didn’t know anything till that moment.

If, let’s say, you’re accessing http://www.domain.ext and the Ajax script is written for http://domain.ext you will receive a very non explicit exception/error found in the title. After long searches on the internet I could not find anything clear, until…

I remembered that once I received this error within another website I was working at. At that moment I did not realize that I did find a solution, but hey… Who’s perfect?

Here’s a real thing. You know already that Ajax does not load on domain.ext pages from domain2.ext. This is a permission rule that cannot be forced that easy, but can can be avoided though a caching script. But did you know, also that Ajax cannot load a page even from a sub-domain of the domain you’re working with? It’s the same bugging rule that’s restricting this and from what I’ve tested till now, it’s true. And what do you think www.domain.ext is considered for domain.ext? Yes… it’s just an ordinary sub-domain…

The solution? A simple javascript class: location. How? Like this:

XMLHttpRequest.open('http://'+location.host+'/file.html', ...)

This is the solution I found for the problem showed above.

Now… If, for example you’re viewing domain.ext and you want do Ajax load something from sdmn.domain.ext, this is a completely different thing, and again it can be done with the caching script I was talking above. We write a simple php file in domain.ext, which will load the html from sdmn.domain.ext. (I will show how in another article, a little bit later. But you can find it on the internet if u ggl a bit.)

http://en.wikipedia.org/wiki/AJAX
http://en.wikipedia.org/wiki/XMLHttpRequest
http://en.wikipedia.org/wiki/Ajax_framework

Do remember please that Internet Explorer uses other javascript classes for Ajax. XMLHttpRequest is compatible only for Firefox (IceWeasel), SeaMonkey (old Mozilla / IceApe), Opera on Windows / Linux, Konqueror and, I think, Epiphany on Linux and MAC OS X’s Safari. There may be others of which I do not know.

Share and Enjoy:
  • Facebook
  • Twitter
  • Identi.ca
  • LinkedIn
  • Reddit
  • Add to favorites

Tags: , , , ,