Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [jQuery]jQuery w GreaseMonkey?
Kicha
post
Post #1





Grupa: Zarejestrowani
Postów: 13
Pomógł: 0
Dołączył: 1.05.2010

Ostrzeżenie: (0%)
-----


Moze pierw kod:
Kod
// ==UserScript==
// @name                * blabla
// @namespace           * blabla
// @description         * blabla
// @include                     *lockerz.com*
// @include                     *ptzplace.lockerz.com*
// @require                     http://code.jquery.com/jquery-latest.min.js
// @require                     http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
// @version                     2.0
// ==/UserScript==

$('form[name=formularz] input').each(function() {
switch (this.name.replace(/[^a-z0-9]+/i, '')) {
case 'state': this.value = 'blabla'; break;
case 'country': this.value = 'Poland'; break;
case 'countryCode': this.value = 'blabla'; break;
case 'phoneOne': this.value = 'blabla'; break;
case 'phoneTwo': this.value = 'blabla'; break;
case 'phoneThree': this.value = 'blabla'; break;
case 'phoneWhole': this.value = 'blabla'; break;
case 'firstName': this.value = 'blabla'; break;
case 'lastName': this.value = 'blabla'; break;
case 'address1': this.value = 'blabla'; break;
case 'address2': this.value = 'blabla'; break;
case 'city': this.value = 'blabla'; break;
case 'zip': this.value = 'blabla'; break;
case 'recaptcharesponsefield': $(this).focus(); break;
}
});


Teraz tak.
1. Czy dobrze zrobilem @require
2. Czy kod powinien działać? tzn uzupełniać formularz.
3. Jak zrobic aby skrypt wybrał mi sam z listy panstwo a nie wpisywal...
4. Jest to do GreaseMonkey'a
5. Czy w kodzie sa jakies bledy?
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.08.2025 - 23:33